Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
H3D.org Feeds


Browsing this Thread:   1 Anonymous Users






Using Leap Motion with H3D
#1
Not too shy to talk
Not too shy to talk


See User information
Hello,

I'm trying to make the Leap Motion work with H3D in linux (which is surprisingly much harder to do than in windows). I got it to mostly work using the Leap python documentation and it can now communicate cursor positions with H3D.

The issue I'm facing is with flickering in the leap cursor (represented as a sphere in the scene) and some delay when moving my hand quickly in the environment above the leap. The leap-provided diagnostics screen shows no lag, but for some reason there is some in H3D.

The way I set it up might be to blame, or it could be that in combination with the difference in the leap and H3D frequencies (If I understand correctly, H3D updates the scene at 60Hz +- 4Hz and the leap runs at anywhere between 100-120Hz). The message from the leap is read in the python script associated with the x3d file by listening to a UDP channel message.

Another observation I made is that the flickering seems worse when the objects in the scene interact (example: the leap sphere is going inside a semi-transparent spherical target). I should mention that the robot sphere in the same scene does not exhibit any of these issues (Using --deviceinfo argument for that).

I attached the code files I'm using. The first file to run is Controller_leap.py in the calibration folder.

Edit: Fixed statement about robot, using --deviceinfo, not HDEV

Attach file:


Link only for registered users

Posted on: 7/12 22:38
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top


Re: Using Leap Motion with H3D
#2
Just can't stay away
Just can't stay away


See User information
hi
In my opinion, i doubt the cause of the flickering is due to the frequency between h3d rendering and the leap motion update if h3d is at 60 hz.
Are you sure that your example is running at around 60HZ in H3D ? At 60hz, you should not notice heavy flickering unless your device is moving really fast.

One potential issue might be in the controller_leap.py.
Not sure what is the frequency of the data polling and sending there. If somehow that one is slow, then it can also cause the flickering. I would recommend you to monitor the frequency there.

So, in conclusion , please check the actual fps in your example, and check the frequency of the UDP package sending . Either of them being slow can cause the problem you have.

Posted on: 8/2 11:14
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top


Re: Using Leap Motion with H3D
#3
Not too shy to talk
Not too shy to talk


See User information
Thanks for the suggestions, hao.

I tried a few things and eventually just gave up on using the UDP channel altogether. I incorporated grabbing the leap data into the main protocol (python script node in H3D). I also upgraded the display adapter driver and turned off all funky anti-aliasing stuff. This seems to have reduced the problem but did not eliminate it.

you mentioned checking the fps, is there a way to do that within the python/H3D environment? I'm not sure how I would go about monitoring fps in this case.

Posted on: 8/16 22:19
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top


Re: Using Leap Motion with H3D
#4
Just can't stay away
Just can't stay away


See User information
there are many ways to monitor the h3d frame rate. First in h3dviewer, you can press F8 to bring up a ui which displays the frame rates.

Or you can use some other gaming fps monitor tools such as fraps to monitor the fps of the application. Since h3d is a rendering program like a game, you will also get frame rate data through those tools.

If your frame rate is good enough, the lagging issue should not be that serious as you described.

Posted on: 8/17 10:04
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top







You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create pdf.
You cannot get print page.

[Advanced Search]





(C) 2012 SenseGraphics AB    ---    Powered by XOOPS