ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

record kinect data

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

JunJun gravatar image

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

gvdhoorn gravatar image

hello

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). https://docs.google.com/uc?id=0B46akL...

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
0

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

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"/>
    </node>
  </group>

Record:

$ 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

cheers

edit flag offensive delete link more

Question Tools

1 follower

Stats

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

Seen: 1,558 times

Last updated: Nov 09 '16