Open
Conversation
sr_utilities_common/scripts/sr_utilities_common/republish_trajectory_v2.py
Outdated
Show resolved
Hide resolved
sr_utilities_common/scripts/sr_utilities_common/republish_trajectory_v2.py
Outdated
Show resolved
Hide resolved
dg-shadow
requested changes
Jan 14, 2026
sr_utilities_common/scripts/sr_utilities_common/republish_trajectory_v2.py
Outdated
Show resolved
Hide resolved
sr_utilities_common/scripts/sr_utilities_common/republish_trajectory_v2.py
Outdated
Show resolved
Hide resolved
sr_utilities_common/scripts/sr_utilities_common/republish_trajectory_v2.py
Show resolved
Hide resolved
sr_utilities_common/scripts/sr_utilities_common/republish_trajectory_v2.py
Outdated
Show resolved
Hide resolved
chrisw-shadow
approved these changes
Jan 19, 2026
dg-shadow
requested changes
Jan 19, 2026
sr_utilities_common/scripts/sr_utilities_common/republish_trajectory_v2.py
Show resolved
Hide resolved
dg-shadow
reviewed
Jan 28, 2026
|
|
||
| def spin(self): | ||
| while not rospy.is_shutdown(): | ||
| if self._topics_first_msg_timestamp is None: |
Contributor
There was a problem hiding this comment.
if this is true, the sleep will never get hit, so the loop will still just run at full speed.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Proposed changes
Improved the republish_trajectory tool to be more robust to variance in message publishing timings.
The tool is intended to republish the trajectory command msgs being played from a bag file with the timestamp of all commands shifted to be in the present.
The timestamps are shifted to be 10ms in the future from when they are republished to ensure they never arrive late at the trajectory controller.
The old version of the republish node used the time of msg receipt as the new timestamp for all trajectory commands; a method which works but is susceptible to timing variance.
The new version of the node records the msg timestamp and receipt time of the very first message and uses those values to consistently time-shift all msgs. The command msgs are shifted an additional 10ms into the future to ensure they always arrive at the trajectory controller before they are meant to be executed.
Checklist
Before posting a PR ensure that from each of the below categories AT LEAST ONE BOX HAS BEEN CHECKED. If more than one category is applicable then more can be checked. Also ensure that the proposed changes have been filled out with relevant information for reviewers.
Tests
Documentation