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

diagnostics_updater does not support diagnostic_period < 1 #20

Closed
orzechow opened this issue Apr 9, 2014 · 2 comments
Closed

diagnostics_updater does not support diagnostic_period < 1 #20

orzechow opened this issue Apr 9, 2014 · 2 comments

Comments

@orzechow
Copy link

orzechow commented Apr 9, 2014

I'm not sure about the python version, but the diagnostics_updater in c++ crashes with

std::runtime_error "Time is out of dual 32-bit range"

if the diagnostic_period parameter is < 1
The reason lies in diagnostics_updater::update_diagnostic_period() where ros::Duration overflows if period_ < old_period:
https://github.com/ros/diagnostics/blob/groovy-devel/diagnostic_updater/include/diagnostic_updater/diagnostic_updater.h#L520

@trainman419
Copy link
Contributor

This looks like it's actually a bug in addition of a negative ros::Duration object to a ros::Time object. I'll see if I can come up with a test case to reproduce it.

ahendrix added a commit that referenced this issue Apr 9, 2014
@trainman419
Copy link
Contributor

It turns out that this was a bug in the initialization of next_time_, resulting in it being negative if diagnostic_period was set less than the default.

Fixed in 3c7f6d4

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