首先看一下教程:
http://wiki.ros.org/openni_launch/Tutorials/BagRecordingPlayback
知道了rosbag如何进行使用记录深度数据
但是按照以上教程记录下来的bag file还是很大
于是看了别人写的launch file
摘抄自spencer_people_tracking
可以看到解压缩,rosbag info 以下别人的bag file
topics:
/spencer/sensors/rgbd_front_top/depth/camera_info 720 msgs : sensor_msgs/CameraInfo
/spencer/sensors/rgbd_front_top/depth/image_raw/compressedDepth 720 msgs : sensor_msgs/CompressedImage
/spencer/sensors/rgbd_front_top/rgb/camera_info 691 msgs : sensor_msgs/CameraInfo
/spencer/sensors/rgbd_front_top/rgb/image_raw/compressed 691 msgs : sensor_msgs/CompressedImage
发现记录的都是压缩格式的深度图,和彩色图
于是需要解压缩
别人的uncompress_rgbd.launch
发现用到了image_transport
于是去看
http://wiki.ros.org/image_transport
和
http://wiki.ros.org/image_transport_plugins
下面是本文采用的launch file