Skip to content

johnboiles/JBKinectHacks

Repository files navigation

JBKinectHacks

http://github.com/johnboiles/JBKinectHacks

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.

To Install OpenNI for Mac

  1. Get OpenNI

    git clone git://github.com/OpenNI/OpenNI.git
  2. Switch to unstable branch (only unstable supports osx atm)

    git checkout unstable
  3. Follow the installation instructions in the Readme (they're pretty good)

  4. Get the unstable forked version of the PrimeSense/Sensor module working

    git clone git://github.com/ros-pkg-git/Sensor.git
  5. Follow the installation instructions in the Readme (they're also pretty good)

  6. Get the PrimeSense NITE binaries here: http://www.openni.org/component/search/?searchword=nite&ordering=&searchphrase=all

  7. Run the install script included with the NITE binaries

    sudo ./install.sh
  8. Use License code

    0KOIk2JeIBYClPWVnMoRKn5cdY4=

To Run the Garry's Mod Example

  1. Download Garry's Mod (Duh) from Steam

  2. Change directories to the GMod directory

    cd GMod
  3. Run make install to copy scripts/entities/binary modules to the right places

    make install STEAM_USERNAME=yourusername
  4. Build and run the UDPBackend example (sends skeletal data over UDP)

    cd ../UDPBackend
    

make cd .. ./Bin/Release/UDPBackend Note 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

  1. Open Garry's Mod and start a new game (multiplayer or singleplayer)

  2. Enable console access from Options->Keyboard->Advanced->Enable Developer Console

  3. Press ~ to open the developer's console

  4. Execute trashmonster script to connect to UDPBackend

    lua_openscript trashmonster.lua
  5. Do the calibration pose in front of the Kinect

  6. Modified hoverballs will be placed in positions corresponding to your joints.

About

A collection of sample projects and code snippets using OpenNI and the Kinect.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published