Closed orgicus closed 10 years ago
To get it to work in eclipse you need to run with -d32, it has to be 32-bit. The library really needs to be freshened up, but I haven't had the time. I will try to take a look soon!
Thank you for the reply Daniel. I've got your library compiling nicely in eclipse. I've also managed to compile and run Example.java that comes with the OpenKinect java wrapper and there's something not quite right. I've added println statements to check if I get anything from the Device class. I get a trace when the Accelerometer listener is set, but no callbacks are fired. I'll try to dig deeper and see if I can work out what the issue is. As far as I can see, OpenKinect uses JNI to make calls to the freenect driver. I've got jit.freenect running in MaxMSP and I can get accelerometer data, but clueless to why I can't do the same with OpenKinect/java.
it might be b/c i haven't rebuilt the JNILIB in a long time, maybe it needs an update. The xcode project is in there too if you want to try updating the source and rebuilding.
Unfortunately I don't know c/c++/jni yet to able to do the fix(https://github.com/shiffman/libfreenect/blob/master/wrappers/java/processing/KinectJNI_v0002/src/native/org_openkinect_Context.cpp#L149), so I've got two options at the moment: try the OpenKinect JNA wrapper or learn how to fix this.
This repo has moved to: https://github.com/shiffman/OpenKinect-for-Processing
Closing this issue and will track again anew there.
Hello Daniel,
Thanks for sharing the source. I've noticed that there is an interface to the accelerometer already, but no access to it, so I've tried to change the Kinect class to fix that.
I've created a PVector instance to store x,y,z values into, implemented the Acceleration interface, and made a getter for the PVector instance. Couldn't use the .jar in eclipse:
but it did run in Processing though. I've was printing the PVector values via the getAcceleration() method I added, but it was always [0.0,0.0,0.0]. I've added a trace in the direction() method itself(from Acceleration interface) to check, and it wasn't called. I thought I did the implementation wrong and did this basic test:
Still no joy. The think that puzzles me is why doesn't the onAcceleration() method get called, because I've added print statements there too:
Any tips/clues would be very helpful. Thank you for your time !
Have a brilliant day, George