kinect-relay
Overview
kinect-relay is a simple program designed to process data from a Kinect and transmit it over TCP. This is useful for embedded systems that are not capable of interfacing with the kinect on their own. kinect-relay is designed to offload maximum work to the server, under the assumption most of the time, the server will be more powerful than the client, and will likely be entirely dedicated to running the server.
Dependencies
The following dependencies are required:
Cross-Compiling for Beagleboards Running the Angstrom Distribution
First, ensure the Angstrom toolchain is installed on the build machine. Toolchains can be downloaded here
Then run:
$ . /usr/local/angstrom/arm/environment-setup
$ export CROSS_OUTPUT="path to output directory"
$ opkg-target update
$ opkg-target install libfreenect libfreenect-dev boost boost-serialization boost-program-options opencv-dev
$ ./configure --host=arm-angstrom-linux-gnueabi --prefix=$CROSS_OUTPUT
$ make
$ make install
Notice
At the time of writing, Angstrom's libfreenect is out of date and will not work. You will need to custom cross-compile libfreenect for Angstrom. A guide to compiling libfreenect for Linux is here. In order to cross compile, create a file called angstrom_toolchain.cmake with contents as follows.
SET(CMAKE_SYSTEM_NAME Linux)
include(CMakeForceCompiler)
CMAKE_FORCE_C_COMPILER(arm-angstrom-linux-gnueabi-gcc GNU)
When compiling, change
$ cmake ..
$ make
$ sudo make install
To
$ cmake -DCMAKE_TOOLCHAIN_FILE=../angstrom_toolchain.cmake -DCMAKE_INSTALL_PREFIX=$CROSS_OUTPUT
$ make
$ sudo make install
Ensure that libfreenect is cross-compiled after all opkg commands are finished in the above instructions
Testing
This program includes a small test suite. It is recommended that it is compiled and run on the host system. It can be used as follows:
$ ./configure
$ make check
The test suite will prompt for the target address and port.
Implementation Guide
All the implementation is stored in src/MagicBox/KinectDataGenerator.h.