Add playback progress output to rosbag2 player - #2454
Open
umiklos wants to merge 1 commit into
Open
Conversation
MichaelOrlov
left a comment
Contributor
There was a problem hiding this comment.
This PR has ABI breaking changes in the rosbag2_transport/include/rosbag2_transport/player.hpp. Unfortunately we can't merge it to Humble.
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 ROS1-style playback progress output to
ros2 bag play.During playback, the player now prints the current bag time and the elapsed playback duration relative to the total bag duration. The progress output is also refreshed smoothly during playback so that the status line updates even when messages are sparse.
In addition to the player-side output, the playback wait behavior was adjusted so that the progress line can refresh periodically instead of only updating on message publication boundaries.
Is this user-facing behavior change?
Yes.
Users running
ros2 bag playwill now see playback progress in the terminal, including the current bag time and elapsed duration versus total duration, similar to the feedback available in ROS1. This makes it easier to understand where playback currently is during debugging, validation, and dataset inspection.Did you use Generative AI?
Yes.
GitHub Copilot using GPT-5.4 was used to help draft and implement parts of the code changes, validation steps, and PR text.
Additional Information
This change is implemented in the common playback path, so it is storage-backend agnostic and is expected to apply to playback using both MCAP and SQLite3/DB3 bags.
Validated locally with:
source setup.bash colcon build --packages-select rosbag2_cpp rosbag2_transport rosbag2_py --cmake-args -DBUILD_TESTING=OFF