Ask Your Question
0

Libfreenect won't install properly on 12.04 Hydro

asked 2014-10-19 17:33:06 -0500

I am trying to use libfreenect with a kinect. The output when I run

roslaunch freenect_launch freenect-xyz.launch

is

[ INFO] [1413756004.829132537]: Number devices connected: 1
[ INFO] [1413756004.829250239]: 1. device on bus 000:00 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id '0000000000000000'
[ INFO] [1413756004.831311636]: Searching for device with index = 1
[ INFO] [1413756004.843299915]: No matching device found.... waiting for devices. Reason: [ERROR] Unable to open specified kinect

The next command I ran was

rosrun libfreenect glview.

This returned

[rosrun] Couldn't find executable named glview below /opt/ros/hydro/share/libfreenect

So I tried

alex@alex-OptiPlex-GX620:~$ rospack find libfreenect
/opt/ros/hydro/share/libfreenect
alex@alex-OptiPlex-GX620:~$ cd /
alex@alex-OptiPlex-GX620:/$ cd /opt/ros/hydro/share/libfreenect
alex@alex-OptiPlex-GX620:/opt/ros/hydro/share/libfreenect$ ls
package.xml

From my understanding this means the proper packages that should come with libfreenect have not been installed. I have tried re-installing with no success. I have run

sudo apt-get update
sudo apt-get dist-upgrade

I have made sure to run

sudo modprobe -r gspca_kinect
echo 'blacklist gspca_kinect' | sudo tee -a /etc/modprobe.d/blacklist.conf

The kinect is being connected by USB 2.0. The result of lsusb is

Bus 001 Device 002: ID 045e:02c2 Microsoft Corp. 
Bus 001 Device 005: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN
Bus 002 Device 002: ID 046d:c018 Logitech, Inc. Optical Wheel Mouse
Bus 003 Device 002: ID 413c:2105 Dell Computer Corp. Model L100 Keyboard
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 007: ID 045e:02ad Microsoft Corp. Xbox NUI Audio
Bus 001 Device 008: ID 045e:02ae Microsoft Corp. Xbox NUI Camera
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-10-21 12:42:15 -0500

The issue is the model of the Kinect itself. Version 1473 is currently experiencing issues with the freenect library. Furthur discussion here: https://github.com/ros-drivers/freenect_stack/issues/12

edit flag offensive delete link more
2

answered 2014-10-19 18:27:16 -0500

ahendrix gravatar image

dpkg -L ros-hydro-libfreenect shows that glview is installed into /opt/ros/hydro/bin/glview

Since this is the ROS bin directory (which is added to your PATH), this means that you should be able to run glview without rosrun:

. /opt/ros/hydro/setup.bash
glview
edit flag offensive delete link more

Comments

Yes, that does work. It outputs

Kinect camera test
Number of devices found: 1
Could not open device

Do you have any tips why it is unable to open the device?

See my first example as well

kinect_guy gravatar image kinect_guy  ( 2014-10-20 14:41:13 -0500 )edit

The permissions for your device are probably not set properly. The Ubuntu packages include a udev rule that should set up the permissions properly; try sudo apt-get install freenect

ahendrix gravatar image ahendrix  ( 2014-10-20 15:01:50 -0500 )edit

Your tip has led me to try some other methods, none of which have worked. I tried

sudo chmod o+w /dev/bus/usb/001/010 /001/010 being the bus and device of XBox NUI Camera.

I also tried nano /etc/udev/rules.d/70-persistent-net.rules as replacing "SYSFS" with "ATTR" should help.

kinect_guy gravatar image kinect_guy  ( 2014-10-20 16:04:20 -0500 )edit

The above directory looks like (for the USB device):

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:21:2f:30:79:c4", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

PS if it wasn't clear I did try your suggestion.

kinect_guy gravatar image kinect_guy  ( 2014-10-20 16:08:16 -0500 )edit

no... that's the udev rule that ensures consistent naming of your wireless interface. You probably shouldn't mess with it.

ahendrix gravatar image ahendrix  ( 2014-10-20 16:47:37 -0500 )edit

http://openkinect.org/wiki/Getting_St... describes how to set up the udev rules manually.

ahendrix gravatar image ahendrix  ( 2014-10-20 16:49:22 -0500 )edit

This does not work either. glview still cannot open the device. I tried restarting, ensured the proper kernel is blacklisted and the normal user directory was correct. Any other ideas are appreciated.

Is there a way to manually change the kinect to index = 1 like freenect_launch is looking for?

kinect_guy gravatar image kinect_guy  ( 2014-10-20 17:06:02 -0500 )edit

What are the current permissions on the USB device? Try ls -l /dev/bus/usb/001/

ahendrix gravatar image ahendrix  ( 2014-10-20 17:29:30 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-10-19 17:33:06 -0500

Seen: 1,016 times

Last updated: Oct 21 '14