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

How do I know the maximum rate my publisher can publish?

asked 2015-05-04 09:14:25 -0500

mmodetb gravatar image

I need to publish the information of 4 sensors as quick as possible, could anybody tell which is that rate?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2015-05-04 09:21:40 -0500

bvbdort gravatar image

use $ rostopic hz /topic_name to know frequency of publisher.

check rostopic hz

edit flag offensive delete link more

Comments

But I know the value of the frecuency, because I have declare it. I just want to make as big as fast as possible. How do I know that?

Thank you,

Mercedes.

mmodetb gravatar image mmodetb  ( 2015-05-04 09:44:13 -0500 )edit

it depends on frequency of sensors. how did you declare the publisher frequency ?

bvbdort gravatar image bvbdort  ( 2015-05-04 10:22:14 -0500 )edit

Then sensors are giving information all the time. They are a current and a voltage sensor. I declare the frequency of the publisher by using a while loop: rate = rospy.Rate(100) while not rospy.is_shutdown(): pub.publish(state) rate.sleep() thank you!

mmodetb gravatar image mmodetb  ( 2015-05-04 10:57:37 -0500 )edit
0

answered 2018-01-28 19:47:24 -0500

I don't see any documentation of a maximum rate. It's probably system-dependent. On my machine which is a Lenovo T430 laptop, the maximum publication rate I have measured using a simple test program is about 30 khz.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2015-05-04 09:14:25 -0500

Seen: 2,134 times

Last updated: May 04 '15