Kinect: Difference between revisions

From ISRWiki
Jump to navigation Jump to search
m (add a note stating obsolescence of this page)
 
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
As of March 2011, there are two software possibilities to use the Microsoft Kinect:
'''Note: as of 2014, this page is obsolete. Refer to active projects such as http://structure.io/openni or [http://pointclouds.org/ PCL] instead.'''


# [http://openkinect.org/ OpenKinect]/[https://github.com/OpenKinect/libfreenect libfreenect]: fully open source but still lacking some functionality
This page lists some software instructions for RGBD cameras such as the Microsoft Kinect and Asus Xtion PRO Live.
# [http://www.openni.org/ OpenNI] framework + Prime Sensor drivers + NITE motion tracking middleware binaries (skeleton tracking, gesture recognition etc.). The last component is closed source, while the first two ones are open source
 
Available software interfaces to the RGBD cameras:
 
# [http://openkinect.org/ OpenKinect]/[https://github.com/OpenKinect/libfreenect libfreenect]: fully open source, still lacking some functionality
# [http://www.openni.org/ OpenNI] framework + Prime Sensor drivers + NiTE motion tracking middleware binaries (skeleton tracking, gesture recognition etc.). The last component is closed source, while the first two ones are open source. The OpenNI/NiTE combination is endorsed by the [http://www.ros.org ROS] community and is the most popular
# [http://research.microsoft.com/en-us/um/redmond/projects/kinectsdk/ Kinect for Windows SDK]
 
Here is an explanation of the first two: http://stackoverflow.com/questions/6086981/what-is-the-difference-between-openni-and-openkinect


= OpenKinect/libfreenect =
= OpenKinect/libfreenect =
Line 8: Line 15:
See http://openkinect.org/
See http://openkinect.org/


== [http://yarp0.svn.sf.net/viewvc/yarp0/trunk/yarp2/ YARP] wrapper ==
== YARP wrapper ==


See <code>$YARP_ROOT/src/modules/kinect/README.txt</code> for installation instructions.
See <code>$YARP_ROOT/src/modules/kinect/freenect/README.txt</code> for installation instructions.


= OpenNI + Prime Sensor + NITE =
= OpenNI + Prime Sensor + NiTE =


Installing binary files, if you prefer this possibility, is straightforward.
Installing binary files, if you prefer this possibility, is straightforward.


Below we explain how to manually install Kinect programs on Ubuntu 10.04 LTS (officially you need 10.10 or higher, but 10.04 works too).
Below we explain how to manually install Kinect programs on Ubuntu 10.04 LTS or higher (officially you need 10.10+, but 10.04 works too). For OpenNI version 2, see [http://www.openni.org/]. For OpenNI version 1, read below.
 
== YARP wrapper ==
 
See <code>$YARP_ROOT/src/modules/kinect/OpenNI/README.txt</code> for installation instructions.


== ROS wrapper ==
== ROS wrapper ==


# Install ROS - http://www.ros.org/wiki/diamondback/Installation/Ubuntu
# Install ROS - http://www.ros.org/wiki/ROS/Installation
# Install ROS OpenNI - http://www.ros.org/wiki/openni_kinect
# Install ROS OpenNI - http://www.ros.org/wiki/openni_kinect


Line 31: Line 42:
Mandatory:
Mandatory:
   sudo apt-get install g++ python git-core libusb-1.0-0-dev freeglut3-dev
   sudo apt-get install g++ python git-core libusb-1.0-0-dev freeglut3-dev
   audo adduser YOURNAME video
   sudo adduser $USER video


Optional:
Optional:
Line 41: Line 52:
   git clone https://github.com/OpenNI/OpenNI.git
   git clone https://github.com/OpenNI/OpenNI.git
   cd OpenNI
   cd OpenNI
  git checkout unstable


Now follow instructions on https://github.com/OpenNI/OpenNI/tree/unstable
Now follow instructions on https://github.com/OpenNI/OpenNI/tree/unstable
Line 46: Line 58:
=== Sensor ===
=== Sensor ===


There are a number of different locations and versions for this driver:
There are a number of different versions for this driver:


* official PrimeSense Sensor Module for OpenNI (http://www.openni.org/downloadfiles/openni-compliant-hardware-binaries/31-latest-unstable); it supports cameras such as PrimeSense SDK and Asus Xtion PRO but '''not''' Kinect
* official PrimeSense Sensor Module for OpenNI (http://www.openni.org/downloadfiles/openni-compliant-hardware-binaries/31-latest-unstable); it supports cameras such as PrimeSense SDK and Asus Xtion PRO but '''not''' Kinect


* avin2 repository: supports Kinect
* avin2 '''SensorKinect''' repository: supports Kinect


   cd ~/kinect
   cd ~/kinect
   git clone https://github.com/avin2/SensorKinect
   git clone https://github.com/avin2/SensorKinect
   cd SensorKinect
   cd SensorKinect
 
  # check the README file in there. You will have to do something along these lines:
* Boilerbots repository: supports Kinect
   cd Platform/Linux/CreateRedist/  
 
   sudo ./RedistMaker
   cd ~/kinect
  cd ../Redist
   git clone https://github.com/boilerbots/Sensor.git
   cd Sensor-Bin-Linux-x64-v5.1.2.1 # or similar
   cd Sensor
   sudo ./install.sh
   git checkout kinect


* Point Cloud Library (PCL) version, supporting Kinect and with custom debayering algorithms: http://pointclouds.org/downloads/
* Point Cloud Library (PCL) version, supporting Kinect and with custom debayering algorithms: http://pointclouds.org/downloads/
Line 67: Line 78:
Installation instructions may vary, but keep an eye on https://github.com/PrimeSense/Sensor/tree/unstable
Installation instructions may vary, but keep an eye on https://github.com/PrimeSense/Sensor/tree/unstable


=== NITE ===
=== NiTE ===
 
[[Image:NITE-download.png|500px]]


* http://www.openni.org/downloadfiles "OpenNI Compliant Middleware Binaries"
* http://www.openni.org/downloadfiles "PrimeSense NiTE Unstable Build for Ubuntu" (also known as "OpenNI Compliant Middleware Binaries")
* Latest Unstable
* Latest Unstable
* download, for example, PrimeSense NITE Unstable Build for for Ubuntu 10.10 x64 (64-bit) v1.3.0.18 to <code>~/kinect</code>
* download, for example, PrimeSense NITE Unstable Build for for Ubuntu 10.10 x64 (64-bit) v1.3.0.18 to <code>~/kinect</code>
* extract this archive:
* extract this archive:
   tar -jxvf NITE-Bin-Linux64-v1.3.0.18.tar.bz2
   tar -jxvf NITE-Bin-Linux64-v1.3.0.18.tar.bz2
* edit your <code>Nite-VERSION/Data/Sample-*.xml</code> files by filling in PrimeSense license and preferred resolution as reported by several guides online such as http://www.keyboardmods.com/2010/12/howto-kinect-openninite-skeleton.html
* (''obsolete'') edit your <code>Nite-VERSION/Data/Sample-*.xml</code> files by filling in PrimeSense license '''0KOIk2JeIBYClPWVnMoRKn5cdY4=''' and preferred resolution as reported by several guides online such as http://www.keyboardmods.com/2010/12/howto-kinect-openninite-skeleton.html


== Demos ==
== Demos ==
Line 80: Line 93:
Demos are located in
Demos are located in
* <code>Nite-VERSION/Samples/Bin</code>
* <code>Nite-VERSION/Samples/Bin</code>
* <code>OpenNI/Platform/Linux-x86/Bin/Release</code>
* <code>OpenNI/Platform/Linux/Bin/x64-Release</code> (or <code>OpenNI/Platform/Linux-x86/Bin/Release</code>)
 
== Conflict with gspca_kinect kernel module ==
 
In early 2012, a new Linux kernel module called '''gspca_kinect''' was introduced: it allows the Kinect to be used as a standard camera, but it conflicts with OpenNI when trying to access the device. SensorKinect automatically blacklists this module, but in case it doesn't work, here is the manual procedure:
 
* in the current session, rmmod this module (in Ubuntu: <code>sudo modprobe -r gspca_kinect</code>)
* to make the change permanent, blacklist it (<code>sudo sh -c 'echo "blacklist gspca_kinect" > /etc/modprobe.d/blacklist-kinect.conf'</code>)


= See also =
= See also =
Line 90: Line 110:
* [http://www.i-programmer.info/programming/hardware/1905-getting-started-pc-kinect.html Getting Started with PC Kinect]
* [http://www.i-programmer.info/programming/hardware/1905-getting-started-pc-kinect.html Getting Started with PC Kinect]
* [http://www.t3.com/feature/xbox-kinect-how-the-movement-tracking-works Xbox Kinect: How the movement tracking works | T3 Magazine Online]
* [http://www.t3.com/feature/xbox-kinect-how-the-movement-tracking-works Xbox Kinect: How the movement tracking works | T3 Magazine Online]
* [http://www.brekel.com/?page_id=671 Microsoft Kinect SDK vs PrimeSense OpenNI]


[[Category:Vislab]]
[[Category:Vislab]]

Latest revision as of 00:00, 25 March 2015

Note: as of 2014, this page is obsolete. Refer to active projects such as http://structure.io/openni or PCL instead.

This page lists some software instructions for RGBD cameras such as the Microsoft Kinect and Asus Xtion PRO Live.

Available software interfaces to the RGBD cameras:

  1. OpenKinect/libfreenect: fully open source, still lacking some functionality
  2. OpenNI framework + Prime Sensor drivers + NiTE motion tracking middleware binaries (skeleton tracking, gesture recognition etc.). The last component is closed source, while the first two ones are open source. The OpenNI/NiTE combination is endorsed by the ROS community and is the most popular
  3. Kinect for Windows SDK

Here is an explanation of the first two: http://stackoverflow.com/questions/6086981/what-is-the-difference-between-openni-and-openkinect

OpenKinect/libfreenect

See http://openkinect.org/

YARP wrapper

See $YARP_ROOT/src/modules/kinect/freenect/README.txt for installation instructions.

OpenNI + Prime Sensor + NiTE

Installing binary files, if you prefer this possibility, is straightforward.

Below we explain how to manually install Kinect programs on Ubuntu 10.04 LTS or higher (officially you need 10.10+, but 10.04 works too). For OpenNI version 2, see [1]. For OpenNI version 1, read below.

YARP wrapper

See $YARP_ROOT/src/modules/kinect/OpenNI/README.txt for installation instructions.

ROS wrapper

  1. Install ROS - http://www.ros.org/wiki/ROS/Installation
  2. Install ROS OpenNI - http://www.ros.org/wiki/openni_kinect

Ubuntu manual installation

The following instructions refer to the Unstable branch.

Prerequisites

Mandatory:

 sudo apt-get install g++ python git-core libusb-1.0-0-dev freeglut3-dev
 sudo adduser $USER video

Optional:

 sudo apt-get install doxygen graphviz

OpenNI

 mkdir ~/kinect && cd ~/kinect
 git clone https://github.com/OpenNI/OpenNI.git
 cd OpenNI
 git checkout unstable

Now follow instructions on https://github.com/OpenNI/OpenNI/tree/unstable

Sensor

There are a number of different versions for this driver:

  • avin2 SensorKinect repository: supports Kinect
 cd ~/kinect
 git clone https://github.com/avin2/SensorKinect
 cd SensorKinect
 # check the README file in there. You will have to do something along these lines:
 cd Platform/Linux/CreateRedist/ 
 sudo ./RedistMaker 
 cd ../Redist 
 cd Sensor-Bin-Linux-x64-v5.1.2.1 # or similar
 sudo ./install.sh 

Installation instructions may vary, but keep an eye on https://github.com/PrimeSense/Sensor/tree/unstable

NiTE

  • http://www.openni.org/downloadfiles "PrimeSense NiTE Unstable Build for Ubuntu" (also known as "OpenNI Compliant Middleware Binaries")
  • Latest Unstable
  • download, for example, PrimeSense NITE Unstable Build for for Ubuntu 10.10 x64 (64-bit) v1.3.0.18 to ~/kinect
  • extract this archive:
 tar -jxvf NITE-Bin-Linux64-v1.3.0.18.tar.bz2

Demos

Demos are located in

  • Nite-VERSION/Samples/Bin
  • OpenNI/Platform/Linux/Bin/x64-Release (or OpenNI/Platform/Linux-x86/Bin/Release)

Conflict with gspca_kinect kernel module

In early 2012, a new Linux kernel module called gspca_kinect was introduced: it allows the Kinect to be used as a standard camera, but it conflicts with OpenNI when trying to access the device. SensorKinect automatically blacklists this module, but in case it doesn't work, here is the manual procedure:

  • in the current session, rmmod this module (in Ubuntu: sudo modprobe -r gspca_kinect)
  • to make the change permanent, blacklist it (sudo sh -c 'echo "blacklist gspca_kinect" > /etc/modprobe.d/blacklist-kinect.conf')

See also