ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
  while not rospy.is_shutdown():
        vels=[0,0,0.05,0,0,0]
        pub.publish(vels)

this publishes the same velocity at about the maximum rate your computer is able to achieve -- which for typical PCs these days could be 10000 Hz or faster with these small messages.

You may want to add a sleep in there to moderate the rate at which this loop is executed. There is no point in publishing any faster than the maximum of the URs control loop, which, if you have a non-e-series controller, would be 125 Hz.

Reducing the situation to just looking at the lag reported by the OP, he implemented a MWE that just publishes a simple velocity to the command topic.

In the MWE we see:

  while not rospy.is_shutdown():
        vels=[0,0,0.05,0,0,0]
        pub.publish(vels)

this publishes the same velocity at about the maximum rate your computer is able to achieve -- which for typical PCs these days could be 10000 Hz or faster with these small messages.

You @Rik1234: you may want to add a sleep in there to moderate the rate at which this loop is executed. There is no point in publishing any faster than the maximum of the URs control loop, which, if you have a non-e-series controller, would be 125 Hz.