Jump to: navigation, search

OpenNI and NITE on linux

Openni-nite-linux-64bits.png

This page is an adapation of Kinect on Ubuntu with OpenNI.

Developped on a Linux Mint 17.2 Rafaela, Cinnamon 64bits.

Prerequisites

If you don't have any jre installed, make this first. Java needs to be available,

$ sudo apt-get install openjdk-7-jdk

These are required.

$ sudo apt-get install git build-essential python libusb-1.0-0-dev freeglut3-dev doxygen graphviz mono-complete

OpenNI 1.5.4

$ git clone https://github.com/OpenNI/OpenNI.git
$ cd OpenNI
$ git checkout Unstable-1.5.4.0
$ cd Platform/Linux/CreateRedist
$ chmod +x RedistMaker
$ ./RedistMaker
$ cd ../Redist/OpenNI-Bin-Dev-Linux-[xxx]  (where [xxx] is your architecture and this particular OpenNI release)
$ sudo ./install.sh

Kinect Sensor Module

$ git clone https://github.com/avin2/SensorKinect
$ cd SensorKinect
$ cd Platform/Linux/CreateRedist
$ chmod +x RedistMaker
$ ./RedistMaker
$ cd ../Redist/Sensor-Bin-Linux-[xxx] (where [xxx] is your architecture and this particular OpenNI release)
$ chmod +x install.sh
$ sudo ./install.sh

Test the OpenNI Samples

$ cd OpenNI/Platform/Linux-x86/Bin/Release
$ ./Sample-NiSimpleViewer

If error: Open failed: Failed to set USB interface!, use this trick:

$ sudo modprobe -r gspca_kinect 
$ sudo modprobe -r gspca_main

source: Getting up and running with the Kinect in Ubuntu 12.04

if error: Open failed: Xiron OS failed to wait on event!, do this:

$ sudo chmod +x /usr/bin/XnSensorServer

source: Open Failed: Xiron OS got an event timeout!

It should work at this point. If not, no need to go furher...

Install NITE 1.5

Download the right version from openni.org

$ sudo ./install.sh

Now, time to test skeletons extraction! Back to the main folder:

$ cd OpenNI/Platform/Linux/Bin/x64-Release/
$ ./Sample-NiUserTracker

You should now see your user with the skeleton drawn on it.

If you get the error Error opening database/parameters file. when you launch an example with skeletons, adapt the user rights on the folder /usr/etc/primesense/

$ sudo chmod 0777 -R /usr/etc/primesense/

ofxOpenNI

If a compilation error involving /usr/include/ni/XnStatus.h occurs, you have to edit the file and change all XnStatus Status to XnStatus s (for instance).

Resources