ROS Bag
ROS bag is used to record ROS messages and afterwards they can be played. This is very useful to record ROS messages published by robot’s sensors in a real test and later this data can be played without a need to perform another real test. Hence, this is particularly useful when the robot programming needs frequent modification/improvement (with reduced need to repeat real tests).
For example, in a real test of a mobile robot, the position and velocity of the robot’s travel (published by the whee odometry node) as well as the sensors’ data (IMU data, GPS data, camera’s RGB images, camera’s depth images, LiDAR data, etc) can be recorded by using ROS bag. Afterwards, the identical robot’s travel can be repeated without a need to perform another real test. While playing the recorded ROS bag data, the localization algorithm, the SLAM algorithm, the object detection algorithm, etc, can be modified for improvement/refinement.
If the recorded data is large, there is also a ROS bag function to compress the large recorded data which later can be extracted.
The complete list of ROS bag commands can be found here: http://wiki.ros.org/rosbag/Commandline