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

Re-add Clock::sleep_until #1814

Merged
merged 16 commits into from
Nov 5, 2021
Merged

Re-add Clock::sleep_until #1814

merged 16 commits into from
Nov 5, 2021

Commits on Nov 3, 2021

  1. Revert "Revert "Add Clock::sleep_until method (#1748)" (#1793)"

    This reverts commit d04319a.
    
    Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
    sloretz committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    4f49e11 View commit details
    Browse the repository at this point in the history
  2. Context, Shutdown Callback, Condition Var per call

    The `Clock` doesn't have enough information to know which Context should
    wake it on shutdown, so this adds a Context as an argument to
    sleep_until().
    
    Since the context is per call, the shutdown callback is also registered
    per call and cannot be stored on impl_.
    
    The condition_variable is also unique per call to reduce spurious
    wakeups when multiple threads sleep on the same clock.
    
    Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
    sloretz committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    2b7043d View commit details
    Browse the repository at this point in the history
  3. Throw if until has wrong clock type

    Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
    sloretz committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    ae1e4b7 View commit details
    Browse the repository at this point in the history
  4. unnecessary newline

    Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
    sloretz committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    c772f8c View commit details
    Browse the repository at this point in the history
  5. Shorten line

    Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
    sloretz committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    a9fbfdd View commit details
    Browse the repository at this point in the history
  6. Fix time jump thresholds and add ROS time test

    Use -1 and 1 thresholds because 0 and 0 is supposed to disable the
    callbacks
    
    Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
    sloretz committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    02c7d35 View commit details
    Browse the repository at this point in the history
  7. Shorten line

    Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
    sloretz committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    c3de0e7 View commit details
    Browse the repository at this point in the history
  8. rclcpp::ok() -> context->is_valid()

    Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
    sloretz committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    216dc74 View commit details
    Browse the repository at this point in the history
  9. No pre-jump handler instead of noop handler

    Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
    sloretz committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    4714a8a View commit details
    Browse the repository at this point in the history
  10. If ros_time_is_active errors, let it throw

    Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
    sloretz committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    92aa699 View commit details
    Browse the repository at this point in the history
  11. Get time source change from callback to avoid race if ROS time toggle…

    …d quickly
    
    Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
    sloretz committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    3b5db75 View commit details
    Browse the repository at this point in the history
  12. Fix threshold and no pre-jump callback

    Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
    sloretz committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    54f7421 View commit details
    Browse the repository at this point in the history
  13. Use RCUTILS_MS_TO_NS macro

    Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
    sloretz committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    1eb79dc View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2021

  1. Explicit cast for duration to system time

    Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
    sloretz committed Nov 4, 2021
    Configuration menu
    Copy the full SHA
    3122c35 View commit details
    Browse the repository at this point in the history
  2. Throws at the end of docblock

    Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
    sloretz committed Nov 4, 2021
    Configuration menu
    Copy the full SHA
    27b3668 View commit details
    Browse the repository at this point in the history
  3. Add tests for invalid and non-global contexts

    Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
    sloretz committed Nov 4, 2021
    Configuration menu
    Copy the full SHA
    0e7af6e View commit details
    Browse the repository at this point in the history