Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

rosbag: start player in paused state#2086

Merged
jacobperron merged 1 commit intoros:noetic-develfrom
fevb:fix/start-rosbag-player-paused
Dec 10, 2020
Merged

rosbag: start player in paused state#2086
jacobperron merged 1 commit intoros:noetic-develfrom
fevb:fix/start-rosbag-player-paused

Conversation

@fevb
Copy link
Copy Markdown
Contributor

@fevb fevb commented Oct 30, 2020

  • Initializes the rosbag player correctly in paused mode in case the options.start_paused parameter is set to true.

Otherwise one could run into timing issues because the paused_ member variable was only set at a later stage when publishing messages from the bag:

paused_ = options_.start_paused;

For instance: if one would set options.start_paused = true and immediately call the ~/pause_playback service, the service call could return an error stating that the bag was already being replayed.

Copy link
Copy Markdown
Contributor

@jacobperron jacobperron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to reproduce the race described, but the change looks okay to me. Thanks!

@jacobperron jacobperron merged commit a825290 into ros:noetic-devel Dec 10, 2020
@fevb fevb deleted the fix/start-rosbag-player-paused branch December 11, 2020 05:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants