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

Prevent negative sec and nano in TimeToROSStamp when time is large #11

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

KenN7
Copy link
Contributor

@KenN7 KenN7 commented Oct 22, 2024

Hi :)
I had some problems running the method on some of my bags.

Bug:
Upon testing with bags recorded recently, when reaching the TimeToROSStamp function, the returned Time object would contain negative values for sec and nanosec.
E.g. a value like
time = 1.7265783684646845e+18
was converted to:
sec = -2147483648 and nanosec = 0.

This fix computes sec and nanosec properly, in my case, i am then able to replay my bags and get the method to work.

replaced Time functions with standard methods.
@tizianoGuadagnino tizianoGuadagnino merged commit aff5e67 into PRBonn:main Oct 23, 2024
11 checks passed
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

Successfully merging this pull request may close these issues.

2 participants