-
Notifications
You must be signed in to change notification settings - Fork 8
Record and replay Bag files in ROS
Suryansh Agarwal edited this page Oct 19, 2017
·
1 revision
Maintainers:Suryansh Agarwal, Akash Kumar Singh
- Make a directory for storing the bag files
mkdir ~/bagfiles
- Move into the directory
cd ~/bagfiles
- Run the command
rosbag record -a
. - A bag file will be created with a name that begins with the year, date, and time and the suffix .bag.
- We can get details about the bag file by the command
rosbag info <bag file>
.This will give information about the topics and the number of messages recorded.
- Run the command
rosbag record -O subset /topic1 /topic2
- This will record all the data published on the
topic1
andtopic2
and save it insubset.bag
Now for playing back the rosbag file run rosbag play <your bagfile>
NOTE: All the data recorded will be published on the specified topic.
For tutorials, click here
Moderators: Mayank Mittal, Shikher Verma, Suryansh Agarwal . AUV-IITK