New version of tutorial:

There is now a service implemented into MyRobotLab, (Thanks to Alessandro Didonna) Which performs the hand and the LeapMotion in the matter as the video below.

Here is the script link to automaticaly run the hand and the Leap in MyRobotLab:

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

 

This is my original version of the tutorial:

Thanks to Seokju Lee, and Doctor Shim. KAIST
Unmanned System Research Group (USRG) & Field Robotics Center (C-FRIEND)
Flight Dynamics and Control Laboratory (FDCL)
Dept. of Robotics Program

This is exactly what I received for to make the Leap control the InMoov Hand, I have spent many hours pulling of my hair because things are not always obvious for everybody.

Windows is not working correctly with Leap and this script, Linux will work but you won’t have the fancy Visualiser that I showed in the video.

So your best option is to use a Apple Computer, Leap requires a lot of video resource, so don’t expect to do this on a old machine. I used a MacBookPro.

To install the files and node.js you will need to use the terminal, so it is not that easy if you’ve never done that before.

The [directory] tree you will create should be like this:

———————————-

|-[Project folder (you’ve made)]
|—-[node_modules]
|——–[johnny-five]
|——–[ws]
|—-[LeapHand (unzip file)]
|——–[src]
|————[lib]
|—————-joint.js
|—————-leapFrame.js
|————app.js
|——–Makefile
|——–README.md

If you need to adjust the degree rotation of your servos, edit app.js and modify the values.

Comments 12

  1. Profile photo of

    Hi! I’m working in this project but i have some problems in the moment to make run the program, i don’t know what to do, i install the Johny five thing, but the next i stop it,, the js files i have to move it in some folder, or what? please i will thank you if you can send me a guide o some information more specific,
    greetings from Mexico!

  2. Profile photo of OF

    I got this :
    node src/app.js
    module.js:338
    throw err;
    ^

    Error: Cannot find module ‘serialport’
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Board.Serial.detect (/Users/orenforkosh/node_modules/johnny-five/lib/board.js:70:7)
    at new Board (/Users/orenforkosh/node_modules/johnny-five/lib/board.js:328:23)
    at Object. (/Users/orenforkosh/LeapInmoov/LeapHand/src/app.js:11:13)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    make: *** [run] Error 1

    any idea why it can’t find the port ? ( leap motion is working well and Arduino working well too)

    Thanks

        • Profile photo of Gael Langevin

          Hi,
          You need to use MyRobotLab version 1.1.107 to get this script working. That version is available on the InMoov site tutorial about MyRobotLab.
          Run the scriptin the python window with the Leap connected and correctly set in your PC and get the right working with it.

          inmoov = Runtime.createAndStart(“inmoov”,”InMoov”)
          inmoov.startRightHand(“COM7″)
          inmoov.rightHand.index.setMinMax(0,160)
          inmoov.rightHand.thumb.setMinMax(55,135)
          inmoov.rightHand.majeure.setMinMax(50,170)
          inmoov.rightHand.ringFinger.setMinMax(48,145)
          inmoov.rightHand.pinky.setMinMax(30,168)
          sleep(1)
          inmoov.rightHand.startLeapTracking()
          # inmoov.rightHand.stopLeapTracking()

  3. Profile photo of Brett

    Hello Gael,

    I have the Leap motion communicating with the hand, but the script that you provide makes the hand move exactly opposite to the position of my hand (I open my hand, InMoov makes a fist). Is a there a quick solution to this problem?

  4. Profile photo of Rahul Kumar

    Hello Gael,
    I have built your model and it is successfully working with leap motion controller. I wonder how can i take values of the z axis of the hand so that i can provide that value to the biceps i built. Your code limits the value to the fingers and palm rotation.

    • Profile photo of Gael Langevin

      Indeed, currently the codes only take the hand as value. Normaly with my first code, the z axis is actuating the wrist.
      To modify that, in order to adapt it for the bicep, you will be on your own. Because it’s been a while back since I digged into these codes, and currently I really don’t have the time appropriate to get back on that.
      I think you should share your thought on the forum, certainly some people will come along to help modifying the code.

Leave a Reply