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

Use a "steady clock" when measuring time differences #427

Merged
merged 3 commits into from
Sep 1, 2022

Conversation

AndyZe
Copy link
Contributor

@AndyZe AndyZe commented Aug 29, 2022

I've found out recently the difference between the default rclcpp clock (a system clock) versus a steady clock. The steady clock is monotonically increasing, meaning it can't go backward in time. So it is more suitable for measuring time differences.

Making this type of change fixed the flakiness of some of our MoveIt CI tests, so I hope it helps here.

Reference reading: https://design.ros2.org/articles/clock_and_time.html#time-abstractions

Copy link
Member

@bmagyar bmagyar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good catch, thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants