Rosanswers logo

hello,here are the publishing rate on the following topics:--

/odom--->Caverage rate: 5.002   min: 0.193s max: 0.210s std dev: 0.00788s window: 39
/scan--->Caverage rate: 4.997   min: 0.193s max: 0.210s std dev: 0.00782s window: 39
/tf----->Caverage rate: 40.086  min: 0.000s max: 0.112s std dev: 0.04128s window: 250

How can i increase the publishing rate on /odom and /scan topics?

I have a P3AT robot in spawned in the simulated environment (USARSim).

////////////////////////////////////////////////Question Update 1///////////////////////////////////////

hi @gvdhoorn, i have an amcl node which subscribingis to /tf from rossim at a higher rate and also publishing the /tf, to others node, i am in a problem because both nodes rossim and amcl are doing both things publishing and subscribing together, now my concern is that i suppose i remapped it like <remap from="tf" to="tf_throttle"/> then it could also change publishing topic along with its subscribing topic, please take a look on this rqt_graph which is creating problem and confusion.

My rossim Node is publishing to /tf at the rate of 40hz, i want to rossim to publish at the rate of 5hz, i used throttle but it publishing at another topic /tf_throttle at the reduced rate, now if i remap the amcl to subscribe to /tf_throttle and because publishing to the /tf also then it might also change it publishing topic and other node like rviz and move_base won't be able to get /tf data from amcl. please take a look at my rqt_graph

Thanks a lot

////////////////////////////////////////////////Question Update 2///////////////////////////////////////

hi @gvdhoorn,

  1. Here is the scenario, suppose i have a node n and two topics t1 and t2, n is a default publisher of t1 and also subscribes to this topic 't1'.

  2. Now i want that node n should subscribe to the topic t2 instead of topic t1, but at the same time i also don't want n to change its publishing topic and it should retain its default publishing topic.

How can i do it because i suspect that remapping can change both topics (publishing and subscribing) for the node n?? please suggest.

Originally posted by Aarif on ROS Answers with karma: 351 on 2014-12-16

Post score: 0

Original comments

Comment by dornhege on 2014-12-16:
Whatever sends this topics (probably some usarsim driver node) must adjust that.


1 Answer 1


Rosanswers logo

Only the source of those messages can increase the publishing rate.

If the author of the node that publishes the /odom and /scan transforms has provided a configuration interface through which you can configure the publication rate, use that.

If there is no such configuration option, you'll have to change the source of the node(s) in question.

Edit: note that decreasing message rate is possible without changing the publisher. This is known as throttling, and can be done using the topic_tools/throttle node.

Originally posted by gvdhoorn with karma: 86574 on 2014-12-16

This answer was ACCEPTED on the original site

Post score: 2

Original comments

Comment by dornhege on 2014-12-16:
@gvdhoorn converted this to answer as it gives instructions on how to proceed.

Comment by gvdhoorn on 2014-12-16:
Ok. I'll update it a bit then.

Comment by Aarif on 2014-12-17:
hi @gvdhoorn, i have gone through your solution, throttle and drop is doing good but they are publishing on another topic at modified publishing rate, but i want to publish on the same topic, is there any trick so that i can do so.

Thanks for looking into it. :)

Comment by gvdhoorn on 2014-12-18:
You want to look at remapping. It works for subscribers as well.

Note btw that topic_tools nodes cannot increase the publication rate of their input.

Comment by Aarif on 2014-12-19:
hi @gvdhoorn, i have update my question and described it more please take a look on that..

Comment by Aarif on 2014-12-19:
hi @gvdhoorn, please take a look on this too, here is what i am doing because of that i am getting this publishing rate problem.

Comment by gvdhoorn on 2014-12-22:
If I understand you correctly, you could probably have amcl publish on /tf_amcl (using remapping), then (again using remapping) have the throttle node subscribe to /tf_amcl and publish on /tf.

Comment by Aarif on 2014-12-23:
hi @gvdhoorn, i am really very sorry for inconvenience, i have updated my question again and make it more precise, please take a look on that.

Thank you.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.