Kinect & JME & Input

Hi,



I am using Openni + Kinect + JME (It works well).

What would be the best way to implement x,y,z hand position into the JME coordinate system.



Thanks,

Peter

Hi, this is the same thing the kinect template that I did does, you can move 3d objects with your hand. This is the thread.

1 Like

very nice template) Thank you.



For those who will try to build the JME & Openni note set the param of -Xss100m and start the JME first, and then start the UserTrackerApplication !



[java] HelloJME3 app1 = new HelloJME3();

app1.start(); // start the game



/*Start OpenNi here ! */

JFrame f = new JFrame("OpenNI User Tracker");

f.addWindowListener(new WindowAdapter() {

public void windowClosing(WindowEvent e) {System.exit(0);}

});

UserTrackerApplication app = new UserTrackerApplication(f);



app.viewer = new UserTracker();

f.add("Center", app.viewer);

f.pack();

f.setVisible(true);

app.run();[/java]



Hope helps,

Peter

@glaucomardano: I have been playing with your template for a few days and so far it behaves very well. Great job! I am using it with Kinect for Windows via Tomoto’s bridge. However, I consistently get three errors:


  1. On start before any of the code is entered, I am getting a blender loader error. I’ve noticed that your libraries have Ogre loader included but I see no reason to load any models in. Here it is:


INFO: Caps: [FrameBuffer, FrameBufferMRT, FrameBufferMultisample, TextureMultisample, OpenGL20, OpenGL21, OpenGL30, OpenGL31, OpenGL32, ARBprogram, GLSL100, GLSL110, GLSL120, GLSL130, GLSL140, GLSL150, VertexTextureFetch, TextureArray, TextureBuffer, FloatTexture, FloatColorBuffer, FloatDepthBuffer, PackedFloatTexture, SharedExponentTexture, PackedFloatColorBuffer, TextureCompressionLATC, NonPowerOfTwoTextures, MeshInstancing, VertexBufferArray]
May 17, 2012 3:03:23 PM com.jme3.asset.DesktopAssetManager registerLoader
WARNING: Failed to find loader: com.jme3.scene.plugins.blender.BlenderModelLoader
java.lang.ClassNotFoundException: com.jme3.scene.plugins.blender.BlenderModelLoader
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at com.jme3.asset.DesktopAssetManager.registerLoader(DesktopAssetManager.java:135)
at com.jme3.asset.AssetConfig.loadText(AssetConfig.java:74)
at com.jme3.asset.DesktopAssetManager.(DesktopAssetManager.java:88)
at com.jme3.system.JmeDesktopSystem.newAssetManager(JmeDesktopSystem.java:56)
at com.jme3.system.JmeSystem.newAssetManager(JmeSystem.java:87)
at com.jme3.app.Application.initAssetManager(Application.java:164)
at com.jme3.app.Application.initialize(Application.java:499)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:204)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:131)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:207)
at java.lang.Thread.run(Thread.java:722)

May 17, 2012 3:03:23 PM com.jme3.asset.DesktopAssetManager
INFO: DesktopAssetManager created.


2) After interacting with the my JME application, I get a weird NullPointerException from the InputManager process queue (is it overflowing?). See this:

SWIPE("LEFT, 0.28138882, 161.73677")
May 17, 2012 3:04:42 PM com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.NullPointerException
at com.jme3.input.InputManager.processQueue(InputManager.java:1316)
at com.jme3.input.InputManager.update(InputManager.java:1702)
at com.jme3.app.Application.update(Application.java:595)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:236)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:151)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:178)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:225)
at java.lang.Thread.run(Thread.java:722)

May 17, 2012 3:04:42 PM com.jme3.renderer.lwjgl.LwjglRenderer cleanup


3) Finally, what I've mentioned in another topic - the background threads do not get killed on exit and they hold onto the Kinect device.

Jacob
1) On start before any of the code is entered, I am getting a blender loader error. I’ve noticed that your libraries have Ogre loader included but I see no reason to load any models in. Here it is:


No, this happens because the kinect template doesn't have the blender libraly added on its classpath, you'll have to add it yourself if you wanna load blender models, otherwise, just ignore the error. Btw, the kinect template libralies are a bit out of date, i'll update it as soon, when I have time. Also, I think I'll upload the source code too.

3) Finally, what I’ve mentioned in another topic – the background threads do not get killed on exit and they hold onto the Kinect device.

Jacob


Thanks for testing that, I'll look into this too when I update the project...