ROS openni - OpenCV error

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ROS openni - OpenCV error

mcormier
Hi,
 
I want to use Kinect with ROS and so I use the openni-kinect stack to use the Kinect. Unfortunately, running the existing launch file with the following command creates an error, the log being present at the end of this email.
roslaunch openni_camera openni_node.launch 
 
I tried this with ROS diamondback, ROS electric, Ubuntu 10.10, Ubuntu 11.04. I also tried both the Kinect sensor and the Asus Xtion that I just received. 
 
Can someone help me solve this issue? 
 
Thank you for your help,
Morgan

[ INFO] [1329704212.460963739]: [/kinect/openni_node1] Number devices connected: 1
[ INFO] [1329704212.461698398]: [/kinect/openni_node1] 1. device on bus 001:08 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id 'B00366702454044B'
[ INFO] [1329704212.472454148]: [/kinect/openni_node1] searching for device with index = 1
[ INFO] [1329704212.570633384]: [/kinect/openni_node1] Opened 'Xbox NUI Camera' on bus 1:8 with serial number 'B00366702454044B'
[ INFO] [1329704212.629899939]: rgb_frame_id = '/openni_rgb_optical_frame' 
[ INFO] [1329704212.638459664]: depth_frame_id = '/openni_depth_optical_frame' 
OpenCV Error: Image step is wrong () in cvInitMatHeader, file /tmp/buildd/libopencv-2.3.1+svn6514+branch23/modules/core/src/array.cpp, line 162
terminate called after throwing an instance of 'cv::Exception'
  what():  /tmp/buildd/libopencv-2.3.1+svn6514+branch23/modules/core/src/array.cpp:162: error: (-13)  in function cvInitMatHeader
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Ros-kinect] ROS openni - OpenCV error

Bence Magyar
Hello, 

from the looks of those exceptions messages I figure you have a custom compiled latest version of OpenCV.
That could be the case that the kinect node is linked against the OpenCV binaries in the ros repo.

Try a clean install of ros-electric-desktop-full and you'll be fine.

If it's not acceptable: build the openni stack from source (see the wiki how to do it) so linking with OpenCV will be done properly but I really don't recommend this step. 

--Bence

2012/2/21 mcormier <[hidden email]>
Hi,
 
I want to use Kinect with ROS and so I use the openni-kinect stack to use the Kinect. Unfortunately, running the existing launch file with the following command creates an error, the log being present at the end of this email.
roslaunch openni_camera openni_node.launch 
 
I tried this with ROS diamondback, ROS electric, Ubuntu 10.10, Ubuntu 11.04. I also tried both the Kinect sensor and the Asus Xtion that I just received. 
 
Can someone help me solve this issue? 
 
Thank you for your help,
Morgan

[ INFO] [1329704212.460963739]: [/kinect/openni_node1] Number devices connected: 1
[ INFO] [1329704212.461698398]: [/kinect/openni_node1] 1. device on bus 001:08 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id 'B00366702454044B'
[ INFO] [1329704212.472454148]: [/kinect/openni_node1] searching for device with index = 1
[ INFO] [1329704212.570633384]: [/kinect/openni_node1] Opened 'Xbox NUI Camera' on bus 1:8 with serial number 'B00366702454044B'
[ INFO] [1329704212.629899939]: rgb_frame_id = '/openni_rgb_optical_frame' 
[ INFO] [1329704212.638459664]: depth_frame_id = '/openni_depth_optical_frame' 
OpenCV Error: Image step is wrong () in cvInitMatHeader, file /tmp/buildd/libopencv-2.3.1+svn6514+branch23/modules/core/src/array.cpp, line 162
terminate called after throwing an instance of 'cv::Exception'
  what():  /tmp/buildd/libopencv-2.3.1+svn6514+branch23/modules/core/src/array.cpp:162: error: (-13)  in function cvInitMatHeader


View this message in context: ROS openni - OpenCV error
Sent from the Kinect with ROS mailing list archive at Nabble.com.

_______________________________________________
Ros-kinect mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-kinect



_______________________________________________
Ros-kinect mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-kinect
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Ros-kinect] ROS openni - OpenCV error

mcormier
Hi Bence

Bence Magyar wrote
from the looks of those exceptions messages I figure you have a custom compiled latest version of OpenCV.
That could be the case that the kinect node is linked against the OpenCV binaries in the ros repo.

Try a clean install of ros-electric-desktop-full and you'll be fine.
I already tried this. I installed Ubuntu 11.10, I previously had Ubuntu 10.10 and so I had a fresh installation. I installed ros by installing ros-electric-desktop-full, and that is how I got this error.
I already tried to compile from the source when I still had the 10.10.

I will try again but fear that the issue will be the same.

Thank you,
Morgan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Ros-kinect] ROS openni - OpenCV error

Bence Magyar
Hello Morgan,

sorry but I'll have to disappoint you. I migrated from diamondback to electric this morning so I actually did ros-electric-desktop-full and it's working. I was able to view the registered depth map from the kinect though at first I had some problems with libtinyxml but a simple reinstall solved it.

I'm running Ubuntu 10.04 32bit.

Regards,
Bence

2012/2/22 mcormier <[hidden email]>
Hi Bence


Bence Magyar wrote
>
> from the looks of those exceptions messages I figure you have a custom
> compiled latest version of OpenCV.
> That could be the case that the kinect node is linked against the OpenCV
> binaries in the ros repo.
>
> Try a clean install of ros-electric-desktop-full and you'll be fine.
>

I already tried this. I installed Ubuntu 11.10, I previously had Ubuntu
10.10 and so I had a fresh installation. I installed ros by installing
ros-electric-desktop-full, and that is how I got this error.
I already tried to compile from the source when I still had the 10.10.

I will try again but fear that the issue will be the same.

Thank you,
Morgan

--
View this message in context: http://kinect-with-ros.976505.n3.nabble.com/ROS-openni-OpenCV-error-tp3764743p3766060.html
Sent from the Kinect with ROS mailing list archive at Nabble.com.
_______________________________________________
Ros-kinect mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-kinect


_______________________________________________
Ros-kinect mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-kinect
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Ros-kinect] ROS openni - OpenCV error

mcormier
Bence Magyar wrote
Hello Morgan,

sorry but I'll have to disappoint you. I migrated from diamondback to
electric this morning so I actually did ros-electric-desktop-full and it's
working. I was able to view the registered depth map from the kinect though
at first I had some problems with libtinyxml but a simple reinstall solved
it.

I'm running Ubuntu 10.04 32bit.
Hi Bence,

Thank you for your response. The OS I used was a 64bits version. I will try to install a 32bits version and see if it works like that.

Morgan
owh
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Ros-kinect] ROS openni - OpenCV error

owh
I don't have an answer but I like to point out that it might not be 64-bit problem.  I can use the kinect in ros in this configuration: ubuntu 11.10 x64bit, ros-electric, openni_kinect stack.

I just started learning this stuff a few weeks ago.  
I did the ros-electric installation using: "sudo apt-get install ros-electric-desktop-full".  
I installed the openni_kinect stack using sudo apt-get: "sudo apt-get install ros-electric-openni-kinect".  
I launch kinect using: "roslaunch openni_launch openni.launch".
Loading...