Notice: MediaWiki has been updated. Report any rough edges to marcan@marcan.st
Getting Started
This page documents how to get started using OpenKinect.
The libraries are very much in flux and this won't be the final process. This also means these instructions might be out of date with the latest commits.
Linux
Binary Packages
Already compiled rpm and deb packages are available here: http://livingplace.informatik.haw-hamburg.de/blog/?p=228
Please note, that there are not udev generated devices for now, so you need to execute your programs as root (use sudo).
These packages are frequently updated, last time on Nov,19,2010
Ubuntu
An Ubuntu launchpad ppa for Lucid(10.04) and Maverick (10.10) is available at:
https://launchpad.net/~arne-alamut/+archive/freenect
to use it, open a console and execute:
$ sudo add-apt-repository ppa:arne-alamut/freenect
Resynchronize the list of packages from the repository:
$ sudo apt-get update
After that, you can use:
$ sudo apt-get install libfreenect
After that, you need to addyourself to the 'video' group and log back in.
$ sudo adduser YOURNAME video
To start the OpenGL demo application:
$ glview
Manual build under linux
these instruction need more work, mostly taken from README.asciidoc
Install dependencies
For compiling, you need to have the following libs/programs installed:
* cmake * libusb-1.0-0 * libusb-1.0-0-dev * pkg-config * libglut3 * libglut3-dev
clone the repo
$ git clone https://github.com/OpenKinect/libfreenect.git $ cd libfreenect
cmake
$ mkdir c/build $ cd c/build $ cmake .. $ make
use as normal user (no sudo)
create a file: /etc/udev/rules.d/66-kinect.rules
#Rule for Kinect SYSFS{idVendor}=="045e", SYSFS{idProduct}=="02ae", MODE="0660",GROUP="video" SYSFS{idVendor}=="045e", SYSFS{idProduct}=="02ad", MODE="0660",GROUP="video" SYSFS{idVendor}=="045e", SYSFS{idProduct}=="02b0", MODE="0660",GROUP="video" ### END #############################################################
and add yourself to the video group as stated above
test
maybe you need to do this as root (or use sudo)
$ examples/glview
OS X
Installation
Prerequisites:
- git
- cmake
Best to install via a package manager. If you're not already using [macports](http://www.macports.org/) or [fink](http://www.finkproject.org/), try [homebrew](https://github.com/mxcl/homebrew). Note: please update homebrew to the latest version, before trying to fetch cmake, as there has been a lot of bugfixing lately.
Next create fetch the OpenKinect repository and libusb:
git clone https://github.com/OpenKinect/libfreenect.git git clone git://git.libusb.org/libusb.git
You will need to patch libusb for OpenKinect like so:
cd libusb ./autogen.sh patch -p1 < ../libfreenect/platform/osx/libusb-osx-kinect.diff ./configure make sudo make install
and configure OpenKinect:
cd ../libfreenect/ cd c mkdir build cd build ccmake ..
Now press 'c' in ccmake to configure it. It will likely fail, because it cannot find libusb. Press 'e' to exit help and manually edit the path to libusb in the following screen to point to
/usr/local/include/libusb-1.0/
and continue
When you're done, build OpenKinect:
cmake .. make
If you want to build OpenKinect as an Xcode project, instead do
cmake -G Xcode .. make
And you're done! There now should be a program called 'glview' in libfreenect/c/build/examples. Connect your Kinect and start it!
(originally from http://www.spoofscript.com/blog/?p=327)
Parallel usage with pyusb
If you want to also use pyusb to play with the Kinect, you will need libusb-1.0.8 (it seems). Install it via homebrew and then define the _lib variable before finding the usb device:
from ctypes import * import usb.core import usb.utils _lib = CDLL('/usr/local/Cellar/libusb/1.0.8/lib/libusb-1.0.dylib') # That's the location homebrew puts the libusb libraries dev = usb.core.find(idVendor=0x045e, idProduct=0x02B0)
Windows
Getting Started in Windows Getting_Started_Windows
Dependencies
http://sourceforge.net/apps/trac/libusb-win32/wiki