Add scheduled play/resume support to Rosbag2 player for distributed replay#2376
Open
MichaelOrlov wants to merge 2 commits intorollingfrom
Open
Add scheduled play/resume support to Rosbag2 player for distributed replay#2376MichaelOrlov wants to merge 2 commits intorollingfrom
MichaelOrlov wants to merge 2 commits intorollingfrom
Conversation
- Extend Play.srv with start_time and update Resume.srv for time-based resume requests, implement future-scheduled play and resume handling in rosbag2_transport::Player, and add/adjust player mocks and service tests to cover the new scheduling behavior in composable and service-based playback. Co-authored-by: ap-apexai <anup.patel@apex.ai> Signed-off-by: Michael Orlov <morlovmr@gmail.com>
- Update the playback services section to describe player-side time-based play and resume behavior, including the new Play.start_time field, future scheduling semantics, node clock usage, and player-specific return behavior for resume, seek, and stop. Signed-off-by: Michael Orlov <morlovmr@gmail.com>
b24ef4e to
24e13de
Compare
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 adds time-based playback control to
rosbag2_transport::Playerso playback can be started or resumed at a specific future time, which is useful for synchronizing multiple player instances.It updates
Play.srvwith a newstart_timefield for scheduledPlayrequests, and updatesResume.srvto support time-based resume requests. Inplayer.cpp, the player now executes play/resume immediately when the requested time is zero or in the past, or schedules the action for later when a future node time is provided. The player-sideResumeservice also validates mode support and rejects unsupportedpublish_time,receive_time, andtracking_topic_nameusage.The test updates cover the new behavior end-to-end. test_play_services.cpp adds coverage for scheduled future play and resume execution, including expected return codes. test_composable_player.cpp and mock_player.hpp have been updated to support the updated service interface and behavior.
Is this user-facing behavior change?
Yes.
-
Playservice call now includes a new fieldstart_timefor scheduling future playback operations. If set to zero, it starts playback immediately.-
Resumeservice call uses existing fieldresume_timefor scheduling. If set to zero, resumes immediately.Did you use Generative AI?
Yes. Codex gpt-5.4 was used to help updating README.md file and Copilot gpt-4.2 was used to help with tests.
Additional Information
It has updates in the API
Play.srvservice definition and can't be backported.