dynamixel_hardware icon indicating copy to clipboard operation
dynamixel_hardware copied to clipboard

Running ROS2 Controller Manager at high loop rate - groupSyncRead error

Open nilp-dromeda opened this issue 7 months ago • 2 comments

I have been trying to use this package to interface with our custom robot. The robot contains the below hardware:

  • XL330-M288-T (x3)
  • XM430-W350-T (x9)
  • XC330-T288-T (x3)
  • U2D2 serial converter

The U2D2 is running at a baud rate of 57600 and all Dynamixels are running in Position Control Mode and running everything on Humble.

The problem I am having is that when running the ROS2 controllers at faster than 10-20 Hz (using the config parameters in the .yaml file for ros2_controllers I get alot of the below errors:

[ros2_control_node-3] [ERROR] [1719906084.814933792] [DynamixelHardware]: groupSyncRead getdata failed
[ros2_control_node-3] [ERROR] [1719906084.814955616] [DynamixelHardware]: groupSyncRead getdata failed
[ros2_control_node-3] [ERROR] [1719906084.814971969] [DynamixelHardware]: groupSyncRead getdata failed
[ros2_control_node-3] [ERROR] [1719906084.914753622] [DynamixelHardware]: [TxRxResult] There is no status packet!

Reducing the controller loop rate to 10Hz seems to fix this issue. But then, when joints are under mechanical load the above errors start to appear again (maybe because internal PID controllers of the Dynamixels are busy reading the registers when under load alot more frequently?). When these errors occur the /joint_states topic publishes garbage data, hence, causing the controller to cause massive jumps in motion randomly. I would like to run the controllers at around 100Hz and get rid of the above groupSyncRead issue. Does anyone have any ideas on possible fixes to this issue at all or has seen something similar?

I have used this library as well and it runs the control loop at around 500Hz and the above error does not occur at all. This makes me wonder if it is an issue with this repo's implementation?

nilp-dromeda avatar Jul 02 '24 12:07 nilp-dromeda