A collection of sample projects and code snippets using OpenNI and the Kinect. Only tested on OSX.
To build using the included makefiles, libOpenNI.dylib must be installed in /usr/lib and the OpenNI includes must be in /usr/include/ni.
To build using the xcode project, you must symlink /usr/include/ni and /usr/lib/libOpenNI.dylib to the appropriate places in your developer install. AFAIK there's not an elegant way to get xcode to use the standard /usr/include and /usr/lib paths. For my installation I ran the following commands:
sudo ln -s /usr/lib/libOpenNI.dylib /Developer/SDKs/MacOSX10.6.sdk/usr/lib/libOpenNI.dylib
sudo ln -s /usr/include/ni /Developer/SDKs/MacOSX10.6.sdk/usr/include/ni
Note that the binaries expect a file named SamplesConfig.xml to be in the present working directory when they are run.
git clone git://github.com/OpenNI/OpenNI.git
Switch to unstable branch (only unstable supports osx atm)
git checkout unstable
Follow the installation instructions in the Readme (they're pretty good)
Get the unstable forked version of the PrimeSense/Sensor module working
git clone git://github.com/ros-pkg-git/Sensor.git
Follow the installation instructions in the Readme (they're also pretty good)
Get the PrimeSense NITE binaries here: http://www.openni.org/component/search/?searchword=nite&ordering=&searchphrase=all
Run the install script included with the NITE binaries
Use License code
Download Garry's Mod (Duh) from Steam
Change directories to the GMod directory
Run make install to copy scripts/entities/binary modules to the right places
make install STEAM_USERNAME=yourusername
Build and run the UDPBackend example (sends skeletal data over UDP)
cd ../UDPBackend make cd .. ./Bin/Release/UDPBackendNote that you must execute UDPBackend with SamplesConfig.xml in the present working directory. So from the base directory of this project, use ./Bin/Release/UDPBackend
Open Garry's Mod and start a new game (multiplayer or singleplayer)
Enable console access from Options->Keyboard->Advanced->Enable Developer Console
Press ~ to open the developer's console
Execute trashmonster script to connect to UDPBackend
Do the calibration pose in front of the Kinect
Modified hoverballs will be placed in positions corresponding to your joints.