From c2614fc25ecfff90c64f034c6d745b3b408a5a15 Mon Sep 17 00:00:00 2001 From: Patrick Goebel Date: Thu, 17 Dec 2015 16:20:52 -0800 Subject: [PATCH] Removed min/max check on servo_write since the range 0-180 does not apply to all joint types --- ros_arduino_python/src/ros_arduino_python/arduino_driver.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ros_arduino_python/src/ros_arduino_python/arduino_driver.py b/ros_arduino_python/src/ros_arduino_python/arduino_driver.py index 5e4ae2c..4c1f9f8 100755 --- a/ros_arduino_python/src/ros_arduino_python/arduino_driver.py +++ b/ros_arduino_python/src/ros_arduino_python/arduino_driver.py @@ -29,9 +29,6 @@ import sys, traceback from serial.serialutil import SerialException from serial import Serial -SERVO_MAX = 180 -SERVO_MIN = 0 - class Arduino: ''' Configuration Parameters ''' @@ -318,7 +315,7 @@ class Arduino: ''' Usage: servo_write(id, pos) Position is given in radians and converted to degrees before sending ''' - return self.execute_ack('s %d %d' %(id, min(SERVO_MAX, max(SERVO_MIN, degrees(pos))))) + return self.execute_ack('s %d %d' %(id, degrees(pos))) def servo_read(self, id): ''' Usage: servo_read(id)