Ask Your Question
0

Why is Kinect working but freenect.launch and openni.launch fail ?

asked 2016-09-24 19:50:10 -0600

elpidiovaldez gravatar image

I have used Kinect with my own systems for years. My installation works: Right now using Lubuntu Xenial 16.04.1 64 bit.The Kinect system is:

  • OpenNI-Bin-Dev-Linux-x64-v1.5.7.10 (built from source and patched to fix a USB problem so the Kinect motor control works)

  • Sensor-Bin-Linux-x64-v5.1.2.1

I would like to use ROS. I installed packages from Synaptic:

  • ros-kinetic-freenect-stack
  • ros-kinetic-lib-freenect

I can launch the system, but Kinect device does not connect and no data is sent to rviz.

roslaunch freenect_launch freenect.launch

I also tried installing from Synaptic:

  • ros-kinetic-openni-camera
  • ros-kinetic-openni-launch

Launching with roslaunch openni_launch openni.launch gives the following suspicious warnings:

Warning: USB events thread - failed to set priority. This might cause loss of data..

[ INFO] [1474760990.182270093]: Number devices connected: 2

[ INFO] [1474760990.283229629]: 1. device on bus 002:06 is a SensorKinect (2ae) from PrimeSense (45e) with serial id '0'

[ INFO] [1474760990.283294658]: 2. device on bus 002:06 is a SensorV2 (2ae) from PrimeSense (45e) with serial id 'A00361A13780044A'

Launching with roslaunch openni_launch openni.launch device_id:=A00361A13780044A selects the right device, but the Kinect does not connect and no data is sent to rviz.

I have uninstalled and re-installed the packages various times to no avail. Surprisingly the ROS packages do not break my own installation, as they used to in the past.

I am at a complete loss as to how to debug this. The more I read the documentation the more confused I get about the bewildering number of versions and alternative components that exist (often with very similar names). Given that I have a working Kinect interface based on openni and avin driver, what can be going wrong ? Is there a sure way to get this going from the repositories ? Could my installation be breaking the ROS installation ? Infuriatingly I believe that at the start both ROS and my installation were working simultaneously, but the something broke ROS.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-09-25 23:05:26 -0600

elpidiovaldez gravatar image

I don't want to waste anyone's time on this. I finally fixed the problem by fully removing and re-installing libfreenect-dev and libfreenect0.5 from the ubuntu repositories.

edit flag offensive delete link more

Comments

I have the same problem to read depth image from Kinect with ROS Kinetic. Could you please share steps to remove and install those libraries? Thanks in advance.

faisal gravatar image faisal  ( 2017-03-27 01:28:00 -0600 )edit
1

answered 2017-12-10 13:29:47 -0600

Totalq gravatar image

I spent several hours trying to solve that issue and finally I have found the solution (I know the topic is a little outdated, but it might be helpful for others). Which is pathetically easy :)

I am using ph4m version of SensorKinect, cause avin2 failed during building and ROS-Kinetic.

Shorter version of error I used to receive by executing roslaunch openni_launch openni.launch

...
[ INFO] [1512932358.038225148]: Initializing nodelet with 4 worker threads.
[ INFO] [1512932360.867815700]: Number devices connected: 2
[ INFO] [1512932360.968706220]: 1. device on bus 001:08 is a SensorKinect (2ae) from PrimeSense (45e) with serial id '0'
[ INFO] [1512932360.968758126]: 2. device on bus 001:08 is a SensorV2 (2ae) from PrimeSense (45e) with serial id 'B00367611818052B'
[ INFO] [1512932360.969746663]: Searching for device with index = 1
nodelet: /usr/include/boost/smart_ptr/shared_ptr.hpp:641: typename boost::detail::sp_dereference<T>::type boost::shared_ptr<T>::operator*() const [with T = xn::NodeInfo; typename boost::detail::sp_dereference<T>::type = xn::NodeInfo&]: Assertion `px != 0' failed.
[camera/camera_nodelet_manager-1] process has died [pid 6501, exit code -6, cmd /opt/ros/kinetic/lib/nodelet/nodelet manager __name:=camera_nodelet_manager __log:=/root/.ros/log/b5542c0e-dddb-11e7-b428-448a5b4484c7/camera-camera_nodelet_manager-1.log].
log file: /root/.ros/log/b5542c0e-dddb-11e7-b428-448a5b4484c7/camera-camera_nodelet_manager-1*.log
[FATAL] [1512932372.450632995]: Failed to load nodelet '/camera/disparity_registered_hw` of type `depth_image_proc/disparity` to manager `camera_nodelet_manager'
....

To fix that I went to openni.launch file and changed this: <arg name="device_id" default="#1" /> into that: <arg name="device_id" default="B00367611818052B" />, which is ID read from error message.

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

2 followers

Stats

Asked: 2016-09-24 19:50:10 -0600

Seen: 1,589 times

Last updated: Sep 25 '16