The objective of this tutorial is -
1) To install OpenNI, Nite (drivers that help getting data from the kinect) in Ubuntu 12.04.
2) To set up Processing and SimpleOpenNI ( OpenNI and Nite wrapper for Processing ) using which you can get started with Kinect coding.
What you need?
Kinect with usb cable and a computer with Ubuntu installed. It is not recommended to run Ubuntu as a wubi installer from Windows when working with Kinect. Better install Ubuntu in a new partition and run it.
1) Installing OpenNI and NITE
1) I highly recommend installing 32 bit versions of all even if yours is a 64 bit system. Download OpenNI_Nite installer package from here. eg: I downloaded OpenNI_NITE_Installer-Linux32-0.27.zip . Now extract the zip file to a folder.
Tip:
Instead of navigating to different folders using cd command you can enable Open in terminal option when you right click in any folder. To get that open terminal and type:
sudo apt-get install nautilus-open-terminal
After installing type : killall nautilus && nautilus in terminal to activate the change immediately.
2) Navigate to OpenNI-Bin-Dev-Linux-x86-v1.5.4.0 folder ( version could have changed if you are seeing at a later point in time) in the unzipped folder using terminal and type the following command to install -
sudo ./install.sh
3) Navigate to NITE-Bin-Dev-Linux-x86-v1.5.2.21 folder ( version could have changed if you are seeing at a later point in time) in the unzipped folder and type the following command to install -
sudo ./install.sh
4) Navigate to Kinect folder and then to Sensor-Bin-Linux-x86-v5.1.2.1 folder ( version could have changed if you are seeing at a later point in time) in the unzipped folder and type the following command to install -
sudo ./install.sh
Testing the installation:
Connect the kinect and ensure that the green Led on it is blinking. Now, navigate to the unzipped folder OpenNI_NITE_Installer-Linux32-0.27. Then to OpenNI-Bin-Dev-Linux-x86-v1.5.4.0 -> Samples -> Bin -> x86-Release and try out the following sample in the the terminal.
./NiViewer
The output with my Kinect:
2) Setting up Processing and SimpleOpenNI for Kinect coding
1)Download processing for Linux from here.
2) Install OpenJDK Java7 Runtime by searching it from Ubuntu Software center.
3) Download simpleOpenNI from here and extract it. I downloaded SimpleOpenNI-0.27.zip which works for all platforms.
4) Unzip the downloaded processing folder, navigate to it and run ./processing in terminal.

When started for the first time Processing asks where to place the sketchbook folder. I let it place in the default folder. It’s path in my computer is /home/sanmarino/sketchbook
Create a folder named libraries inside Sketchbook folder and place the unzipped folder SimpleOpenNI from step3 inside it.
5) Restart processing again . Now you should be able to see SimpleOpenNI as shown under.
Now we are done with installation.
Running processing Demo
In the processing menu under File ->Examples-> SimpleOpenNI(scroll down to see) ->OpenNI you will find DepthImage. Double click on it to bring up the code. Make sure that the kinect is properly connected. Now run the code by pressing the run button (that is right below the File menu). You should be able to see the output.
Now if you want to systematically learn kinect coding using processing and SimpleOpenNI you can follow this book called Making things See. If you just want to try out few other examples , the codes from the book are available here.
Feel free to comment if any of the steps are unclear and if you face any problem. I shall be glad to offer the help I can.
Errors in my case:
error while loading shared libraries: libglut.so.3: cannot open shared object file: No such file or directory
Installing freeglut3 from Ubuntu software center fixed it.




I follow your instructions….but not run when i run NiViewer sample
this error has occured
……………………………………………………………………………………
One or more of the following nodes could not be enumerated:
Device: PrimeSense/SensorKinect/5.1.2.1: The device is not connected!
Device: PrimeSense/SensorV2/5.1.2.1: The device is not connected!
Device: PrimeSense/SensorKinect/5.1.2.1: The device is not connected!
Device: PrimeSense/SensorV2/5.1.2.1: The device is not connected!
Press any key to continue . . .
Hi Piyush,
Sorry for the delayed response.
Try $ sudo rmmod gspca_kinect
This used to happen when I used ubuntu as wubi installed inside windows. Also which version of ubuntu are u using?
Cheers,
Ramsri
Hi Ramsri,
I am having the same problem, I did same what you mentioned, my OS ubuntu 12.04 32 bit, single partition with only ubuntu. And my kinect is blinking green.
ipl-ubuntu1@iplubuntu1-OptiPlex-GX620:~/Downloads/OpenNI_NITE_Installer-Linux32-0.27/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Samples/Bin/x86-Release$ ./NiViewer
One or more of the following nodes could not be enumerated:
Device: PrimeSense/SensorV2/5.1.2.1: The device is not connected!
any solution?
Thank you
Hi Sridhar,
Please see if you can find solution in these threads -
https://groups.google.com/forum/?fromgroups=#!topic/openni-dev/hISHuIV7tmg
https://groups.google.com/forum/?fromgroups=#!msg/openni-dev/h0F6kYCNigs/BR6iqqFhSJ8J
I shall let you know if I find any specific solution to your problem. Keep us posted if u get this solved.
cheers,
Ramsri
Thank you for your links, it worked now.
installed unstable version from
http://www.openni.org/Downloads/OpenNIModules.aspx
OpenNI-Bin-Dev-Linux-x86-v1.5.4.0
and
to install SensorKinect:
git clone https://github.com/avin2/SensorKinect.git
cd SensorKinect
git checkout unstable
cd Platform/Linux/CreateRedist
./RedistMaker
cd ../Redist/*
sudo ./install.sh
problem solved!
Thanks for updating , Sridhar.
thank you all for shared this.
I’m a little bit ashamed to ask this, but I can’t solve this problem.
Where do I place this SensorKinect folder?.
Do you re-downloaded the OpenNI-Bin-Dev-Linux-x86-v1.5.4.0?
I still get this response:
…
Device: PrimeSense/SensorKinect/5.1.2.1: The device is not connected!
Thanks again.
Cheers
It works!!
I solved this problem…
thanks anyway!!
Sorry for the delay. Glad to know that you solved it!
hey man, i tried your method here but I still got the same error message. Does this method still work for now? Thanks!
Hi Ramsri,
Thanks for the detailed description setting up Kinect with Processing. What would change in this process if you use the Xtion Pro Life?
Thanks
Hi Arasch,
Please look in linux installation section here. http://code.google.com/p/simple-openni/wiki/Installation It should be clear.
Cheers,
Ramsri
Hi Ramsri
./NiViewer is working but when i run the example in processing it gives me the follwoing error ….
—
Can’t load SimpleOpenNI library (SimpleOpenNI64) : java.lang.UnsatisfiedLinkError: /home/ramakrishna/processing-2.0b3/sketchbook/libraries/SimpleOpenNI/library/libSimpleOpenNI64.so: libXnVNite_1_5_2.so: wrong ELF class: ELFCLASS32
Verify if you installed SimpleOpenNI correctly.
http://code.google.com/p/simple-openni/wiki/Installation
Exception in thread “Animation Thread” java.lang.UnsatisfiedLinkError: SimpleOpenNI.SimpleOpenNIJNI.swig_module_init()V
at SimpleOpenNI.SimpleOpenNIJNI.swig_module_init(Native Method)
at SimpleOpenNI.SimpleOpenNIJNI.(SimpleOpenNIJNI.java:1575)
at SimpleOpenNI.ContextWrapper.(ContextWrapper.java:54)
at SimpleOpenNI.SimpleOpenNI.(SimpleOpenNI.java:212)
at Scene.setup(Scene.java:41)
at processing.core.PApplet.handleDraw(PApplet.java:2103)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:190)
at processing.core.PApplet.run(PApplet.java:2006)
at java.lang.Thread.run(Unknown Source)
Hi Ramakrisha,
Sorry for the really late response.
Please see if there was any problem with the version of simple openni and necessary java installation for it. I don’t seem to have much idea about the error.
Cheers,
Ramsri
it crashed proenssicg itself.Here is the weird thing: it crashed both mac and pc. I doubt that I can install both of them wrong but thanks for answering anyway It’s good to know that I seem to be the only one having this problem
You know one thing i was frustrated installing so many lib’s on same environment …it seems finally i got nice guide .. Thanks alot …Will come back to u soon…
Hey Hi,
Need your help in installing Opencv lib for processing …I googled got some way’s but it seems they are working for me ..Need your help..
Thanks in advance
Hi there,
I didn’t work with processing and opencv. So I doubt if I can be of any help to you.
Great Post!!!
Thank you !
Hello Greg, everyone,Amazing prcjoet!I was trying to get the sets of lengths of all joint-to-joint of the skeleton, and also the approximate measurements of the actual body-mass around key sections of such skeleton. If a BMI body-mass-index could be calculated from this, it would be fantastic. What do you think it is the best way to approach this?Are there any libraries/classes/functions that could help me get this kind of data?Thanks in advance for your help,Art.
awesome thank you so much
Hi Ramsi,
I’ve tried to install SensoreKinect module but when i type
./RedistMaker
i get this error:
/usr/bin/ld: cannot find -lOpenNI
collect2: error: ld returned 1 exit status
Can you help me?
Thanks in advance
Brando
Sorry I don’t have much info about it to help you !
Would appreciate if you can update in case if you have solved it already.
Thanks,
Ramsri
Hi, im trying to install on linux, however when i do./install, it says copying folders …ok create folder ok.. however i get an error
registering module ‘libnimMockNodes.so’…/usr/bin/niReg: 1: /usr/bin/niReg: Syntax error: word unexpected (expecting “)”)
I do not know what is wrong. i have been reading the comments on https://code.google.com/p/simple-openni/wiki/Installation and it seems other people have similar problems. I either do not see the solutions on the comments or that i have seen it but have no idea what it means
Hope to get your help.
Kelvin
HI Kelvin,
I also doesn’t seem to know the answer for your problem. Sorry about that!
Hey Ramsri:
I got the same problem with this:
Device: PrimeSense/SensorKinect/5.1.2.1: The device is not connected!
Device: PrimeSense/SensorV2/5.1.2.1: The device is not connected!
Device: PrimeSense/SensorKinect/5.1.2.1: The device is not connected!
Device: PrimeSense/SensorV2/5.1.2.1: The device is not connected!
This website http://www.openni.org/Downloads/OpenNIModules.aspx is not valid now. So I can’t find the unstable version. Where should I go or what should I do now?
Thanks!