ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

OpenNI driver wont start sometimes

asked 2013-04-10 02:12:52 -0600

liborw gravatar image

Hi,

I have problem with the OpenNI driver openni_node. Sometime it dies with the following error:

$ rosrun openni_camera openni_node _device_id:=1@0
[ INFO] [1365593984.497957554]: Initializing nodelet with 4 worker threads.
terminate called after throwing an instance of 'openni_wrapper::OpenNIException'
  what():  unsigned int openni_wrapper::OpenNIDriver::updateDeviceList() @ /tmp/buildd/ros-fuerte-openni-camera-1.8.6/debian/ros-fuerte-openni-camera/opt/ros/fuerte/stacks/openni_camera/src/openni_driver.cpp @ 125 : enumerating image nodes failed. Reason: One or more of the following nodes could not be enumerated:

Image: PrimeSense/SensorV2/5.1.2.1: Failed to set USB interface!

Aborted

I have changed the nodelet to node and add respam="true" in the openni.launch, so eventually it will start normally. But that doesn't fix the error.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2013-04-10 03:58:01 -0600

updated 2013-04-10 13:11:57 -0600

In my experience, there can be several different reasons why the Kinect would not start. First would be that there are still processes running that did not shutdown properly. Try using a command like ps aux |grep Xn to see if there are any processes running that may prevent a startup. If so, use kill -9 [PID] to kill them. (I don't think this is your problem, but I'm putting it here for completeness.)

Sometimes I experience problems with the Linux USB hotplugging module. Unplugging the Kinect from the computer and then running the command sudo service udev reload will often allow the Kinect to start. I have had to run this command so many times that I have an alias bound for it.

Recently on one of the computers in our lab (none of the others), we were getting the same error that you were when we tried to launch the Kinect. Looking at dmesg revealed that ehci_hcd kernel support was having fatal errors. In newer versions of linux kernels, this is not a module, but rather part of the main kernel. So I wrote a bash script that looks like

echo -n "0000:00:1a.0" | tee /sys/bus/pci/drivers/ehci_hcd/unbind
echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci_hcd/unbind
echo -n "0000:00:1a.0" | tee /sys/bus/pci/drivers/ehci_hcd/bind
echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci_hcd/bind

gave it executable permissions, and put it on the PATH. When we were getting your error, this script fixed the problem. Note that your device numbers (xxxx:xx:xx.x) may be slightly different. I think you can find your device numbers in /sys/bus/usb/devices/. You'll need to use sudo on the script.

edit flag offensive delete link more

Comments

hi, i tried to use the method you teach. it worked last time, but for this time, i kept getting the error message chao 2869 0.0 0.0 13592 940 pts/0 S+ 14:17 0:00 grep --color=auto Xn chao@chao-LIFEBOOK-AH532:~$ kill -9 2869 bash: kill: (2869) - No such process do you know what's wrong with this?

chao gravatar image chao  ( 2013-12-29 18:20:06 -0600 )edit

Your message is a little hard to read, but it seems like you are misinterpreting the output of `ps` and `grep`. In your example, the PID 2869 is the PID of the grep process that was searching for the XnSensorServer process. You cannot kill it because it has already completed.

jarvisschultz gravatar image jarvisschultz  ( 2013-12-31 12:15:49 -0600 )edit

My apologies, i did try to use 'enter' to make a new line. Guess it doesn't work here. Yea, i realized that i can't kill it because the process doesn't exist in the first place. Have solved my problem by reinstall openni packages. Anyway, thanks a lot :) Happy new year!!

chao gravatar image chao  ( 2013-12-31 14:23:56 -0600 )edit

Thank you for the answer! I was using an Asus Xtion Pro and suddenly it won't connect anymore. I typed "lsusb -v | grep PrimeSense" and it got stuck there. So I tried your commands: "sudo service udev reload" and it worked again!

simbaforrest gravatar image simbaforrest  ( 2014-04-27 09:32:00 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-04-10 02:12:52 -0600

Seen: 2,932 times

Last updated: Apr 10 '13