How to control InMoov hand using Leap motion through MyRobotLab

388 views
Skip to first unread message

Abdulrahman Al-Farras

unread,
Jul 26, 2016, 8:09:36 PM7/26/16
to InMoov

Hello,

I Tried to make the arduino controlling the hand's servo motors using Leap motion sensor through MyRobotLab using Java/Python script, I was able to read the data from the leap motion in real-time but I'm still trying hard to find a way to send these data to arduino and convert it to values that reflect on the servo motors rotation. Could you please walk me through the steps on how to achieve that?

- The Arduino is connected to the MyRobotLab.
- The fingers are attached to the Arduino on the correct pins.
- Leap motion is connected to the MyRobotLab.

I just want to know the correct Java/Python script that can make the intergration between the sensor and the hand happen.

Thank you for your time,
Abdurrahman.
Capture.PNG

Christian Béliveau

unread,
Jul 26, 2016, 9:13:21 PM7/26/16
to InMoov
Maybe this script can help you


It gives you an handle to the data in python, so you can use it to move your servo

Christian

gael langevin

unread,
Jul 27, 2016, 6:41:45 AM7/27/16
to Christian Béliveau, InMoov
This one works with version 1.0.107 of MyRobotLab but can be adapted to work with the recent versions.
https://github.com/MyRobotLab/pyrobotlab/blob/master/home/hairygael/InMoov2LeapMotion1.py

Make sure you have the correct MRLComm.ino uploaded on your Arduino.

Gael Langevin
Creator of InMoov
InMoov Robot
@inmoov



--
You received this message because you are subscribed to the Google Groups "InMoov" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inmoov+un...@googlegroups.com.
To post to this group, send email to inm...@googlegroups.com.
Visit this group at https://groups.google.com/group/inmoov.
For more options, visit https://groups.google.com/d/optout.

Abdulrahman Al-Farras

unread,
Jul 27, 2016, 4:52:10 PM7/27/16
to InMoov
Thanks Christian,

 but I already tried this script, and It works fine producing data from the leap motion, but it does not reflect my hand movement on the servo motors, Is there a way to modify the script so I can make that happen?

Abdulrahman Al-Farras

unread,
Jul 27, 2016, 4:56:52 PM7/27/16
to InMoov, christian...@gmail.com
Thank you Gael,

I uploaded MRLComm to the arduino successfully, I tried to run the script you suggested on python but it shows me this message:

1723690 [python.interpreter.33] ERROR class org.myrobotlab.logging.Logging  - ------
Traceback (most recent call last):
 
File "<string>", line 2, in <module>
AttributeError: 'NoneType' object has no attribute 'startRightHand'

    at org
.python.core.Py.AttributeError(Py.java:166)
    at org
.python.core.PyObject.noAttributeError(PyObject.java:930)
    at org
.python.core.PyObject.__getattr__(PyObject.java:925)
    at org
.python.pycode._pyx41.f$0(<string>:9)
    at org
.python.pycode._pyx41.call_function(<string>)
    at org
.python.core.PyTableCode.call(PyTableCode.java:165)
    at org
.python.core.PyCode.call(PyCode.java:18)
    at org
.python.core.Py.runCode(Py.java:1261)
    at org
.python.core.Py.exec(Py.java:1305)
    at org
.python.util.PythonInterpreter.exec(PythonInterpreter.java:206)
    at org
.myrobotlab.service.Python$PIThread.run(Python.java:149)

I'm not sure how to fix it, and my programing skills aren't that good.

gael langevin

unread,
Jul 27, 2016, 5:06:28 PM7/27/16
to Abdulrahman Al-Farras, InMoov, Christian Béliveau
Which version of MRL are trying to use?
I currently do not have a Arduino and Leap to test the script, but it could be that the script would work directly on recent version 1.0.1412.
Don't forget to reload the correct MRLComm.ino.
Also you will need to adapt the min and max settings of each finger to your configuration.

Gael Langevin
Creator of InMoov
InMoov Robot
@inmoov



Abdulrahman Al-Farras

unread,
Jul 27, 2016, 6:26:06 PM7/27/16
to InMoov, abdulrahma...@gmail.com, christian...@gmail.com
I am running the MRL 1.0.119, I try to update it but it says no new apdates are available.

I copied the MRL arduino script that comes when I run inmoov hand to the arduino and uploaded the script.

I tried looking for the MRL version you mentiond but I didnt find it.

Christian Béliveau

unread,
Jul 27, 2016, 9:16:39 PM7/27/16
to InMoov, abdulrahma...@gmail.com, christian...@gmail.com
hi Abdulrahman

the newest versions are found on the top of the shoutbox on the MRL webpage. you will found only the release version in the download page, 1412 and the following version are still in develop mode

here a direct link for 1.0.1412

Abdulrahman Al-Farras

unread,
Jul 28, 2016, 9:47:27 AM7/28/16
to InMoov, abdulrahma...@gmail.com, christian...@gmail.com
Thank you Christian,

I am having a problem the the version that I downloaded using the link you provided, after it downloads the .Jar file I try to open it but it does not show up.
I updated the Java platform to latest version and it is still does not show the MRL window like the previous version, What possibly could be the reason for this?

Christian Béliveau

unread,
Jul 28, 2016, 2:23:45 PM7/28/16
to InMoov, abdulrahma...@gmail.com, christian...@gmail.com
be sure you install new version in a new directory to be sure no extracted files from the old version interfer with the newest version

Christian

Abdulrahman Al-Farras

unread,
Jul 30, 2016, 4:54:59 PM7/30/16
to InMoov, abdulrahma...@gmail.com, christian...@gmail.com



Well, Everything is setup correctly, I followed the instruction and the tutorials both on the Inmoov website and MRL.



and the MRLcommn.ino is uploaded to the arduino

This is what I did so far, it tells me the error in line 2, which is the port line, but as you see it is setup correctly, what could be the problem?

Christian Béliveau

unread,
Jul 30, 2016, 5:17:00 PM7/30/16
to InMoov, abdulrahma...@gmail.com, christian...@gmail.com
did you install InMoov service?

tab Runtime... look if InMoov is installed

Abdulrahman Al-Farras

unread,
Jul 30, 2016, 5:27:46 PM7/30/16
to InMoov, abdulrahma...@gmail.com, christian...@gmail.com


it is installed, but when I try to run it it shows me an error message, I tried closing MRL and running inmoov alone still didn't work.

This really driving me crazy, I feel that I am close to see the action but I keep struggling with different stuff every time

gael langevin

unread,
Jul 30, 2016, 5:32:02 PM7/30/16
to Abdulrahman Al-Farras, InMoov, Christian Béliveau
Get on the MRL shoutbox, if Kevin or Greg are there, or other developers, they will help you live to get your error solved.

Gael Langevin
Creator of InMoov
InMoov Robot
@inmoov



--

jesus perez

unread,
Dec 13, 2017, 3:30:28 AM12/13/17
to InMoov
Could you get it todo work? The same thing is happenning to me

gael langevin

unread,
Dec 14, 2017, 3:39:14 AM12/14/17
to jesus perez, InMoov
Hello which version of MRL are you using?

Gael Langevin
Creator of InMoov
InMoov Robot
@inmoov



2017-12-13 9:30 GMT+01:00 jesus perez <jesuses...@gmail.com>:
Could you get it todo work? The same thing is happenning to me
--
You received this message because you are subscribed to the Google Groups "InMoov" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inmoov+unsubscribe@googlegroups.com.

Joseph Heady

unread,
Dec 18, 2017, 5:10:07 AM12/18/17
to InMoov
Hey I just got done building the hand/forearm and got it working with the Leap Motion camera. I didn't use MRL.. so I can't help there. But if you're interested, here is an instructable I just now (within 4mins) finished on how to get the hand working with Leap Motion: https://www.instructables.com/id/Robot-Hand-Control-Leap-Motion-JavaScript-Nodejs-a/

Please let me know if this is of assistance to you!

Thank you,
Joseph


On Thursday, December 14, 2017 at 12:39:14 AM UTC-8, gael langevin wrote:
Hello which version of MRL are you using?

Gael Langevin
Creator of InMoov
InMoov Robot
@inmoov



2017-12-13 9:30 GMT+01:00 jesus perez <jesuses...@gmail.com>:
Could you get it todo work? The same thing is happenning to me

--
You received this message because you are subscribed to the Google Groups "InMoov" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inmoov+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages