ros2 / rclcpp

rclcpp (ROS Client Library for C++)
Apache License 2.0
514 stars 410 forks source link

Check for negative time in rclcpp::Time(int64_t nanoseconds, ...) constructor #2510

Closed sharminramli closed 2 months ago

sharminramli commented 2 months ago

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 https://github.com/ros2/rclcpp/issues/525 where time cannot be negative:

Closes https://github.com/ros2/rclcpp/issues/2507.

ahcorde commented 2 months ago
ahcorde commented 2 months ago

@clalancette can we backport this to jazzy ? or we should wait the frozen period?

clalancette commented 2 months ago

@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?

fujitatomoya commented 2 months ago

@clalancette @ahcorde IMO, this could possibly break the user application. so i would not backport this to released distros...