Ask Your Question

record kinect data

asked 2016-11-07 01:26:41 -0500

JunJun gravatar image

updated 2016-11-07 02:56:13 -0500

gvdhoorn gravatar image


i have question about record kinect data.

when i record kinect data, i write command line

rosbag record /odom /camera/rgb/image_rect_color camera/depth_registered/image_raw /camera/rgb/camera_info /tf -O kinect

record is ok. but bag file is large. (5min record --> more 10GB)

but your bag file is smaller than my file.

For this demo, you will need the ROS bag demo_mapping.bag (295 MB, fixed camera TF 2016/06/28).

could u teach me how to write command line for record data.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-11-09 10:30:38 -0500

matlabbe gravatar image

In that particular demo, the images were throttled at ~10 Hz and the compressed topics were recorded:

<!-- Throttling messages -->
  <group ns="camera">
    <node pkg="nodelet" type="nodelet" name="data_throttle" args="load rtabmap_ros/data_throttle camera_nodelet_manager" output="screen">
      <param name="rate" type="double" value="10.0"/>

      <remap from="rgb/image_in"       to="rgb/image_rect_color"/>
      <remap from="depth/image_in"     to="depth_registered/image_raw"/>
      <remap from="rgb/camera_info_in" to="rgb/camera_info"/>

      <remap from="rgb/image_out"       to="/data_throttled_image"/>
      <remap from="depth/image_out"     to="/data_throttled_image_depth"/>
      <remap from="rgb/camera_info_out" to="/data_throttled_camera_info"/>


$ rosbag record /odom /data_throttled_image/compressed /data_throttled_image_depth/compressedDepth /data_throttled_camera_info /tf -O kinect

Tip 1

If you are using freenect_launch, it may be more efficient to set data_skip instead of using the data_throttle nodelet above:

$ roslaunch freenect_launch freenect.launch depth_registration:=true data_skip:=3
$ rosbag record /odom /camera/rgb/image_rect_color/compressed camera/depth_registered/image_raw/compressedDepth /camera/rgb/camera_info /tf -O kinect

Tip 2

If you don't want to save compressed images in the rosbag, you may compress to rosbag after the recording to save some space when storing it:

$ rosbag compress kinect.bag

Make sure to decompress before replaying it:

$ rosbag decompress kinect.bag
$ rosbag play --clock kinect.bag


edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-11-07 01:26:41 -0500

Seen: 938 times

Last updated: Nov 09 '16