Skip to content

Add persistent mode to ros2 bag play#2377

Open
MichaelOrlov wants to merge 3 commits intorollingfrom
morlov/add-persistent-option-to-ros2-bag-play
Open

Add persistent mode to ros2 bag play#2377
MichaelOrlov wants to merge 3 commits intorollingfrom
morlov/add-persistent-option-to-ros2-bag-play

Conversation

@MichaelOrlov
Copy link
Copy Markdown
Contributor

@MichaelOrlov MichaelOrlov commented Mar 15, 2026

Description

This PR adds a new --persistent option to ros2 bag play verb.
What changed:
• Added --persistent to the ros2 bag play CLI in play.py.
• Added end-to-end test coverage in test_rosbag2_play_end_to_end.cpp for the new player lifecycle behavior.

Is this user-facing behavior change?

Yes.
When --persistent is enabled, the player process no longer exits when playback stops, either because the bag reached the end or because playback was stopped through the Stop service call. Instead, the process remains alive until it is explicitly terminated. This makes the player usable for repeated service-driven playback sessions without restarting the ros2 bag play command.
Without --persistent, the existing behavior is unchanged: the player exits when playback stops or completes.

Did you use Generative AI?

Yes. Codex gpt-5/4 was used to help with README.md file updates.

Additional Information

Can be backported

MichaelOrlov and others added 3 commits March 14, 2026 21:58
- Also added a new test to validate persistent cli mode.

Co-authored-by: ap-apexai <anup.patel@apex.ai>
Signed-off-by: Michael Orlov <morlovmr@gmail.com>
Signed-off-by: Michael Orlov <morlovmr@gmail.com>
Signed-off-by: Michael Orlov <morlovmr@gmail.com>
@MichaelOrlov MichaelOrlov marked this pull request as ready for review March 15, 2026 05:08
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.

1 participant