Leap Motion

Can please somebody help me? Im a completly new guy at this and i cant get the leap motion sensor to work, no matter what. and yes i try with the example code

hairygael's picture

I don't know if you are using

I don't know if you are using InMoov with your Leap Motion but if yes, here is the code to get the right hand working with the LeapMotion:

https://github.com/MyRobotLab/pyrobotlab/blob/master/home/hairygael/InMoov4.LeapMotion.py

# Leap + InMoov hand version MRL above 2000
inmoov = Runtime.createAndStart("inmoov","InMoov")
inmoov.startRightHand("COM7","atmega2560")
inmoov.rightHand.index.map(0,180,0,160)
inmoov.rightHand.thumb.map(0,180,55,135)
inmoov.rightHand.majeure.map(0,180,50,170)
inmoov.rightHand.ringFinger.map(0,180,48,145)
inmoov.rightHand.pinky.map(0,180,30,168)
inmoov.rightHand.wrist.map(0,180,10,170)#rollwrist
inmoov.rightHand.setVelocity(-1,-1,-1,-1,-1,-1)
sleep(1)
inmoov.rightHand.startLeapTracking()

# inmoov.rightHand.stopLeapTracking()

GroG's picture

"Service Pages' should always

"Service Pages' should always have working examples at the bottom of the documentation.

All documentation can be found with the URL pattern

http://myrobotlab/service/{Service Name}

So, 
in the case of LeapMotion is would be :

http://myrobotlab.org/service/LeapMotion

Information & Examples should be there..

pejelagartozilla's picture

Yes i am using it with inmoov

Yes i am using it with inmoov, but when i run the code the hand just closes and remains close no matter what i do.