dynamixel ax-18a servos not responding reliably
Hi all,
we are trying to control 8 Dynamixel AX-18A servo motors using the USB2Dynamixel dongle, using the Ubuntu 10.10 packages for ROS Electric. We created a launch file according to the dynamixel_controllers tutorial.
When we start it, we get output like
[INFO] [WallTime: 1321639123.057186] Pinging motor IDs 1 through 8...
[INFO] [WallTime: 1321639123.094411] Found motors with IDs: [1, 2, 3, 4, 5, 6, 8].
[WARN] [WallTime: 1321639123.118003] Checksum of 230 does not match the checksum from servo of 246
Exception in thread Thread-5:
Traceback (most recent call last):
File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
self.run()
File "/usr/lib/python2.6/threading.py", line 484, in run
self.__target(*self.__args, **self.__kwargs)
File "/opt/ros/electric/stacks/dynamixel_motor/dynamixel_driver/src/dynamixel_driver/dynamixel_serial_proxy.py", line 277, in __publish_diagnostic_information
status.values.append(KeyValue('Model Name', str(self.motor_static_info[mid] ['model'])))
KeyError: 1
Every time we start the launch file, one or more random motor ids are not found. In the example above, it is motor number 7 that is missing. The process is still running after giving the above output. Also, the checksum error is a little different each time.
The launch file:
<launch>
<node name="dynamixel_manager" pkg="dynamixel_controllers" type="controller_manager.py" required="true" output="screen">
<rosparam>
namespace: dxl_manager
serial_ports:
pan_tilt_port:
port_name: "/dev/ttyUSB1"
baud_rate: 1000000
min_motor_id: 1
max_motor_id: 8
update_rate: 10
</rosparam>
</node>
</launch>
Output of "rosparam get /dynamixel" (in this run, servo 6 is missing):
pan_tilt_port:
'1': {degrees_per_encoder_tick: 0.29296875, encoder_resolution: 1024, encoder_ticks_per_degree: 3.4133333333333336,
encoder_ticks_per_radian: 195.56959407132098, max_angle: 1023, max_torque: 1.3974476250000001,
max_velocity: 8.0416045193750012, min_angle: 0, model_name: AX-18F, model_number: 18,
radians_per_encoder_tick: 0.0051132692929521375, radians_second_per_encoder_tick: 0.0078608059817937455,
range_degrees: 300.0, range_radians: 5.2359877559829888, torque_per_volt: 0.14709975,
velocity_per_volt: 0.84648468625000006}
'2': {degrees_per_encoder_tick: 0.29296875, encoder_resolution: 1024, encoder_ticks_per_degree: 3.4133333333333336,
encoder_ticks_per_radian: 195.56959407132098, max_angle: 1023, max_torque: 1.3827376500000002,
max_velocity: 7.9569560507500006, min_angle: 0, model_name: AX-18F, model_number: 18,
radians_per_encoder_tick: 0.0051132692929521375, radians_second_per_encoder_tick: 0.0077780606556696,
range_degrees: 300.0, range_radians: 5.2359877559829888, torque_per_volt: 0.14709975,
velocity_per_volt: 0.84648468625000006}
connected_ids: [1, 2, 3, 4, 5, 7, 8]
We double checked the baud rate settings in both the launch file and the motor settings using the Dynamixel Commander tool for Windows. Does anybody know what could be wrong here?
Update: When we use the latest revision of dynamixel_motors stack (rev 1555), all the motors are found. There are still checksum errors, though:
[INFO] [WallTime: 1321969002.397966] pan_tilt_port: Pinging motor IDs 1 through 8...
[ERROR] [WallTime: 1321969002.718987] Exception thrown while getting attributes for motor 4 - Invalid response received from motor 4. Wrong packet prefix ['\xff', '\xef']
[ERROR] [WallTime: 1321969002.738579] Exception thrown while getting attributes for motor 4 - Checksum received from motor 4 does not match the expected one (43 != 47)
[ERROR] [WallTime: 1321969002.750398] Exception thrown while getting attributes for motor 4 - Invalid response received from motor 4. Wrong packet prefix ['\x7f', '\xff']
[ERROR] [WallTime: 1321969002.802157] Exception thrown while getting attributes for motor 4 - Invalid response received from motor 4. Wrong packet prefix ['\xfe', '\xdf']
[ERROR] [WallTime: 1321969002.858299] Exception thrown while getting attributes for motor 5 - Checksum received from motor 5 does not match the expected one (242 != 18)
[ERROR] [WallTime: 1321969002.870539] Exception thrown while getting attributes for motor 5 - Checksum received from motor 5 does not match the expected one (153 != 161)
[ERROR] [WallTime: 1321969002.978123] Exception thrown while getting attributes for motor 6 - Checksum received from motor 6 does not match the expected one (0 != 247)
[INFO] [WallTime: 1321969003.230346] pan_tilt_port: Found 8 motors - 8 AX-18F [1, 2, 3, 4, 5, 6, 7, 8], initialization complete.
Thanks, Daniel
Asked by ddimarco on 2011-11-18 03:09:46 UTC
Comments
It looks like some kind of communication problem, sometimes incoming packets are corrupted. I doubt I can do anything about it on the driver side. Did you modify things like return_delay_time on the motors?
Asked by arebgun on 2011-11-22 01:48:01 UTC
Can you check out the trunk version of dynamixel_motor and see what that gives you? It probably won't fix the underlying problem but might give me a better idea where things fail.
Asked by arebgun on 2011-11-21 11:29:50 UTC
Can you also post your configuration and launch files, and output of "rosparam get /dynamixel"? Does the process just die after this exception is thrown or does it continue? I probably should handle errors like that properly and print a more descriptive error message.
Asked by arebgun on 2011-11-21 02:25:32 UTC
Thanks for the hint. We tried it with a lots of different configurations, but to no avail. The strange thing is, the motors are working great under Windows.
Asked by ddimarco on 2011-11-20 23:31:10 UTC
IIRC, these get chained together, so (if you had an intermittently bad servo) you might get these sorts of unpredictable failures. Maybe try removing single servos from the chain, and seeing if one of them makes the problem go away?
Asked by Mac on 2011-11-18 04:20:36 UTC