Install libfreenect Drivers on Ubuntu

libfreenect is the end result of the famous Adafruit Kinect hacking bounty X-Prize winner. After it made its mark on the scene, the OpenKinect community was born and the rest is history. This guide will provide the resources necessary to install the OpenKinect libfreenect drivers for Ubuntu. The original installation guide can be found at OpenKinect's Getting Started Guide.

We'll be performing the entire operation using a Terminal app. If you're unfamiliar or uncomfortable using this tool, you'll just have to suck it up sonny, it'll be worth it in the end. The end result of getting this whole process running is a sweet feeling and segway's to so many cool DIY hacks. Anyway..

First up, upon up a Terminal. The default ubuntu one can be found by search for Terminal from the dashboard -- if you're using Ubuntu 11.04 + with Unity. Older versions of Ubuntu has the terminal located in Applications -> Accessories -> Terminal.

Installing Dependencies

Type in the following to install the required dependencies and packages necessary to install libfreenect.

sudo apt-get install git-core cmake freeglut3-dev pkg-config build-essential libxmu-dev libxi-dev libusb-1.0-0-dev

This will take a bit of time depending on your internet connection and if you need to install all of these dependencies. Once complete, we'll move on to downloading and installing libfreenect.

Install libfreenect

Create a directory in Home called Kinect. This will act as our default project folder where we'll be dumping everything relating to this guide.

mkdir ~/Kinect
cd ~/Kinect

Use git to download the latest version of libfreenect

git clone git://github.com/OpenKinect/libfreenect.git

The next few commands relate to building libfreenect

cd libfreenect
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig /usr/local/lib64/

Connect your Kinect to your machine and run the glview demo

sudo glview

If all went according to plan, you should be looking at a dual view of the RGB camera data along side the colour differential that represents depth data.

Resource Guide Type: 
Groups audience: