pix_freenect on Ubuntu 12.04

pix_freenect is one of the pd/Gem objects by Matthias Kronlachner to use Kinect sensor.
It’s not so simple to make it run on Ubuntu 12.04 64bit.
Here is a sum up of what I should do to make it work.
get the last libfreenect from git and make it (as the libfreenect package seems to not work with Matthias external) :
git clone https://github.com/OpenKinect/libfreenect.git
cd libfreenect
mkdir build
cd build
cmake ..
make
sudo make install

On my 64bit system, cmake puts the libs strangly in /usr/local/lib64 instead of /usr/local/lib. I moved all the files to /usr/local/lib, you can also make symbolic links.

I have to blacklist gspca modules to use the Kinect with freenect. I had a file named blacklist-gspca-kinect.conf in /etc/modprobe.d with that :
blacklist gspca_kinect
To prevent gspca module from loading on next reboot and to remove the module without rebooting :
sudo modprobe -r gspca_kinect

Now, get the latest pix_freenect code and make it :
git clone git://github.com/kronihias/pix_freenect.git
cd pix_freenect
mv Makefile Makefile_osx
mv Makefile_linux Makefile
make PD_DIR=/path/to/pd GEM_DIR=/path/to/Gem

You can also edit the Makefile and set the variables there. For me, the build failed because of unrecognized gcc arg : –export_dynamic. I edited the Linux LDLAGS variable on line 23 and replace by :
LDFLAGS = -shared -rdynamic
Make again and it should be ok. For now, pix_freenect can’t initialize when no Kinect is connected or if a wrong ID is set with arguments.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>