0
$\begingroup$

Rosanswers logo

I recently updated all my machines, and cannot seem to run the openni driver with the kinect anymore (tested across 2 different fuerte/precise machines and 2 different kinects). openni_camera is currently crashing for me:

lab@pharos:/opt/ros/fuerte/stacks/openni_camera$ rosrun openni_camera openni_node 
[ INFO] [1348261427.280555252]: Initializing nodelet with 4 worker threads.
[ INFO] [1348261428.529849944]: Number devices connected: 1
[ INFO] [1348261428.530277093]: 1. device on bus 001:22 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id 'B00361606879048B'
[ WARN] [1348261428.544275381]: ~device_id is not set! Using first device.
openni_node: /usr/include/boost/smart_ptr/shared_ptr.hpp:412: boost::shared_ptr<T>::reference boost::shared_ptr<T>::operator*() const [with T = xn::NodeInfo, boost::shared_ptr<T>::reference = xn::NodeInfo&]: Assertion `px != 0' failed.
Aborted (core dumped)

The gdb output on the deb binary has a few inconsistencies, so I built openni_camera from source after setting the build type to "Debug". The output from gdb:

lab@pharos:~/ros/openni_camera$ gdb bin/openni_node 
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /home/lab/ros/openni_camera/bin/openni_node...done.
(gdb) run
Starting program: /home/lab/ros/openni_camera/bin/openni_node 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff0e8e700 (LWP 10296)]
[New Thread 0x7fffebfff700 (LWP 10297)]
[New Thread 0x7fffeb7fe700 (LWP 10298)]
[New Thread 0x7fffeaffd700 (LWP 10299)]
[New Thread 0x7fffea7fc700 (LWP 10300)]
[New Thread 0x7fffe9ffb700 (LWP 10301)]
[New Thread 0x7fffe97fa700 (LWP 10302)]
[New Thread 0x7fffe8ff9700 (LWP 10303)]
[New Thread 0x7fffd3fff700 (LWP 10304)]
[ INFO] [1348263432.503205958]: Initializing nodelet with 4 worker threads.
[New Thread 0x7fffd37fe700 (LWP 10305)]
[New Thread 0x7fffd24bb700 (LWP 10306)]
[ INFO] [1348263436.242376429]: Number devices connected: 1
[ INFO] [1348263436.242814823]: 1. device on bus 001:26 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id 'B00361606879048B'
[ WARN] [1348263436.253906179]: ~device_id is not set! Using first device.
openni_node: /usr/include/boost/smart_ptr/shared_ptr.hpp:412: boost::shared_ptr<T>::reference boost::shared_ptr<T>::operator*() const [with T = xn::NodeInfo, boost::shared_ptr<T>::reference = xn::NodeInfo&]: Assertion `px != 0' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffd24bb700 (LWP 10306)]
0x00007ffff6d7b445 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007ffff6d7b445 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff6d7ebab in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff6d7410e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff6d741b2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x00007fffe8121535 in boost::shared_ptr<xn::NodeInfo>::operator* (this=0x7fffb801f2c8)
    at /usr/include/boost/smart_ptr/shared_ptr.hpp:412
#5  0x00007fffe811ddb2 in openni_wrapper::OpenNIDriver::getDeviceByIndex (this=0x7ffff068d220, index=0)
    at /home/lab/ros/openni_camera/src/openni_driver.cpp:249
#6  0x00007ffff04173d1 in openni_camera::DriverNodelet::setupDevice (this=0x700610)
    at /home/lab/ros/openni_camera/src/nodelets/driver.cpp:237
#7  0x00007ffff0414bd4 in openni_camera::DriverNodelet::onInitImpl (this=0x700610)
    at /home/lab/ros/openni_camera/src/nodelets/driver.cpp:105
#8  0x00007ffff0448586 in boost::_mfi::mf0<void, openni_camera::DriverNodelet>::operator() (
    this=0x6b2618, p=0x700610) at /usr/include/boost/bind/mem_fn_template.hpp:49
#9  0x00007ffff0451ca2 in boost::_bi::list1<boost::_bi::value<openni_camera::DriverNodelet*> >::operator()<boost::_mfi::mf0<void, openni_camera::DriverNodelet>, boost::_bi::list0> (this=0x6b2628, f=..., 
    a=...) at /usr/include/boost/bind/bind.hpp:253
#10 0x00007ffff0451313 in boost::_bi::bind_t<void, boost::_mfi::mf0<void, openni_camera::DriverNodelet>, boost::_bi::list1<boost::_bi::value<openni_camera::DriverNodelet*> > >::operator() (this=0x6b2618)
    at /usr/include/boost/bind/bind_template.hpp:20
#11 0x00007ffff044f37e in boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf0<void, openni_camera::DriverNodelet>, boost::_bi::list1<boost::_bi::value<openni_camera::DriverNodelet*> > > >::run (this=0x6b2490) at /usr/include/boost/thread/detail/thread.hpp:61
#12 0x00007ffff58abce9 in thread_proxy () from /usr/lib/libboost_thread.so.1.46.1
#13 0x00007ffff7109e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#14 0x00007ffff6e374bd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#15 0x0000000000000000 in ?? ()
(gdb)

After rebooting my machine, the driver runs without the initial crash, but does not produce images. It eventually crashes out with the following error:

piyushk@piyushk-laptop:~$ rosrun openni_camera openni_node 
[ INFO] [1348262753.880621511]: Initializing nodelet with 8 worker threads.
[ INFO] [1348262756.251401621]: Number devices connected: 1
[ INFO] [1348262756.251497539]: 1. device on bus 002:06 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id 'B00366701979044B'
[ WARN] [1348262756.252439882]: ~device_id is not set! Using first device.
[ INFO] [1348262756.288645524]: Opened 'Xbox NUI Camera' on bus 2:6 with serial number 'B00366701979044B'
[ INFO] [1348262756.306995702]: rgb_frame_id = '/openni_rgb_optical_frame' 
[ INFO] [1348262756.307046716]: depth_frame_id = '/openni_depth_optical_frame' 
[ WARN] [1348262756.309505321]: Camera calibration file /home/piyushk/.ros/camera_info/rgb_B00366701979044B.yaml not found.
[ WARN] [1348262756.309545697]: Using default parameters for RGB camera calibration.
[ WARN] [1348262756.309590416]: Camera calibration file /home/piyushk/.ros/camera_info/depth_B00366701979044B.yaml not found.
[ WARN] [1348262756.309620744]: Using default parameters for IR camera calibration.
terminate called after throwing an instance of 'openni_wrapper::OpenNIException'
  what():  virtual void openni_wrapper::OpenNIDevice::startImageStream() @ /tmp/buildd/ros-fuerte-openni-camera-1.8.0/debian/ros-fuerte-openni-camera/opt/ros/fuerte/stacks/openni_camera/src/openni_device.cpp @ 224 : starting image stream failed. Reason: Xiron OS got an event timeout!
Aborted (core dumped)

In subsequent runs, the node crashes out with the first error.

The openni_camera code has not changed in a while, and I was able to run this setup correctly last week. Any advice will be appreciated.


Originally posted by piyushk on ROS Answers with karma: 2871 on 2012-09-21

Post score: 2


Original comments

Comment by Dan Lazewatsky on 2012-09-21:
It's been my experience that the openni driver has been quite unreliable lately. AFAIK it currently doesn't have a maintainer.

Comment by dejanpan on 2012-09-21:
Did you try running it out of the http://ros.org/wiki/openni_launch pkg?

Comment by piyushk on 2012-09-22:
@dejanpan: Yes, the nodelet manager crashes out with the above error.

Comment by piyushk on 2012-09-22:
@Dan Lazewatsky: Thanks for the info. I think that my experience has been same as well. Unfortunately I don't have enough time to dig deeper into the error. If this stack is not being maintained, i'll test out one of the freenect ones still available.

Comment by dejanpan on 2012-09-22:
Can you please post which Ubuntu and ROS version are you using and which repo/revision of the openni_camera driver are you using and I will try to dig into. In the meantime, try it with the stable but deprecated driver: http://ros.org/wiki/openni_camera_deprecated

Comment by piyushk on 2012-09-24:
@dejanpan: Ubuntu 12.04 + Fuerte. The openni_camera trunk and the current ubuntu deb (1.8.0) produce this error. However @Martin Peris seems to have found the correct thread below.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

This seems the same issue as in this question: openni_launch not working in fuerte + ubuntu precise 12.04

Though, it looks like it is not yet fully solved.


Originally posted by Martin Peris with karma: 5625 on 2012-09-23

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by piyushk on 2012-09-24:
@Martin Peris: Thanks for finding this thread! I have little idea why I am seeing the error now, as one of the machines I used is always kept updated.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.