can just subscribe once to openni topics
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.
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/
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)
Okay, sorry I got it wrong.