Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publishing rate from Jupyter is not correct. #45

Closed
mhaboali opened this issue Dec 17, 2019 · 2 comments
Closed

Publishing rate from Jupyter is not correct. #45

mhaboali opened this issue Dec 17, 2019 · 2 comments

Comments

@mhaboali
Copy link

Hi,

When I tried to publish string message using Start button with rate = 10, I noticed from the terminal when I ran rostopic hz the frequency was increasing constantly with low increases from 0.1 hz to 9.8 hz.

How can I avoid this issue?

@wolfv
Copy link
Member

wolfv commented Dec 18, 2019

Hi @mhaboali

I just checked this -- indeed there was a small error from using a rospy.sleep(...) instead of using

r = rospy.Rate(X)
r.sleep()

which gives a more accurate timeout.

However, I couldn't see a big deviation as you do. I have a PR to make this function behave better.

@wolfv
Copy link
Member

wolfv commented Dec 18, 2019

Fixed, thanks again for the bug report!

@wolfv wolfv closed this as completed Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants