-
Notifications
You must be signed in to change notification settings - Fork 163
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 sleep_for
and sleep_until
for rcl_clock_t
as per "Clock and Time" design
#898
Comments
this sounds reasonable to me, though it does seem to be really common use case. i wonder there's been similar discussion before... 🤔 |
Related ticket: ros2/rclcpp#465 Also a long discussion in ros2/rclcpp#1248. TL;DR, I think the consensus is that we should have a "sleep_until" function that operates on a ROS time object, though the discussion was focused on rclcpp. I don't know how much development overhead is involved in abstracting this feature to |
I really only need it in C++ right now for this project, but I'm generally inclined to want |
I just want to be able to sleep for x number of time :( |
Sleeping is thread specific, and threads are language specific, so I think it makes sense to implement sleep methods in the language specific client libraries instead of This has been implemented in rclcpp - see the related ticket ros2/rclcpp#1730 |
This was implemented in both rclcpp and rclpy, and it seems like we are not going to do anything further in rcl itself. So closing this out. |
Feature request
Feature description
The design article Clock and Time specifies that the ROS clock API is to have
sleep_for
andsleep_until
methods. These are not yet present (that I know of).Related to ros2/rosbag2#99
For context - it seems that this feature would be the best option to use for controlling rosbag2 playback time, instead of using
std::this_thread::sleep_until
in the message playback loop, so that it is more possible to handle time source control such as pausing and alteration of playback speed - as well as listening to an external time source like Gazebo.Implementation considerations
Likely the existing timer code gives us most of the tools we need to implement this, it uses time sources correctly.
The text was updated successfully, but these errors were encountered: