Hi Anyone,  

I am hoping someone can help me out.  I am working on getting my Kinect to work in MyRobotLab.  I'm on Windows 7, x86 64 bit.  The Kinect is installed and shows as a properly installed device in my device manager. 

I start MRL and create an OpenCV service.  I then select to use OpenKinect as the source and click capture, however, I don't see any image.  Is there something I'm missing?  Perhaps a 3rd party dependency ?

 

When I run it in the eclipse debugger, I see an exception happening in VideoProcessor.java  in the following line:

frame = grabber.grab();

 

Exception in thread "ll_videoProcessor" java.lang.ExceptionInInitializerError
at com.googlecode.javacv.OpenKinectFrameGrabber.grabVideo(OpenKinectFrameGrabber.java:218)
at com.googlecode.javacv.OpenKinectFrameGrabber.grab(OpenKinectFrameGrabber.java:246)
at org.myrobotlab.opencv.VideoProcessor.run(VideoProcessor.java:270)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.IllegalStateException: Can't overwrite cause
at java.lang.Throwable.initCause(Throwable.java:456)
at com.googlecode.javacpp.Loader.load(Loader.java:581)
at com.googlecode.javacpp.Loader.load(Loader.java:532)
at com.googlecode.javacv.cpp.freenect.<clinit>(freenect.java:119)
... 4 more
 
It seems to be somewhere in the init of the freenect class, but I'm not really sure whats happening beyond that .

Thanks,

-Kevin

 

Alessandruino

9 years 8 months ago

Another important stuff ... You have to use openNI service...not openCV service :)

kwatters

9 years 8 months ago

Hi Alessanduino.
  Thanks for the pointer to the latest kinect drivers.  I downloaded v 1.8 and updated my drivers locally.  So, hopefully that part is ok now.  I noticed that you can't create an OpenNI service from the runtime gui, but luckily, I see I can just create that via python/jython.  It seems, I'm missing some libraries in my library path I suppose.    I tried adding "C:\Program Files\Microsoft SDKs\Kinect\v1.8\lib\amd64"   (and x86) to the java.library.path property, but same error.  
  Any thoughts?
 
Thanks again for your help!
  -Kevin
 
Python:
openni = Runtime.createAndStart("openni", "OpenNI")
 
Java Stacktrace:
Caused by: java.lang.UnsatisfiedLinkError: SimpleOpenNI.SimpleOpenNIJNI.swig_module_init()V
        at SimpleOpenNI.SimpleOpenNIJNI.swig_module_init(Native Method)
        at SimpleOpenNI.SimpleOpenNIJNI.<clinit>(SimpleOpenNIJNI.java:290)
        at SimpleOpenNI.ContextWrapper.getcwd(ContextWrapper.java:67)
        at SimpleOpenNI.SimpleOpenNI.start(Unknown Source)
        at org.myrobotlab.service.OpenNI.initContext(Unknown Source)
        at org.myrobotlab.service.OpenNI.startService(Unknown Source)
        at org.myrobotlab.service.Runtime.createAndStart(Unknown Source)
 

Hi kevin, are you using the MRL packet i mentioned in the last comment? (http://myrobotlab.org/content/mrl-evolution)

That is a packet which contains all the required dependencies you need... (other versions will not work)

If yes, send a noworky after you get the java error . This will send us a log which will help us to find was is happening

here is how to send a noworky :

http://myrobotlab.org/content/helpful-myrobotlab-tips-and-tricks-0#noWo…

 

Alessandro

kwatters

9 years 8 months ago

Hi Alessandro,

  Thanks for the follow up.  I'll do a bit more debugging and see if I can find which library is missing.  I'm a bit busy the next few days, but maybe this weekend I can get some time to look into it.  If I find the solution I'll post back what I found,  otherwise, I'll go down the no-worky path.  (Pretty cool to have the bug reporting directly in the app..  that's a pretty neat feature..)

 

Best,

  -Kevin

kwatters

9 years 8 months ago

I noticed the OpenNI.java has a main function for quick testing.  (very helpful example.)  After stepping through that I quickly found the names of the libraries that I was missing.  I hunted those down in the build and found that I needed to unzip the file
 
repo\com.googlecode.simpleopenni\1.96\win64.zip 
 
in the myrobotlab library directory.
 
\myrobotlab\libraries\jar\x86.64.windows\win64
 
(I suppose someone on win32 would have to choose the win32 zip file.)
 
Once I did that, the kinect initialized and I saw the OpenNI service returning some imaging and depth info.
 
Thanks for the guidance!
 
Seems like I need to do a little work on my local build.  I think there are a few issues that it doesn't pick up all the dependencies when it created the tar/gz.