Skip to Content
ROS Programming: Building Powerful Robots
book

ROS Programming: Building Powerful Robots

by Anil Mahtani, Luis Sanchez, Enrique Fernandez, Aaron Martinez, Lentin Joseph
March 2018
Intermediate to advanced content levelIntermediate to advanced
1396 pages
42h 14m
English
Packt Publishing
Content preview from ROS Programming: Building Powerful Robots

Playing back a bag file

Now that we have a bag file recorded, we can use it to play back all the messages for the topics contained in it; note that we need roscore running and nothing else. We will move to the folder in which the bag file is located (there are two examples in the bag folder of this chapter's tutorials) and run this command:

    $ rosbag play 2014-07-01-22-54-34.bag
  

Hopefully, rosbag will produce the following output:

    [ INFO] [1404248314.594700096]: Opening 2014-07-01-22-54-34.bag
    
    Waiting 0.2 seconds after advertising topics... done.
    
    Hit space to toggle paused, or 's' to step.
     [RUNNING]  Bag Time: 1404248078.757944   Duration: 2.801764 / 39.999515
  

In the terminal in which the bag file is being played, we can pause (hit spacebar ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming Robots with ROS

Programming Robots with ROS

Morgan Quigley, Brian Gerkey, William D. Smart
Machine Learning Design Patterns

Machine Learning Design Patterns

Valliappa Lakshmanan, Sara Robinson, Michael Munn

Publisher Resources

ISBN: 9781788627436Supplemental Content