OpenNI2: Kinect not detected when trying with SimpleViewer sample

Trying to use OpenNI2 for a project, but can’t even seem to get past the first obsctaces. I have cloned the develop branch and built with make. That worked without issues. I am on Mac OS.

Trying to launch the SimpleViewer sample.

git:(develop): /Users/flo/tmp/OpenNI2/Bin/x64-Release/SimpleViewer
dyld: Library not loaded: libOpenNI2.dylib
  Referenced from: /Users/flo/tmp/OpenNI2/Bin/x64-Release/SimpleViewer
  Reason: image not found
[1]    11509 trace trap  /Users/flo/tmp/OpenNI2/Bin/x64-Release/SimpleViewer

Apparently I have to link to the compiled library location, I am doing by prepending the library path as follows:

DYLD_LIBRARY_PATH=/Users/flo/tmp/OpenNI2/Bin/x64-Release/ /Users/flo/tmp/OpenNI2/Bin/x64-Release/SimpleViewer

This still fails because it doesn’t seem to recognize the connected Kinect (v1).

After initialization:

SimpleViewer: Device open failed:
    DeviceOpen using default: no devices found

The Kinect is connected however. I can confirm this because it is registered as a usb device. Out of ioreg -p IOUSB contains:

  | | +-o HubDevice@fa130000  <class IOUSBHubDevice, id 0x100003cd2, registered, matched, active, busy 0 (9 ms), retain 15>
  | |   +-o Xbox NUI Motor@fa132000  <class IOUSBDevice, id 0x100003cdc, registered, matched, active, busy 0 (221 ms), retain 9>
  | |   +-o Xbox Kinect Audio, © 2011 Microsoft Corporation. All rights reserved.@fa131000  <class IOUSBDevice, id 0x100003ce9, registered, matched, active, busy 0 (7 ms), retain $
  | |   +-o Xbox NUI Camera@fa133000  <class IOUSBDevice, id 0x100003cf1, registered, matched, active, busy 0 (31 ms), retain 9>

Anything I am missing or doing wrong?

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 20

Most upvoted comments

In a terminal window, cd to the Samples/Bin folder. Run the sample apps as, e.g., ./SimpleViewer.