I have tried following a number of guides on the internet but most of them fall down as libfreenect does not exist in opkg, which is the apt-get of Angstrom. Has anyone got it working and if so what is the method?
3 Answers
Would it be possible to build it from source? This thread on Google Groups talks about how to do that on Ubuntu 10.10 (although it doesn't work on future versions):
Install Libfreenect0.0:
sudo apt-get install libc6 libusb-1.0-0 udev libglu1-mesa libgl1-mesa- glx libsm6 libice6 libx11-6 libxext6 libglut3 libxmu6 libxi6 libstdc+ +6 libgcc1
wget http://ftp.us.debian.org/debian/pool/main/libf/libfreenect/libfreenect0.0_0.0.1+20101211+2-2_armel.deb
sudo dpkg -i libfreenect0.0_0.0.1+20101211+2-2_armel.deb
install libfreenect-dev:
sudo apt-get install libglut3-dev libxi-dev libxmu-dev libc6-dev libglu1-mesa-dev libgl1-mesa-dev libsm-dev libice-dev libx11-dev libxext-dev libstdc++6-4.5-dev libusb-1.0-0-dev pkg-config
wget http://ftp.us.debian.org/debian/pool/main/libf/libfreenect/libfreenect-dev_0.0.1+20101211+2-2_armel.deb
sudo dpkg -i libfreenect-dev_0.0.1+20101211+2-2_armel.deb
install libfreenect-demos:
sudo apt-get install freeglut3 libgcc1 libgl1-mesa-glx libgl1 libglu1- mesa libglu1 libice6 libsm6 libstdc++6 libx11-6 libxext6 libxi6 libxmu6 libglut3
wget http://ftp.us.debian.org/debian/pool/main/libf/libfreenect/libfreenect-demos_0.0.1+20101211+2-2_armel.deb
sudo dpkg -i libfreenect-demos_0.0.1+20101211+2-2_armel.deb
install freenect
wget http://ftp.us.debian.org/debian/pool/main/libf/libfreenect/freenect_0.0.1+20101211+2-2_armel.deb
sudo dpkg -i freenect_0.0.1+20101211+2-2_armel.deb
sudo cp /lib/udev/rules.d/51-kinect.rules /etc/udev/rules.d/51- kinect.rules
If someone gets an error relating to missing GLUT_Xmu_LIBRARY stuff after running "cmake .." using Tom Bamber's instructions just install "sudo apt-get install libxmu-dev libxi-dev" and then cmake should work now.
This is the method I have found to build the libfreenect for beaglebone:
http://elinux.org/ECE497_Project_BeagleBoard_Kinect_with_Usable_Framerates
Summarised below:
Kinect Drivers--libfreenect
Full information about libfreenect and its installation can be found at its site, here. Here I've reproduced just the sections that are useful for getting the drivers set up and working on the BeagleBoard
Clone the git repository with all of the libfreenect source code in it
git clone git://github.com/OpenKinect/libfreenect.git
If you don't have git already installed on your BeagleBoard, install it with the following command
opkg install git
Get all of the packages you need for building the drivers To get the basic drivers compiled, you'll need the cmake and libusb-1.0-0 packages. Use the following command to install these packages to your BeagleBoard
opkg install cmake libusb-1.0-0
NOTE: For some reason on our system the cmake package failed to install the first time, it's some issue with ncurses and dependent libraries. We just reran the command to install cmake and it worked the second time.
Run the cmake utility to generate the necessary makefiles Go into your libfreenect directory and create a subdirectory named build
cd libfreenect
mkdir build
Run cmake
cmake ..
Make the tiltdemo
make tiltdemo
NOTE: If you try to make everything, by just running make like it says in the libfreenect instructions, your make will fail with a bunch of linker errors. This is because there is no GLUT library for the BeagleBoard, so the video demos fail when they try to link against GLUT. We'll be solving this problem later by replacing GLUT calls with PVR calls, but for now, go ahead and make the tiltdemo to be sure you have connectivity with the Kinect
Run the tiltdemo Go to the bin folder and
./tiltdemo
NOTE: You may have to
chmod +x tiltdemo
to get it to run. Now you should see the Kinect tilting up and down and cycling through the various LED options (Red, Green, Blink, Off). Press ctrl+c to exit the demo
-
$\begingroup$ The problem I have with this method is: beaglebone:/home/tom/libfreenect# cmake .. CMake Error: The source directory "/home/tom" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. $\endgroup$ May 3, 2013 at 9:38
-
$\begingroup$ After the 'cd libfreenect mkdir build', there should be a 'cd build' and then the 'cmake ..' should be run you will also need the package libgl-dev installed as OPENGL is required $\endgroup$ May 3, 2013 at 9:59
-
$\begingroup$ After successfully building and compiling running the tilt demo gives this error: Error: Invalid index [0] Error: Kinect not connected? $\endgroup$ May 3, 2013 at 10:08
-
$\begingroup$ When checking whats connected I get these results: beaglebone:/home/tom/libfreenect/build/bin# lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 045e:02c2 Microsoft Corp. Bus 001 Device 004: ID 045e:02be Microsoft Corp. Bus 001 Device 005: ID 045e:02bf Microsoft Corp. Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub $\endgroup$ May 3, 2013 at 10:12