ROS2 bridge: stamp message headers/TF with sim time from each message's time_stamp - #194
Closed
andrewjong wants to merge 1 commit into
Closed
ROS2 bridge: stamp message headers/TF with sim time from each message's time_stamp#194andrewjong wants to merge 1 commit into
andrewjong wants to merge 1 commit into
Conversation
Sensor and pose handlers previously stamped ROS headers with the bridge's wall clock at receive time, discarding the sim-clock time_stamp every Project AirSim message carries. That broke exact RGB/depth/pose sync downstream (ApproximateTimeSynchronizer saw network jitter) and made header stamps inconsistent with the /clock topic. Prefer the message's time_stamp (sim nanos) when present; fall back to wall clock. TF broadcasts reuse the owning message's stamp. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
Withdrawing this per discussion in #177 — deferring the clock/timing area to #182 and the planned sim-published clock topic. We'll keep carrying this header-stamping commit on our fork (castacks/ProjectAirSim, branch |
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.
About
Split out of #177 per review. One commit: the ROS2 C++ bridge stamps sensor/pose message headers (and TF broadcasts) from each message's own sim
time_stampfield instead of the bridge's wall clock at receive time. Previously an RGB/depth pair rendered on the same sim tick received two different header stamps offset by network jitter, which breaksmessage_filterstime synchronization downstream and makes header stamps inconsistent with the/clocktopic the bridge itself publishes.Relationship to the planned sim-published clock topic (and to #182's
/clockfix): complementary rather than competing. A native Project AirSim clock topic that the bridge forwards is the right design for/clockpublication (replacing today'sGetSimTimepolling), but per-message header stamps should come from each sample's own acquisition time regardless of how/clockis delivered — that is what this PR wires up, and it stays correct unchanged once the native clock topic lands. Happy to rebase/adapt this on top of that work when it exists.How Has This Been Tested?
Linux (Ubuntu 22.04), Blocks + custom UE 5.7.4 environments, ROS 2 Humble, camera + non-physics robot scenes. Before: RGB/depth pairs from the same sim tick differed by network-jitter-sized offsets and drifted from
/clock. After: pairs from the same tick carry identical stamps (verified with an exact-time pairing downstream), consistent with/clock; an RGB-D mapping pipeline consuming the bridge has run extended sessions on these stamps, including recording and replaying sim-time rosbags.Screenshots and videos (if appropriate):
N/A — behavioral fix; evidence described above.
🤖 Generated with Claude Code