ros-industrial / ros_canopen

CANopen driver framework for ROS (http://wiki.ros.org/ros_canopen)
GNU Lesser General Public License v3.0
345 stars 275 forks source link

Motors do not start at same time #315

Closed jcrobots closed 5 years ago

jcrobots commented 5 years ago

I am using ROS_CANOpen to move a differential drive robot, with a config setup based on: https://github.com/ipa320/schunk_robots/tree/indigo_dev/schunk_lwa4p

I'm using profiled position mode and publishing to the topic "joint_group_position_controller/command" to send target positions. I have found that sometimes when I publish a command, one of the two wheel motors will begin moving one SYNC interval later than the other (I am having to use a 200ms SYNC interval due to this issue: https://github.com/ipa320/schunk_robots/issues/59). I have been told that if I use SYNC messages and my two servo drives have the same group identifier (in firmware they both have group ID 128), they should start at the same time. However there does not seem to be any way to specify a group ID in ROS_CANOpen. It may be notable that I have been unable to reproduce this issue using profiled velocity mode.

I believe this may be a missing functionality in ROS_CANOpen, but if this can be fixed on my end, I would very much appreciate any help or advice!

Thank you for reading

gavanderhoorn commented 5 years ago

This would appear to be a cross-post of ROS_CANOpen motor synchronization problem on ROS Answers.

jcrobots commented 5 years ago

Correct, is that ok?

mathias-luedtke commented 5 years ago

I addressed most of the question on ROS answers.

my two servo drives have the same group identifier (in firmware they both have group ID 128),

I don't know what a "group identifier" should be. It looks like the SYNC object (128 = 0x80). At the moment this value is hard-coded to this value, it should be synchronous then.

is that ok?

Not really, I will close this issue in favor of ROS answers.