0
$\begingroup$

Rosanswers logo

Hi there,

I'm running ROS electric on a ARM board (which is running Ubuntu 11.10). When i use openni_launch I can just subscribe once to the published topics. After releasing the subscription I can't subscribe a second time to any of the topics (but $rostopic list still shows all of them). could it be a USB specific issue?
The initialization looks kind of weird as well (see creating image generator failed. Reason: Failed to set USB interface!)

Here the output from launching the openni node:

[ INFO] [1349729971.865694298]: Number devices connected: 1
[ INFO] [1349729971.868807096]: 1. device on bus 001:04 is a PrimeSense Device (600) from PrimeSense (1d27) with serial id ''
[ INFO] [1349729971.880312242]: Searching for device with index = 1
[ INFO] [1349729972.140444513]: No matching device found.... waiting for devices. Reason: openni_wrapper::OpenNIDevice::OpenNIDevice(xn::Context&, const xn::NodeInfo&, const xn::NodeInfo&, const xn::NodeInfo&, const xn::NodeInfo&) @ /home/panda/ros_workspace/perception_pcl/pcl/build/pcl/io/src/openni_camera/openni_device.cpp @ 98 : creating image generator failed. Reason: Failed to set USB interface!
[ INFO] [1349729975.296821860]: Number devices connected: 1
[ INFO] [1349729975.297066001]: 1. device on bus 001:04 is a PrimeSense Device (600) from PrimeSense (1d27) with serial id 'Device1'
[ INFO] [1349729975.308174419]: Searching for device with index = 1
[ INFO] [1349729975.316627802]: Opened 'PrimeSense Device' on bus 1:4 with serial number 'Device1'
[ INFO] [1349729975.437843824]: rgb_frame_id = '/camera_rgb_optical_frame' 
[ INFO] [1349729975.437965894]: depth_frame_id = '/camera_depth_optical_frame' 
[ WARN] [1349729975.455727155]: Camera calibration file /home/panda/.ros/camera_info/rgb_Device1.yaml not found.
[ WARN] [1349729975.461220328]: Camera calibration file /home/panda/.ros/camera_info/depth_Device1.yaml not found.
[ WARN] [1349729975.466744019]: Using default parameters for RGB camera calibration.
[ WARN] [1349729975.466957642]: Using default parameters for IR camera calibration.
Warning: USB events thread - failed to set priority. This might cause loss of data...

Would be great to get your ideas...


Edit: I looked into the XnUSBLinux.cpp of the openni driver (where the failure message was coming from) and I got a hint from someone from the lib_usb community that I need to detach the kernel driver with (libusb_detach_kernel_driver(handle,0)) befor claiming the device. Since I edit this file I dont get any error messages anymore but unforunatly I dont get any messages either (Topics are listed but not published). The projector is on also... So I think the device is initialized properly but there is no callback for the incoming msgs.


Originally posted by dinamex on ROS Answers with karma: 447 on 2012-10-08

Post score: 0


Original comments

Comment by yigit on 2012-10-09:
I have the same issue. Everytime I stop openni, I also need to kill XnSensorServer processes as mentioned here: http://answers.ros.org/question/42259/turtlebot-calibration-on-fuerte-still-waiting-for-scan-openni-manager-dies/

Comment by dinamex on 2012-10-10:
unfortunately, this is not comparable to my problem. Its not that I close the openni node and can't open it again. The problem is that I can't resubscribe after I close all subscriptions from the node. Thanks for the advice but there is no XnSensorServer to kill (unfortunately)

Comment by yigit on 2012-10-10:
Okay, sorry I got it wrong.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I needed to run the node as root. I don't know the exact reason why but it works now. Only thing is that after source the bashrc I see following warnings and auto-completion doesn't work.

[rospack] WARNING: cannot create rospack cache directory: Permission denied
[rospack] WARNING: cannot create rospack cache directory: Permission denied
[rospack] Unable to create temporary cache file /root/.ros/.rospack_cache.8co7EJ: Permission denied

Originally posted by dinamex with karma: 447 on 2012-10-12

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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