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

Kinect crashes on invoking command "rosbag record -a"

asked 2012-08-11 01:27:07 -0500

Karan gravatar image

updated 2016-10-24 09:00:44 -0500

ngrennan gravatar image

I initially had a problem of kinect not starting up again from the following command "roslaunch openni_launch openni.launch" after it had crashed once.

To that problem i found a solution to kill XnSensorServer first and then use the above command again. The problem solved without any conflicts.

Now the weird error that has cropped up is that when i use "rosbag record -a" (when all images supplied by kinect are viewed in Image_viewer) the images hang and kinect driver crashes producing the following error.

Error [1344683523.942576821]: Cannot stream RGB and IR at the same time. Streaming RGB only. OpenCV Error: Image step is wrong () in cvInitMatHeader, file /tmp/buildd/ros-fuerte-opencv2-2.4.2-0precise-20120704-1846/modules/core/src/array.cpp, line 162 terminate called after throwing an instance of 'cv::Exception' what(): /tmp/buildd/ros-fuerte-opencv2-2.4.2-0precise-20120704-1846/modules/core/src/array.cpp:162: error: (-13) in function cvInitMatHeader

What can be the possible solution.?? Should i record a subset recording only Rgb or Ir at a time ?? Does the solution talked about in start of msg has to do something with this?? (XnSensorServer)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-08-12 07:49:26 -0500

As the error message says, the driver can't publish both RGB and IR images at the same time. rosbag record -a tries to subscribe to ALL advertised topics, thus asking the kinect driver for both RGB and IR, which it can't do. It doesn't seem like the right behavior is for the driver to crash, as you're seeing, but I'm not sure what the right thing for it to do would be.

The solution for now is to specify all the topics you want rather than using -a. On a side note, using -a with the kinect would produce huge bag files very quickly, and your computer probably wouldn't be able to keep up anyway.

edit flag offensive delete link more


Thanks i tried using rosbag with depth and image. it worked fine.

Karan gravatar image Karan  ( 2012-08-12 20:27:17 -0500 )edit

answered 2012-08-11 01:58:18 -0500

gpsinghsandhu gravatar image

Please follow this question it might help Image step is wrong () in cvInitMatHeader

edit flag offensive delete link more


i guess it is more about whether it can stream rgb and ir at the same time..Is it??

Karan gravatar image Karan  ( 2012-08-11 03:59:27 -0500 )edit

Question Tools


Asked: 2012-08-11 01:27:07 -0500

Seen: 596 times

Last updated: Aug 12 '12