0
$\begingroup$

Rosanswers logo

I am using fuerte on Ubuntu 12.04 with a Kinect. I have noted that openni_launch works only the first time. When it works, on the terminal I have:

roslaunch openni_launch openni.launch  
[...]   
[ INFO] [1342603480.398058817]: Initializing nodelet with 6 worker threads.  
[ERROR] [1342603484.926529464]: Tried to advertise a service that is already advertised in this node [/camera/depth_registered/image_rect_raw/compressed/set_parameters]  
[ERROR] [1342603484.943879879]: Tried to advertise a service that is already advertised in this node [/camera/depth_registered/image_rect_raw/theora/set_parameters]  
[ INFO] [1342603487.444944913]: Number devices connected: 1  
[ INFO] [1342603487.445153962]: 1. device on bus 002:06 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364A09534141A'  
[ INFO] [1342603487.446153737]: Searching for device with index = 1  
[ INFO] [1342603487.520744291]: Opened 'Xbox NUI Camera' on bus 2:6 with serial number 'A00364A09534141A'  
[ INFO] [1342603487.556152646]: rgb_frame_id = '/camera_rgb_optical_frame'   
[ INFO] [1342603487.556216539]: depth_frame_id= '/camera_depth_optical_frame'   
[ WARN] [1342603487.563057732]: Camera calibration file /home/ale/.ros/camera_info/rgb_A00364A09534141A.yaml not found.  
[ WARN] [1342603487.563112210]: Using default parameters for RGB camera calibration.  [ WARN] [1342603487.563158568]: Camera calibration file /home/ale/.ros/camera_info/depth_A00364A09534141A.yaml not found.  
[ WARN] [1342603487.563200355]: Using default parameters for IR camera calibration.

Despite the errors it works. If I close the program and I restart openni_launch, I have:

[...]

[ERROR] [1342602671.015884628]: Tried to advertise a service that is already advertised in this node [/camera/depth_registered/image_rect_raw/compressed/set_parameters]                       
[ERROR] [1342602671.031949234]: Tried to advertise a service that is already advertised in this node [/camera/depth_registered/image_rect_raw/theora/set_parameters]                       
[ INFO] [1342602678.285143378]: Number devices connected: 1           
[ INFO] [1342602678.285292312]: 1. device on bus 002:11 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364A09534141A'     
[ INFO] [1342602678.286667631]: Searching for device with index = 1 
nodelet: /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.              
[camera_nodelet_manager-2] process has died [pid 14263, exit code -6, cmd /opt/ros /fuerte/stacks/nodelet_core/nodelet/bin/nodelet manager __name:=camera_nodelet_manager __log:=/home/ale/.ros/log/8292bcc6-d0b8-11e1-b766-c860005fdc27/camera_nodelet_manager-2.log].
log file: /home/ale/.ros/log/8292bcc6-d0b8-11e1-b766-c860005fdc27/camera_nodelet_manager-2*.log

The line "Initializing nodelet with 6 worker threads." is missing and the program crashes. In this case, if I use some programs from libfreenect such as "cppview" or "tiltdemo", kinect works. The only thing that I can do to reuse openni is to restart the pc! Maybe it is a sort of ros initialization problem, I do not know. I noted also that the first time, openni_launch takes some seconds more to start up, it waits a little bit more on the line:

*Checking log directory for disk usage. This may take awhile.                 
Press Ctrl-C to interrupt*

Someone can help me?


Originally posted by rastaxe on ROS Answers with karma: 620 on 2012-07-18

Post score: 2


Original comments

Comment by joq on 2012-07-18:
Sounds like the driver is getting hung and not shutting down. Can you tell if that node is still running after the first invocation?

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Ok, I found the problem. It seems that openni does not shut down properly. The XnSensorServer program still runs. If I kill the process then openni opens Kinect properly. I found other posts about that on pcl and openNI forum, so I think that it would be useful to add this tip to the wiki. Thanks joq for the suggestion.


Originally posted by rastaxe with karma: 620 on 2012-07-18

This answer was ACCEPTED on the original site

Post score: 5


Original comments

Comment by jbohren on 2012-07-23:
Here's a ticket to keep track of this: https://kforge.ros.org/openni/trac/ticket/55

Comment by I Heart Robotics on 2012-08-14:
Hack attached to ticket

Comment by jbohren on 2012-08-14:
And here's another hack, that you can add to a kinect launchfile: https://bitbucket.org/jbohren/xnsensorserver-hack/src

Comment by thebyohazard on 2012-10-11:
There are quite a few other threads discussing this same issue in case that helps the ticket: threadA and threadB

$\endgroup$
0
$\begingroup$

Rosanswers logo

The only answer I found that worked for this was to run:

killall -s 9 XnSensorServer

before you rerun the openni_launch - this still does not solve all the other warnings but it does help not having to restart your entire system to get it running again..


Originally posted by kleinash with karma: 56 on 2012-10-11

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

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