• warning: get_headers() [function.get-headers]: This function may only be used against URLs in /var/www/html/myrobotlab/themes/superclean/repoFile.php on line 35.
  • warning: file_get_contents(//home/Alessandruino/leapBasic.py) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/myrobotlab/themes/superclean/repoFile.php on line 38.

LeapMotion

javadoc

This service will use the hand tracking capabilities of the Leap Motion device with the power of the SDK v2.

 

In order to get it working properly :

1) Install the LeapMotion Software from here : https://www.leapmotion.com/setup

2) Install the LeapMotion2 service from the MyRobotLab Runtime tab (just like you do with the other services ) MRL VERSION 1.0.95 or higher 

3)Enjoy the LeapMotion2.py example script

References:

Here is a script to test if your LeapMotion device is working properly with Myrobotlab

Here is another script to make the LeapMotion to track your fingers and to move InMoov fingers accordling 

 

Example for develop:

#file : LeapMotion.py edit raw

#####################################################
#
# this simple script will print in the python tab the grab strength 
# of your left hand
#
# LeapMotion finger types are defined
# as the following:
# Type.TYPE_THUMB 
# Type.TYPE_INDEX 
# Type.TYPE_MIDDLE
# Type.TYPE_RING 
# Type.TYPE_PINKY

from com.leapmotion.leap.Finger import Type
# from __future__ import division

leap = runtime.start("leap","LeapMotion")

leap.addFrameListener(python)

def onFrame(frame):
 
 strength = ((frame.hands().leftmost().grabStrength())*100)
 print strength

leap.startTracking()

mryosoo's picture

Hey man! nice work on the

Hey man! nice work on the leap motion. I just want to ask. If i want to do it in a python script only with no myrobotlab, what will i modify with the code?

laia's picture

get angles leap motion

Hello,

how can I get the angles that the leap motion is setting to the servos? I can't find documentation of how the function inmoov.rightHand.startLeapTracking() works.

What I need is to do something like this:

inmoov.rightHand.index.write(leapmotionAngleIndex).
 
Thank you!
Alessandruino's picture

Hi.. try with this script and

Hi.. try with this script and let me know :