Improve tf2_ros::MessageFilter test reliability#929
Open
mjcarroll wants to merge 2 commits intoros2:rollingfrom
Open
Improve tf2_ros::MessageFilter test reliability#929mjcarroll wants to merge 2 commits intoros2:rollingfrom
mjcarroll wants to merge 2 commits intoros2:rollingfrom
Conversation
1. Use unique node names for each test case to avoid discovery collisions on high-load CI systems. 2. Synchronize on transform availability before starting the message loop. This ensures that the TransformListener has received the static transforms. 3. Use a more robust execution model by increasing the spin frequency and duration during the test loop. 4. Ensure the same clock instance is used for messages and the buffer. Fixes ros2#846 Assisted-by: Gemini CLI:2.0-Flash
Member
Author
|
@ahcorde the test itself is actually deprecated... I suppose we could just remove it entirely |
ahcorde
approved these changes
Apr 28, 2026
Member
Author
|
Pulls: #929 |
Assisted-by: Gemini CLI:2.0-Flash
Contributor
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.
Description
This PR addresses flaky timeouts and message drops in
tf2_ros::MessageFiltertests, specifically identifying the root causes for geometry2#846.Improvements
buffer.canTransformbefore starting the main message publication loop. This ensures that theTransformListenerhas actually received the static transforms from the broadcaster.spin_some() + sleep(1s)loop with a higher-frequency spin/sleep cycle. This ensures that internaltf2_ros::Buffertimers andMessageFiltercallbacks are processed promptly, preventing the message queue (depth 10) from filling up under high load.tf2buffer.Fixes #846
Is this user-facing behavior change?
No, test-only changes.
Did you use Generative AI?
Yes. Gemini CLI:2.0-Flash [web_fetch, run_shell_command, replace, git, gh]