Ask Your Question
0

Reducing the publishing rate of a topic from RosLaunch

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

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 http://tinypic.com/r/23uwtmo/9 . 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
4

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

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

Comments

Thank you. Exactly what I needed.

lakehanne gravatar imagelakehanne ( 2016-11-01 11:02:11 -0600 )edit
0

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

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
0

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

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

Comments

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 imagelakehanne ( 2016-10-31 23:33:28 -0600 )edit
0

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

AndyZe gravatar image

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

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" />
  </node>
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 811 times

Last updated: Jun 19 '18