Skip to content

Enhance integration testing guide with WaitForTopics feature - #7076

Open
LastStarDust wants to merge 1 commit into
ros2:rollingfrom
LastStarDust:integration-testing
Open

Enhance integration testing guide with WaitForTopics feature#7076
LastStarDust wants to merge 1 commit into
ros2:rollingfrom
LastStarDust:integration-testing

Conversation

@LastStarDust

@LastStarDust LastStarDust commented Aug 20, 2026

Copy link
Copy Markdown

Updated integration testing documentation to use the new WaitForTopics feature

Description

This PR addresses issue #5249 by updating the integration testing tutorial to showcase the WaitForTopics utility from launch_testing_ros.

  • Replaced manual subscriber logic with WaitForTopics: The original example used manual rclpy.create_subscription() and spin_once() loops. The updated tutorial demonstrates the WaitForTopics approach, which is cleaner and serves as a better learning example for users.

  • No more magic numbers: Removed the problematic 0.5-second TimerAction before ReadyToTest(). Tests now use event-driven waiting via PublisherEventCallbacks instead of "sleep" hacks. Moreover, it checks for specific velocity conditions.

  • Added trigger callback example: Included an example of the trigger function, demonstrating how to publish control messages and verify robot response using the new trigger parameter of WaitForTopics. This was already proposed in the original document.

Did you use Generative AI?

Not for the source code and only partially for the text. But I double-checked each line of text.

Additional Information

  • All code examples have been tested in this sample repository.

  • I added a new section on Python-only package setup.

Updated integration testing documentation to include new utilities and clarify test setup.

Signed-off-by: Giorgio Pintaudi <pintaudi@axelspace.com>
@asymingt

Copy link
Copy Markdown
Member

@Shru can you take a look at this please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants