Setup: Installing OpenNI and Nite - ColoradoSchoolOfMines/interface_sdk GitHub Wiki

General Setup

THE OPENNI WEBSITE HAS BEEN SHUTDOWN. PLEASE USE MICROSOFT SDK DRIVERS INSTEAD.

OpenNI (framework) and Nite (middleware) are libraries used for communicating with the Microsoft Kinect. Currently, the SDK uses OpenNI v1.5.4.0 and Nite 1.5.2.21, and both are available here. Ensure that you are using the 32-bit versions of these programs, as the Interface SDK does not currently support x64 versions.

NOTE: On Linux systems, you will also need a C compiler to properly compile the libraries for OpenNI and other drivers. We recommend using the gcc compiler (most package managers will have gcc in their repository, and a repository search will probably be the easiest way to find it). For Ubuntu-style distributions, install the "build-essential" package. Use the command sudo apt-get install build-essential to install.

Additionally, if you would like to run the OpenNI samples to verify that your installation is set up correctly (highly recommended), then install the proper version of the Kinect Sensor driver located here.

To run samples, select any of the executables in OpenNI/Samples/Bin/Release. The application NiViewer is a good starting place to check for camera functionality, and NiHandTracker can verify that hands can be successfully tracked.

If the samples run correctly, you have successfully set up your platform to use the Kinect, and you are ready to begin using the SDK.

Operating System Specific

Windows

From the OpenNI website, download and install OpenNI SDK and NITE. Make sure you install 32-bit versions of everything. Then download the driver from the github address. If you are on 32-bit Windows you may skip this next step.

64-bit Windows requires all installed drivers to be signed. The drivers from the github are not. Therefore you must reboot into a unsafe driver mode to install them. If you are running Windows 8+, you can run this command from Win+R: shutdown.exe /r /o /f /t 00, which will bring up a menu. Under advanced options will see an option to boot without driver signing. Otherwise you must hit F8 during startup and select "Disable Driver Signature Enforcement."

Now install the driver!

Linux

TODO

Arch

TODO

Ubuntu

TODO

OSX

TODO

Troubleshooting

One issue observed on Linux is if you get an error message like so:

Open failed: Failed to set USB interface!

What is happening is that another kernel module may have already claimed the usb device. So make sure that the following does not show any relevant modules:

[andrew@WhosYourDaddy ~]$ lsmod | grep gsp
gspca_kinect            4079  0 
gspca_main             23820  1 gspca_kinect
videodev              110188  3 uvcvideo,gspca_main,videobuf2_core
usbcore               177959  9 snd_usb_audio,uvcvideo,gspca_kinect,snd_usbmidi_lib,ehci_hcd,ehci_pci,gspca_main,usbhid,xhci_hcd

Notice the gspca modules. Now unload them like so:

[andrew@WhosYourDaddy ~]$ sudo modprobe -r gspca_main
[andrew@WhosYourDaddy ~]$ sudo modprobe -r gspca_kinect

On laptops (or power-conscious desktops) you may have a power management utility (such as TLP) which interferes with the Kinect's ability to register as a USB device because it draws a significant amount of power. Either blacklist the Kinect's USB ids from the power management utility or uninstalling the utility entirely.