wexstorm / simple-openni

simple-openni by Max Rheiner for Processing 3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

doesn't work with Processing 3

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1. I was using simple-openni with processing 2.2.1
2. I installed new Processing 3
3. I installed simple-openni in Processing 3 and tried to run examples and I 
got error message "NoSuchMethodError: You may be using a library that's 
incompatible with this version of Processing" and the place in the code that is 
marked as an error place is the line:   context = new SimpleOpenNI(this);

What is the expected output? What do you see instead?
I expected that the examples will run well but instead I got the error message: 
"NoSuchMethodError: You may be using a library that's incompatible with this 
version of Processing" and the place in the code that is marked as an error 
place is the line:   context = new SimpleOpenNI(this);

What version of the product are you using? On what operating system?
I'm using Processing 3 + Yosemite + 1.96 SimpleOpenNI


Please provide any additional information below.


Original issue reported on code.google.com by ewelina....@gmail.com on 8 Aug 2015 at 1:08

Same issue for me. Anyone with any solution?

Original comment by Per.Otto...@gmail.com on 17 Aug 2015 at 8:04

I wish someone recompiles the library. But I cannot find the sourcecode out there.

I am facing the same issue! I tried downloading this code.
https://github.com/wexstorm/simple-openni
There is no documentation available. It is mentioned that it works fine for Processing 3.0.2.
I am using Processing 3.3 on Mac OS Sierra. I get the following error:

java.lang.NullPointerException
	at processing.app.Library.getClassPath(Library.java:345)
	at processing.mode.java.JavaBuild.preprocess(JavaBuild.java:416)
	at processing.mode.java.JavaBuild.preprocess(JavaBuild.java:155)
	at processing.mode.java.JavaBuild.build(JavaBuild.java:122)
	at processing.mode.java.JavaBuild.build(JavaBuild.java:104)
	at processing.mode.java.JavaMode.handleLaunch(JavaMode.java:122)
	at processing.mode.java.JavaEditor.lambda$0(JavaEditor.java:1097)
	at java.lang.Thread.run(Thread.java:745)

Please suggest a solution for the same.

Thanks in advance!

commented

I made P3 working with SimpleOpenNI by following:

  1. I downloaded the project from https://github.com/wexstorm/simple-openni
  2. I replaced the files SimpleOpenNI/library/NiTE2/Data/lbsdata.idx and SimpleOpenNI/library/NiTE2/Data/lbsdata.lbd by the same files from working-with-processing2-simple-openni (when I downloaded wexstorm project this files were way too small)
  3. I copied "libfreenect.0.1.2.dylib" from working-with-processing2-simple-openni (in my case /libraries/SimpleOpenNI/library/osx/OpenNI2/Drivers/libfreenect.0.1.2.dylib) to the same folder in the wexstorm project

Hope will work for you!

Hello ewelinka,

Just one question, how can I have the files (cf. 2) and the .dylib (cf. p3)?
I can't have simpleopenni library even on Processing 2...
Good bye

Thank You, @ewelinka for sharing the steps you followed to get simple-openni working with Processing 3.

Your success (and comments here!) encouraged me to follow through, and I just thought I would add a few details that helped me. (Note that I am running macOS 10.12 on a mid-2012 Macbook Pro, with lots of homebrew and command-line tools stuffed in there).

First of all, it must be noted that one alternative to OpenNI is just using Dan Shiffman's openkinect-for-processing tutorials, and downloading the necessary code by using the Processing libraries utility. (For more info on that:
https://github.com/shiffman/OpenKinect-for-Processing
http://shiffman.net/p5/kinect/). I found it helpful to troubleshoot a bit using that, just to make sure my system was good enough to actually run my Kinect.

Now, the main point made in the README and in ewelinka's comment above is that there are two files (namely, SimpleOpenNI/library/NiTE2/Data/lbsdata.idx and SimpleOpenNI/library/NiTE2/Data/lbsdata.lbd) that are too large (60MB and 104MB, respectively, on my machine) to be transferred neatly using the transfer utilities that git/github makes available.

But these files are still available--some of us already have them from previous installations of SimpleOpenNI. So, for anyone trying to follow the steps outlined above, you need those bad boys first! Copying those into the Data directory should replace the existing files (Note that those files are, within this current repository, simply placeholders with links to the large binaries that they name. I used my old, large copies of them and did not use the links. The note in the README about using "the raw button" seems a bit unclear, but https://git-lfs.github.com/ might be helpful for anyone figuring out how to neatly download them for the first time).

Lastly, replacing the libfreenect.0.5.3 file with the libfreenect.0.1.2 version--following the same basic concept ewelinka and I describe above--was the final step I needed. Why this is necessary is not clear to me, but I suppose it's possible that libfreenect was updated in such a way that poses problems.

Do make sure you know which version of Kinect you have! (I wasn't totally sure whether I had V1 or V2 of the actual Kinect device, but running the following sketch from the openkinect processing library: Processing/libraries/openkinect_processing/examples/MultiKinectVersion/MultiKinectVersion.pde made it clear).

Whatever the case, the um, "process" 😉 for getting this working does take some patience and prodding around. Wish it were easier to build this stuff from source (especially on an older Mac??)...