ofxOpenNI on OS X Mountain Lion / 10.8?

Has anyone successfully got ofxOpenNI working on 10.8 or OpenNI in any form?

I’ve been running ONI files successfully, but live input from the Kinect currently fails.

https://github.com/HellicarAndLewis/Sync

I’ve found this tutorial:

http://creativec0d1ng.blogspot.no/2012/08/installing-openni-on-osx-lionmountain.html

Which I am currently following, with Homebrew instead of MacPorts.

I’m also going to follow this tutorial on getting PCL installed:

http://www.pointclouds.org/documentation/tutorials/installing-homebrew.php

Cheers,

JGL

Here is the console output of an attempt to run the Recorder application in Sync, posted on the GitHub above:

  
ofxOpenNIDevice[0]: OF_LOG_WARNING: Using a NASTY hack to silence SIGNAL errors on exit - read the comments at line ~1712 of ofxOpenNI.cpp   
ofxOpenNIDevice[0]: OF_LOG_NOTICE: Init context...   
ofxOpenNIDevice[0]: OF_VERBOSE: Context initilized status: OK   
ofxOpenNIDevice[0]: OF_LOG_NOTICE: Adding licence...   
ofxOpenNIDevice[0]: OF_VERBOSE: Adding licence: PrimeSense 0KOIk2JeIBYClPWVnMoRKn5cdY4= status: OK   
ofxOpenNIDevice[0]: OF_LOG_NOTICE: Init device...   
ofxOpenNIDevice[0]: OF_VERBOSE: Enumerate devices status: Can't create any node of the requested type!   
ofxOpenNIDevice[0]: OF_LOG_WARNING: Device: PrimeSense/SensorKinect/5.1.0.25 failed: The device is not connected!   
ofxOpenNIDevice[0]: OF_LOG_NOTICE: Found 0 devices connected   
ofxOpenNIDevice[0]: OF_LOG_WARNING: REAL Device could not be initialized - you can still use an ONI   
ofxOpenNIDevice[0]: OF_LOG_NOTICE: Starting ofxOpenNI with threading   
ofxOpenNIDevice[0]: OF_LOG_NOTICE: Adding generator type XN_NODE_TYPE_DEPTH   
ofxOpenNIDevice[0]: OF_VERBOSE: Creating XN_NODE_TYPE_DEPTH generator status: Can't create any node of the requested type!   
ofxOpenNIDevice[0]: OF_LOG_ERROR: setGeneratorResolution() called on invalid generator!   
ofxOpenNIDevice[0]: OF_LOG_NOTICE: Adding generator type XN_NODE_TYPE_IMAGE   
ofxOpenNIDevice[0]: OF_VERBOSE: Creating XN_NODE_TYPE_IMAGE generator status: Can't create any node of the requested type!   
ofxOpenNIDevice[0]: OF_LOG_ERROR: setGeneratorResolution() called on invalid generator!   
ofxOpenNIDevice[0]: OF_VERBOSE: Depth generator is not on   
ofxOpenNIDevice[0]: OF_LOG_NOTICE: Adding generator type XN_NODE_TYPE_USER   
ofxOpenNIDevice[0]: OF_VERBOSE: Creating XN_NODE_TYPE_USER generator status: Can't create any node of the requested type!   
ofxOpenNIDevice[0]: OF_VERBOSE: Starting XN_NODE_TYPE_USER generator status: Can't create any node of the requested type!   

Aha! one of my students had unplugged the power to my Kinect.

(-;

In any case, the instructions in the link above work fine to build and use the latest libraries:

NITE-Bin-Dev-MacOSX-v1.5.2.21
OpenNI-Bin-MacOSX-Dev-v1.5.4.0
SensorKinect093-Bin-MacOSX-v5.1.2.1

Cheers,

Joel

Hey Joel

Which openNi addon are you using?

The gameover ofxOpenNi has openi & drivers built into the app folder doesn’t it?

Are you installing the above into your system instead? What are the benefits of doing this?

Cheers

Hey Chris,

I’m am using this version:

https://github.com/gameoverhack/ofxOpenNI/tree/experimental

I don’t believe the instructions above install into the System/Library - rather to bin/build folders within the existing folders.

There are a series of new demos with the latest versions:

NITE-Bin-Dev-MacOSX-v1.5.2.21
OpenNI-Bin-MacOSX-Dev-v1.5.4.0
SensorKinect093-Bin-MacOSX-v5.1.2.1

that expose new functionality that wasn’t previously available - hand gestures improvements and poseless tracking.

Cheers,

Joel

Hmm ofOpenNI from gameover says:

“On Mac OSX I’ve compiled the OpenNI, NITE and SensorKinect drivers and then modified the dylibs so they can sit in the bin/data/openni/libs folder. These are truly portable.”

Those instructions in your link are building/installing, not making dylibs. I can’t see how those instructions would replace multiple copies of myapp/data/openni/ for all of your projects.

I’m confused :frowning:

Hey Chris,

libnimCodecs.dylib
libnimMockNodes.dylib
libnimRecorder.dylib
libOpenNI.dylib
libusb-1.0.0.dylib
libXnCore.dylib
libXnDDK.dylib
libXnDeviceFile.dylib
libXnDeviceSensorV2KM.dylib
libXnFormats.dylib
libXnVCNITE_1_5_2.dylib
libXnVFeatures_1_5_2.dylib
libXnVHandGenerator_1_5_2.dylib
libXnVNite_1_5_2.dylib

Are the dylibs that are provided with ofxOpenNI.

The tutorial above allows you to create:

libXnCore.dylib
libXnDDK.dylib
libXnDeviceFile.dylib
libXnDeviceSensorV2KM.dylib
libXnFormats.dylib

via avin2-SensorKinect-15f1975

libXnVCNITE_1_5_2.dylib
libXnVFeatures_1_5_2.dylib
libXnVHandGenerator_1_5_2.dylib
libXnVNite_1_5_2.dylib

via NITE-Bin-Dev-MacOSX-v1.5.2.21

and

libnimCodecs.dylib
libnimMockNodes.dylib
libnimRecorder.dylib
libOpenNI.dylib
libOpenNI.jni.dylib

via OpenNI-Bin-Dev-MacOSX-v1.5.4.0

You can also extract libusb-1.0.0.dylib via the Homebrew binary path.

Those instructions in your link are building/installing, not making dylibs.

Is wrong, they are for making dylibs.

Basically, the link I showed you before allows you to take advantage of all the new API features in the latest release - but these wouldn’t be cleanly exposed via the ofxOpenNI interface.

Is that clearer?

Cheers,

Joel