-
Notifications
You must be signed in to change notification settings - Fork 450
Add rclcpp::RosTime #2084
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
Add rclcpp::RosTime #2084
Conversation
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
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.
overall lgtm, but this leads me to think we also would want to SystemTime
and SteadyTime
accordingly?
I'll also point out the somewhat related #1373 , which aims to do a similar thing for the |
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Should we use a templated class? |
@sloretz was there anything else needed here? |
I don't have time to follow up on this one, so I'll close it for now. |
This adds a class
rclcpp::RosTime
, which inherits fromrclcpp::Time
. The value it adds is that the clock type can only beRCL_ROS_TIME
. This prevents exceptions due to comparisons with default constructed objects. It can also be used to make it clear an API only acceptsRCL_ROS_TIME
.For motivation see: