-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Migrate Nav2 timers & rates to use steady clocks and be sim-time-aware #6063
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
Open
tonynajjar
wants to merge
25
commits into
ros-navigation:main
Choose a base branch
from
botsandus:use-ros-time
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
8c51b3a
Refactor to use ROS clock for rate control in various components
tonynajjar f923090
lint
tonynajjar a710d62
fix test
tonynajjar 131f7ea
fix other test
tonynajjar e47e80e
Refactor LoopRate to accept a shared clock for sim-time awareness and…
tonynajjar 009d0c0
update underlay
tonynajjar c5e3dad
Refactor timer creation to use member function for consistency
tonynajjar eb23fb4
Merge remote-tracking branch 'upstream/main' into use-ros-time
tonynajjar 4c4e524
Refactor timer and rate handling across navigation2 components to use…
tonynajjar e163c86
Refactor timer usage across navigation2 components to utilize nav2::c…
tonynajjar a1ac3e6
fix tests as well
tonynajjar fba5bd6
Revert "fix tests as well"
tonynajjar 7f65c8c
Revert "Refactor timer usage across navigation2 components to utilize…
tonynajjar 597e6cb
Revert "Refactor timer and rate handling across navigation2 component…
tonynajjar 17c38d8
revert everything
tonynajjar dfadb81
Add nav2::WallRate for improved time handling across components
tonynajjar 935edb8
remove unsude includes
tonynajjar 8a7385c
fix build
tonynajjar 398de8b
fix date
tonynajjar c109d83
pr review
tonynajjar 28ce958
more wallrate conversions
tonynajjar 16b7272
convert create_timer to create_wall_timer
tonynajjar cab2842
refactor: replace create_wall_timer and WallRate with create_timer an…
tonynajjar 95090a0
store node
tonynajjar 10706e9
rename to rate
tonynajjar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
LoopRate::sleep()uses a fixed 10ms wall-clock polling interval (poll_interval) when waiting fornext_interval. This can oversleep when the requested period is <10ms (and adds up to 10ms of jitter even for slightly larger periods), which breaks the contract of sleeping untilnext_intervalfor steady-clock operation. Consider computing the wait timeout from the remaining time untilnext_interval(e.g., wait formin(poll_interval, remaining)), and only fall back to a coarse poll interval when the underlying clock is ROS/sim time.