This is a simple and short tutorial on how to set up Kinect for your Linux Mint 12 (It also should work fine with Ubuntu 12.04 or 12.10). For this task OpenNI Framework is going to be used. The official short description of OpenNI is :
This Tutorial will use the NITE middleware to enable skeleton tracking.
To install KInect with OpenNI and NITE please follow the next 5 steps, with your Kinect Unplugged.
Step 1 - Install Required support library
First step is to check if you have all the needed libraries, and if they are up to date.
sudo apt-get install libusb-1.0-0-dev freeglut3-dev g++
If you have a Nvidia graphics card it's recommended to have the latest drivers: Instruction here
Step 2 - Create a folder for holding the download and the installation
I recommend to create a 'kinect' in your home folder:
cd ~
mkdir kinect
Step 3 - Download the OpenNI , NITE
It's going to be necessary to download to the created folder the latest OpenNI Binary and the NITE middleware. Until the publication of this tutorial the most recent version available were :
Update 06-JUN-2012*
If you are using Ubuntu 12.04 make sure to have the following versions (I tried Openni version 2.1.0, not working, but 1.5.4 works!):
-
OpenNI UNstable build for Ubuntu 12.04- - v1.5.4 https://github.com/OpenNI/OpenNI/tree/unstable
-
PrimeSense and NITE UNstable build for Ubuntu 12.04 - v1.5.2.21 https://github.com/PrimeSense/Sensor/tree/unstable
Step 4 - Extract the downloaded zip to the desired folder
Now Extract The files and Rename the folders:
Your 'kinect' folder should have 3 zipped files.
cd ~/Kinect/OpenNI-unstable/Platform/Linux/CreateRedist$ ls
sudo ./RedistMaker
cd ../Redist
sudo ./install.sh
cd ~/Kinect/SensorKinect/Platform/Linux/CreateRedist
sudo ./RedistMaker
cd ../Redist/
sudo ./install.sh
cd ~/kinect/NiTE-2.0.0/
sudo ./install.sh
Step 5 - Test it!
cd ~/Kinect/OpenNI-unstable/Platform/Linux/Redist/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Samples/Bin/x86-Release
./Sample-NiSimpleViewer
Bug Fix:
" Failed to set USB interface "
this module allows Kinect to be used as a standard camera, so you can record video from it with the applications you're used to.
Thus, it conflicts with OpenNI when trying to access the Kinect.
And then blacklisting to avoid it to be auto-loaded on boot:
sudo modprobe -r gspca_kinect
sudo sh -c 'echo "blacklist gspca_kinect" > /etc/modprobe.d/blacklist-kinect.conf'
Reference:
http://igorbarbosa.com/articles/how-to-install-kin-in-linux-mint-12-ubuntu/
https://groups.google.com/forum/?fromgroups=#!topic/openni-dev/LZpcyCfh9UE
http://adriangerardcooke.com/kinect-on-ubuntu-12-04/
http://www.20papercups.net/programming/kinect-on-ubuntu-with-openni/