Ask Your Question
2

bag a kinect for more than 30 seconds

asked 2011-07-13 01:53:32 -0600

updated 2016-10-24 09:03:03 -0600

ngrennan gravatar image

When I use openni_camera to broadcast and then bag the kinect, at ~ 30 seconds the recording chokes for seconds, and large gaps are present in rxbag inspection.

I am running Ubuntu 10.04 with 16G of RAM and a quad core. This behavior was also seen on a machine running 10.10, with SSD hard drive, an i7 processor, and 16G RAM.

Have others experienced this phenomenon? I am wondering if it isn't a Linux issue...

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
6

answered 2011-07-13 02:35:06 -0600

updated 2011-07-13 04:06:42 -0600

I ran into similar issues when trying to record Kinect data. I'm not sure what's causing it - I assumed that the data was just too much. 10 seconds of data ended up in the gigabyte range if I recall correctly.

I ended up switching to the openni_camera_unstable driver, which is nodelet based. You can record the data at the image level, before it gets expanded to a 3D PointCloud beast.

The launch files (when I last looked) were a little confusing. I created a working set of record / playback launch files for that driver, which I can share if there's interest.

EDIT:

Here are some launch files for the unstable driver. They are mostly based on the existing launch files, but I've broken them up to allow modular recording:

http://robotics.ccny.cuny.edu/data/kinect/launch_modular/

You need to place the launch_modular folder in the openni_camera_unstable package.

There are 3 top-level files you can use directly:

  • openni_live.launch: launches the driver, publishing live data
  • openni_record.launch: launches the driver, publishing live data, and recording part of the data
  • openni_play.launch: launches rosbag, processes the data and publishes it.

openni_record assumes you have ~/ros/bags directory already created. Bags are placed there. To play the correct bag, you need to edit the include/openni_play_bag.launch file:

<arg name="BAG_NAME" value="kinect.bag"/>

with the name of the bag you want, assuming it's in the ~ros/bags directory.

edit flag offensive delete link more

Comments

Thanks, I will test the new driver later today and I welcome any additions you might have made (I'm sure many others would as well).
phil0stine gravatar imagephil0stine ( 2011-07-13 03:10:04 -0600 )edit
Thanks Ivan, your launch files worked out of the box. The issue is resolved, although I still wonder what the root of the problem was.
phil0stine gravatar imagephil0stine ( 2011-07-14 02:37:31 -0600 )edit
3

answered 2011-07-14 10:32:56 -0600

sglaser gravatar image

Recording the point cloud from the Kinect requires more bandwidth than your average hard drive provides.

The Kinect produces an XYZRGB point cloud with around 300k points, where each point takes 32 bytes. At 30Hz, that produces about 281 Mb / second. Your average hard disk only supports 100-200 Mb/sec, so the Kinect point cloud just cannot be written quickly enough.

Ivan's solution is correct: You should write the raw disparity and rgb images to disk and only expand them to point clouds during playback.

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

Stats

Asked: 2011-07-13 01:53:32 -0600

Seen: 1,092 times

Last updated: Jul 14 '11