hello-robot / stretch_ros

ROS packages for the Stretch mobile manipulators from Hello Robot Inc.
https://docs.hello-robot.com/0.2/stretch-tutorials/ros1/
167 stars 84 forks source link

Bugfix/push command sync #96

Closed aedsinger closed 11 months ago

aedsinger commented 1 year ago

This moves the push_command call of Robot to single place - the main loop of stretch_driver. Commands can come from callbacks (eg runstop), base velocity control, or the Joint Trajectory Action server. They now depend on the main loop (executing at 15hz) to actually push the command.

The reason for this is to avoid push_commands that occur close together in time, which causes an issue with Pimu motor_sync. The downside is that a joint command may wait a bit longer for the command to actually get pushed to the robot (eg, 1/15hz max).

hello-binit commented 1 year ago

@aedsinger Does this change the behavior of nodes (e.g. stretch_demos) that interact with the action server?

aedsinger commented 1 year ago

It should not. We've verified through this gist that the pimu trigger motor sync issue is resolved: https://gist.github.com/hello-fazil/5c0732e33eb140fc5a717f339218d100