Ask Your Question

Verify loop_rate

asked 2015-03-24 05:32:50 -0600

Carollour gravatar image

I have set a loop rate in the following way:

ros::Rate r(100)

Is there anyway to verify if I am accomplish this rate or if the function is taking longer than that? Thank you.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2015-03-24 06:02:07 -0600

Chaos gravatar image

updated 2015-03-24 06:02:33 -0600

Hi! If you publish a topic you can verify the loop rate with:

rostopic hz /your_topic_name
edit flag offensive delete link more


thank you, that was it.

Carollour gravatar image Carollour  ( 2015-03-24 08:45:51 -0600 )edit

answered 2015-03-24 09:19:32 -0600

Adolfo Rodriguez T gravatar image

Consider using a ros::Timer. You have programatic access to nominal and real periods, hence you can take appropriate action when things start to go unexpectedly.

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


Asked: 2015-03-24 05:32:50 -0600

Seen: 384 times

Last updated: Mar 24 '15