loop rate of a subscriber ?
Hi How can i find the loop rate of a subscriber/subscriber callback ?
Thanks
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
Hi How can i find the loop rate of a subscriber/subscriber callback ?
Thanks
Subsciber callbacks are called whenever new message arrives to the topics however you can print the frequency of messages by command: rostopic hz /topic_name
Hope it helps.
Hi Orko, Thank you for your comment. I am thinking of finding rate at which subscriber call back function is executed. Is it the same as "rostopic hz /topic_name" ?
Technically, yes (assuming your subscriber doesn't miss any message). You can test this simply printing the ros time inside the callback and then calculating frequency by 1/(consecutive ros time in secs). (I know it's a dummy way but it's simplest) It would give the same value with rostopic hz
Asked: 2017-07-22 06:33:18 -0500
Seen: 952 times
Last updated: Jul 22 '17