Git Product home page Git Product logo

Comments (14)

adiviness avatar adiviness commented on September 27, 2024

I'm having the same sort of issue, my sensor is model 1517.

from libfreenect.

n312 avatar n312 commented on September 27, 2024

I am encountering issues with Kinect model 1473. I am running Processing 2.0.3 on OSX 10.8.2.
I have read a number of fora and am aware that the issue may be with the model 1473. I need to work with that model and am hoping to get some help here.

When I run RGBDepthTest, I get NullPointerException error at kinect.enableDepth(depth). The console read, No Kinect devices found.

With this TSPS (Toolkit for Sensing People in Spaces), I can at least see that Kinect is connected.

I would very much appreciate any assistance. Thank you.

from libfreenect.

JamesHagerman avatar JamesHagerman commented on September 27, 2024

I'm also having this issue.

After compiling the libfreenect driver from the latest source (0.2.0) I was able to get the glview test app to run and it found the kinect...

But this shiffman processing library isn't working with it.

This is the start of the stack trace and the error is spits out after the first stack trace is printed out:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at org.openkinect.processing.Kinect.enableDepth(Kinect.java:82)
...
Already called beginDraw()

So, there's something wrong with the library. The driver seems to work okay. I'm running OS X 10.8.3 and a new, out of the box 1473 Kinect.

I'll see if I can do any debugging but my java and processing library knowledge is pretty low so any help would be wonderful...

from libfreenect.

JamesHagerman avatar JamesHagerman commented on September 27, 2024

Well, crap. The head of libfreenect has diverged quite a bit from this fork of the code.

I can't even compile this library as it is now in this fork. I'm not sure what the dependencies are for the build and I can't find any instructions on how to set up the environment. Just modifying build.sh and running it is spitting out a bunch of errors when it tries to compile OpenKinectJNI/org_openkinect_Context.cpp

So I can't even start trying to figure out how to update this library so it will work with 1473.

@shiffman What are the environment requirements to build this library from the source?

from libfreenect.

JamesHagerman avatar JamesHagerman commented on September 27, 2024

Okay. I was able to build the Java portion of the code (I had to get jna.jar installed on my machine and in the classpath) but the C++ files are calling functions that have been heavily refactored in the libfreenect driver.

Getting this library to user a newer version of the driver (to support the 1473 device) is beyond me right now. I don't understand the code well enough.

from libfreenect.

shiffman avatar shiffman commented on September 27, 2024

Thanks for the comments. I'm aware of the horrible out-of-date-ness of this library. I have it on my list to get to updating it but I just haven't had the time and am also struggling with motivation given the new kinect mac-incompatibility. I originally built the library using JNI and some xcode magic that I can barely remember. If anyone has the time to help I would be thrilled.

from libfreenect.

JamesHagerman avatar JamesHagerman commented on September 27, 2024

@shiffman: I've been working towards trying to merge your existing processing code with the latest HEAD of libfreenect. Since my last post, I finally got the .so and .jar to compile okay (I had to update some function names and variables in the .cpp and .h files)... but I don't know how to compile the actual library itself.

The build.sh script builds the .so/.jnilib along with the code in wrappers/java/OpenKinect... but that directory doesn't include the processing directory... which is the actual processing library itself as far as I can tell.

As far as I can tell, the library is an Eclipse project inside of wrappers/java/processing/KinectProcessing/ but I can't figure out how to compile it inside of Eclipse.

Honestly, I've never written a processing library and my java understanding is pretty minimal... but I've got a project that needs a working processing library for the new kinect so I'm pretty motivated to get this working.

from libfreenect.

JamesHagerman avatar JamesHagerman commented on September 27, 2024

Also, it would be pretty awesome if this library could (at some point) be pulled in to the main libfreenect repo...

from libfreenect.

JamesHagerman avatar JamesHagerman commented on September 27, 2024

Well, I'm getting closer. I modified some of the the code and moved some files around and was able to get the code to compile...

So I've been able to compile a version of the library that can at least connect to the 1473 Kinect with libfreenect at version (0.2.0)... but the library throws this error after just a few seconds of it running:

"Invalid memory access of location 0x0 rip=0x7fff8946f9fb"

So there's still something wrong... but at least I can start taking a look at the code now.

Also, I could only get it to work if processing is opening the sketches as 64 bit. This may be because of the way I'm compiling though. It also might be the reason why it crashes.

I'll try to put a fork together that has this work in it. It's still going to take a good amount of work to get stable...

from libfreenect.

JamesHagerman avatar JamesHagerman commented on September 27, 2024

Okay. It's pretty messy, but I forked this repo, added my modifications to the Processing library, and updated the libfreenect driver code to the projects current HEAD.

https://github.com/JamesHagerman/libfreenect

The driver should build (git clone ; cd libfreenect; mkdir build; cd build; cmake ..; make; sudo make install;)

The build.sh script will build the library itself but you need to modify it to set the path for core.jar and jna-4.0.0.jar otherwise it won't compile.

Also, the built files are named incorrectly. They need to be renamed before they will work in processing:

Freenect.jar -> openkinect.jar
libOpenKinect.so -> libkinect.jnilib

Once they've been renamed, they should replace the originals in the Processing/libraries/openkinect/library directory.

The older Kinect should work with no issues. The new Kinect (1473) will work too... but crashes after a few seconds. I'm still looking in to why... I can't tell if it's a driver or library issue.

from libfreenect.

JamesHagerman avatar JamesHagerman commented on September 27, 2024

Oh, and the build.sh script puts the built files in wrappers/java_processing/dist/

from libfreenect.

shiffman avatar shiffman commented on September 27, 2024

Did you ever get any further with this? @galsasson and I have been talking about updating the library to work with kinect 1473. This work may happen in early 2014.

from libfreenect.

JamesHagerman avatar JamesHagerman commented on September 27, 2024

I haven't had time to really get into the code any deeper then may last few posts.

I did add some comments to the build.sh script in my own fork of your code but that's about it.

Honestly, at this point, it might be easier to create a Processing wrapper using the existing upstream Java wrapper... Though I don't know how complete that code is either.

In any case, trying to get this stuff pulled back into the upstream Freenect repo would be helpful...

from libfreenect.

shiffman avatar shiffman commented on September 27, 2024

This library is moving to a different repo and I'll be tracking future issues there. Hope to update for 1473 soon.

https://github.com/shiffman/OpenKinect-for-Processing

from libfreenect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.