-
Notifications
You must be signed in to change notification settings - Fork 418
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
Check for negative time in rclcpp::Time(int64_t nanoseconds, ...) constructor #2510
Check for negative time in rclcpp::Time(int64_t nanoseconds, ...) constructor #2510
Conversation
Signed-off-by: Nursharmin Ramli <nursharminramli@gmail.com>
Signed-off-by: Nursharmin Ramli <nursharminramli@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this is right thing to do.
@clalancette @wjwwood what do you think?
Signed-off-by: Nursharmin Ramli <nursharminramli@gmail.com>
Signed-off-by: Nursharmin Ramli <nursharminramli@gmail.com>
Signed-off-by: Nursharmin Ramli <nursharminramli@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks reasonable to me with green CI.
Let's put this on the queue to merge once Rolling is unfrozen.
@clalancette can we backport this to jazzy ? or we should wait the frozen period? |
We are open for backports now. My only question is whether we should actually backport it to Jazzy or not. We are not allowing new features into Jazzy, but we are allowing bugfixes. The other thing we want to avoid at this point is too much breakage to downstream packages. What do you think @ahcorde ? Do you consider this a bugfix or a feature, and what do you think the downstream impact is going to be? |
@clalancette @ahcorde IMO, this could possibly break the user application. so i would not backport this to released distros... |
rclcpp::Time currently allows a negative time when constructing with int64_t nanoseconds (but not with int32_t seconds even though both can possibly hold a negative value). For a more uniform interface and based off of #525 where time cannot be negative:
rclcpp::Time(int32_t seconds, uint32_t nanoseconds, ...)
constructor to therclcpp::Time(int64_t nanoseconds, ...)
constructorCloses #2507.