totovr / SimpleOpenNI

SimpleOpenNI library for Processing 3.5.2, 3.4, 3.3.7, 3.3.6 on MacOS for V1 and V2
https://totovr.github.io/SimpleOpenNI/
MIT License
158 stars 47 forks source link

skeleton_tracking_demo, Processing 3.3.7, MacOS High Sierra #7

Closed taylorhedum closed 5 years ago

taylorhedum commented 5 years ago

Issue Summary

I'm trying to run your new skeletal tracking for the Kinect V2 via SimpleOpenNI and Processing. I've installed the drivers via terminal and homebrew, and can successfully open the Protonect example application. The issue: Processing does not recognize the device for any of the examples, including the new skeleton_tracking_demo. I'm running Processing 3.3.7 on MacOS High Sierra, as documented. I've downloaded the updated library and it's in the proper library folder of Processing. Looked through issue reports to no avail, do you have any pointers? Thank you for your time.

Processing Output (if any)

Error output: no device connected

Type of Issue

You might select multiple topics, delete the rest:

Your System Configuration

Operating system: Mac OS High Sierra Version of Kinect: V2, model 1520

totovr commented 5 years ago

Did you installed?

brew tap brewsci/science
brew install openni2
export OPENNI2_REDIST=/usr/local/lib/ni2
export OPENNI2_INCLUDE=/usr/local/include/ni2
taylorhedum commented 5 years ago

Yes, they are installed and updated. The last two "export" functions made the following files/folders: /usr/local/Cellar/openni2/2.2.0-debian/lib/ni2 and /usr/local/Cellar/openni2/2.2.0-debian/include/ni2

Both contain drivers; the 'lib' has .dylib and .ini files, and the 'include' has a lot of .h files and folders for each OS. No errors with install.

Processing error reads: "SimpleOpenNI Error: Can't open device: DeviceOpen using default: no devices found" and consequently NullPointerException on "image(kinect.userImage(),0,0);"

totovr commented 5 years ago

Could you copy the drivers generated by libfreenect2 again in the folder of the SimpleOpenNI library?

mrmagoon commented 5 years ago

Hi @totovr, I am having the same problem.

I installed Processing 3.4 and 3.3.7 and tried the installation process given here: https://github.com/totovr/SimpleOpenni/tree/Processing_3.4

I know that the connection works, as the library OpenKinect for Processing (https://github.com/shiffman/OpenKinect-for-Processing) works and returns data.

My setup is:

Operating system: Mac OS High Sierra Version of Kinect: V2, model 1520

I tried reinstallation and changing the drivers… Do you have any idea what's wrong? I am always getting the same error message as above:

"SimpleOpenNI Error: Can't open device: DeviceOpen using default: no devices found" and consequently NullPointerException on "image(kinect.userImage(),0,0);"

totovr commented 5 years ago

Did you install Nite?

totovr commented 5 years ago

Sorry OpenNI

mrmagoon commented 5 years ago

I did

brew install openni2

but did not know what

export OPENNI2_REDIST=/usr/local/lib/ni2 export OPENNI2_INCLUDE=/usr/local/include/ni2

meant. What do I have to do with those export statements?

mrmagoon commented 5 years ago

Do I have to install Nite as well?

totovr commented 5 years ago

Just export OpenNI to your path

mrmagoon commented 5 years ago

What do you mean exactly? Copy the library?

totovr commented 5 years ago
export OPENNI2_REDIST=/usr/local/lib/ni2
export OPENNI2_INCLUDE=/usr/local/include/ni2
mrmagoon commented 5 years ago

if I type

export OPENNI2_REDIST=/usr/local/lib/ni2 and then after that export OPENNI2_INCLUDE=/usr/local/include/ni2 this does nothing

totovr commented 5 years ago

The sample of libfreenect2 works?

mrmagoon commented 5 years ago

Yes, I tried the Protonect and all works fine…

mrmagoon commented 5 years ago

as typing

export OPENNI2_REDIST=/usr/local/lib/ni2 export OPENNI2_INCLUDE=/usr/local/include/ni2

didn't do anything. I manually copied "/usr/local/lib/ni2" to "/usr/local/include/ni2". But this didn't help either.

totovr commented 5 years ago

Try to copy directly the .lib in the folder of SimpleOpenNI

mrmagoon commented 5 years ago

Do you mean copying:

"~/libfreenect2/build/lib/"

to

"~/Documents/Processing/libraries/SimpleOpenNI/library/osx/OpenNI2/Drivers"

?

totovr commented 5 years ago

Yes

mrmagoon commented 5 years ago

That worked!!! Thank you!

For everyone else who has this problem, do the following steps:

  1. Go through the installation here: https://github.com/totovr/SimpleOpenni/tree/Processing_3.4 and make sure to include the installation of libfreenect2 and OpenNi.
  2. Connect your Kinect v2, navigate to the folder you created for libfreenect2 and run the shell script "~/libfreenect2/build/bin/Protonect" to make sure your Kinect is working properly. You should get an image with all the video data. If not you can try to install the OpenKinect for Processing Library from https://github.com/shiffman/OpenKinect-for-Processing and start a example code to verify your Kinect is working. If you do not get an image, something else is wrong. If you are receiving an image proceed with point 3.
  3. Copy all the files from the folder e.g. from "/libfreenect2/build/lib/" (including all the .dylib files) to your Processing folder "/Documents/Processing/libraries/SimpleOpenNI/library/osx/OpenNI2/Drivers". If a prompt asks you to overwrite the files, make sure to save a copy first and then overwrite them.
  4. Then copy the complete folder "ni2" from "/usr/local/lib/ni2" to "/usr/local/include/ni2"
  5. Restart Processing and you should be done.

This worked for me with:

Operating system: Mac OS High Sierra Version of Kinect: V2, model 1520 SimpleOpenNi, libfreenect2, OpenNi Processing 3.4 MacBook Pro

ghost commented 5 years ago

Hey guys, I'm having this similar problem but none of these options are working. I'm running Mac OSX 10.14.4 and Processing 3.5.3 with a Kinect V2 1520 Would you be able to give me a hand?

getting this in processing:

SimpleOpenNI Version 1.96 After initialization:

SimpleOpenNI Error: Can't open device: DeviceOpen using default: no devices found

Can't init SimpleOpenNI, maybe the camera is not connected!

mrmagoon commented 5 years ago

Hey @AnxiousBuddha,

It's most likely, that the necessary drivers weren't installed properly or do not lie in the right folders.

ghost commented 5 years ago

Thank for replying, Yeah, i've tried 3.4 and i've made sure that everything has been moved but I cant get it to function. I followed all of your steps the only think I had an issue with is in the steps

**Return to the first terminal, or in the libfreenect2 folder, and build:

mkdir build && cd build cmake .. make make install**

I got this "CMake Error: The source directory "/Users" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. Reinaldos-MacBook-Pro:~ rbonet$ make make: *** No targets specified and no makefile found. Stop. Reinaldos-MacBook-Pro:~ rbonet$ make install"

when I try to run the shell script I get -bash: ./bin/Protonect: No such file or directory.

Not sure if that is an issue...

I do get the kinect working with openkinect libraries... so the kinect itself functions.