Ask Your Question
0

can just subscribe once to openni topics

asked 2012-10-08 11:51:10 -0500

dinamex gravatar image

updated 2014-01-28 17:13:53 -0500

ngrennan gravatar image

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.

edit retag flag offensive close merge delete

Comments

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/

yigit gravatar imageyigit ( 2012-10-09 12:14:25 -0500 )edit

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)

dinamex gravatar imagedinamex ( 2012-10-10 03:31:15 -0500 )edit

Okay, sorry I got it wrong.

yigit gravatar imageyigit ( 2012-10-10 03:47:12 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-10-12 05:38:20 -0500

dinamex gravatar image

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
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-10-08 11:51:10 -0500

Seen: 893 times

Last updated: Oct 12 '12