ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The rosbag player provides a pause_playback service of type std_srvs/SetBool.

Since the play will be started as anonymous node, the service will be available as /play_<unique_number>/pause_playback.

To pause the playback, call the service with data: true:

rosservice call /play_<unique_number>/pause_playback "data: true" 
success: True
message: "Playback is now paused"

and to un-pause, with data: false:

rosservice call /play_<unique_number>/pause_playback "data: false" 
success: True
message: "Playback is now resumed"