Repository navigation
LRS-1181: Make TF tests robust to split /tf_static publishing - #3535
Merged
Nir-Az merged 2 commits intoJul 2, 2026
Merged
Conversation
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.
Overview: Fixes the intermittently-failing
test_camera_test_tf_dynandtest_camera_test_tf_prefix("didn't get any tf data"), tracked in LRS-1181.Root cause
/tf_staticis a latched topic, and the node resets its static broadcaster on (re)publish (tfs.cpp: restartStaticTransformBroadcaster), so a subscriber can capture a partial first message. The tests usedpop_first_chunk('/tf_static')and validated only that single message in isolation (can_transform, 3 ms) — so when the first captured message didn't contain thelink→depth_frameedge, the lookup returned nothing. It's timing-dependent, hence flaky under CI load. The dynamic/tfchecks were unaffected because each/tfmessage republishes the full set.Fix (test-only)
Added
check_static_transform_data()to the test base class, which aggregates the transforms from all received/tf_staticmessages into one buffer before checking. The two affected tests now use it;/tfchecks are unchanged.Validation
Built and ran on the ROS 2 Humble CI job — the fix branch passed the TF tests on 3 consecutive runs (14/0/5), while the unfixed
ros2-developmentbaseline failed the same test in between.Files:
test/utils/pytest_rs_utils.py(+helper),test/live_camera/test_camera_tf_tests.py(twoprocess_datamethods). +19/−6.🤖 Generated by AI