首先看教程
http://wiki.ros.org/openni_launch/Tutorials/BagRecordingPlayback
http://wiki.ros.org/Bags
http://wiki.ros.org/rosbag/Commandline
如何记录tf
https://answers.ros.org/question/189776/created-tf-listener-how-to-rosbag/
如何解压缩
<launch>
<arg name="sensor_name"/>
<group ns="/spencer/sensors/$(arg sensor_name)">
<node name="republish_rgb" pkg="image_transport" type="republish" args="compressed in:=rgb_recorded/image_color raw out:=rgb/image_raw"/>
<node name="republish_depth" pkg="image_transport" type="republish" args="compressedDepth in:=depth_recorded/image_raw raw out:=depth/image_raw"/>
</group>
</launch>
首先找一个能够不用sudo的文件夹rosbag会在这个文件夹创建bag文件