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

Reducing the publishing rate of a topic from RosLaunch

asked 2016-10-31 21:11:13 -0500

Hi there,

I have a custom-built robot which I am trying to control with move_it. I have written the urdf and generated the srdf using the move_it setup assistant. All the topics from my URDF are being broadcast on tf links at 30Hz based on a sensor_msgs/JointState node I wrote. I am trying to link the base of my robot to the vicon /world coodinate frame (I am using the vicon_bridge package ). For some reason, I find that the frames being broadcast by vicon are crazily high (to the order of 200 - 400Hz) and as a result, move_it is not updating the tf transforms because of errors such as the following:

ERROR] [1477965797.682768512]: Transform error: Lookup would require extrapolation into the future. Requested time 1477965797.631547473 but the latest data is at time 1477965797.626859796, when looking up transform from frame [headnball_link] to frame [world]

My tf view_frames is given by the attachment in the link . Is there a way to specify the publish limit to a nodefrom within a roslaunch file?

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted

answered 2016-11-01 05:20:24 -0500

NEngelhard gravatar image

You can use throttle from the topictools. This is a node that subscribes to a topic and republishes at a defined rate. You can use remap to make your vicon node to publish e.g. at /tf_superfast and let the throttle subscribe to this and republish on /tf.

edit flag offensive delete link more


Thank you. Exactly what I needed.

lakehanne gravatar image lakehanne  ( 2016-11-01 11:02:11 -0500 )edit

answered 2018-06-19 12:24:40 -0500

It sounds like your actual issue in how you're doing your TF or time synchronization between the vicon system and ROS. 200-400hz is definitely doable by ROS, I have some applications running at 2kHz

edit flag offensive delete link more

answered 2016-10-31 22:49:38 -0500

JoshMarino gravatar image

You can pass args to nodes from a roslaunch file, even while specifying the same arg as when roslaunching it. You can then read in the args from the node and use that to set the ROS topic publisher frequency.

edit flag offensive delete link more


My prblem is not so much as not knowing that I could do what you have suggested. I am actually doing that. The thing is that vicon publishes at a rate that is too fast. Limiting the rate within my note via ros::Rate sleep command doesn't seem to be helping.

lakehanne gravatar image lakehanne  ( 2016-10-31 23:33:28 -0500 )edit

answered 2018-06-19 12:08:32 -0500

AndyZe gravatar image

updated 2018-06-19 12:26:35 -0500

Commonly, you can set the publish_frequency of robot_state_publisher:

  <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="true" output="screen" >
    <param name="publish_frequency" value="10" />
edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-10-31 21:11:13 -0500

Seen: 2,138 times

Last updated: Jun 19 '18