There are curently two functions, in MyRobotLab, to create gestures.

-The first one is a voice command called “capture gesture” which lets you create any gestures you want.

-The second function is a service called InMoovGestureCreator

How to on the first function:

-Set the servos at the positions you like using the cursors in MRL.
-Create a new python file on MRL.
-Say in your microphone “capture gesture“.
-Confirm with “okay”.
-This will create a text with all the positions of your servos in the new python file.
It should look like this:
-Copy it and past it at the end of your InMoov full script.
-Give it a name.
-Add a ear command using the same name.

In this exemple, I called the gesture “hands flat”:

You can see the various speeds and servos positions. “Capture gesture” doesn’t create the speeds, you need to copy/paste them if you want to change the speeds in your gesture, if you don’t, your gesture will use the last speeds called with the previous gesture invoked.

Speeds are set in the same order as servo to pins connections.

So, here under is the inmoov.full script in which I have added the “hands flat” captured gesture.

#file : InMoov.full.py

Look out for indentation, python is very strict about that.
Hope this helps

 

How to on the second function:

Using the Gesture Creator is another very handy solution. Thanks to Ma.Vo for building that service into MyrobotLab.

Keep the power cord handy, altough normally with good min max settings shouldn’t get something wrong, but I don’t want to be responsible for broken servos! ; )

 

Explanation:

To connect to InMoov simply run your InMoov script, then start InMoovGestureCreator (or start it first, it’s the same). Now click on “Connect” – the Button will change into “Disconnect”, you are connected and can start making gestures (you can make them without InMoov-Connection, too, but you can’t test them directly).

In the list with the frame, you may sometimes want to use the arrow keys (UP / DOWN) to get to a frame that is under the edge.

And when you copy the generated code out, please use “STRG” + “A” to mark the whole text (and “STRG” + “C” to copy it).

The gesture list will sometimes use a “X” in front of a function, this means the function contains operations that aren’t supported by the editing/creating part, you can’t load it, but update and remove it.

When a gesture contains movements that don’t implement the whole section (e.g. “i01.moveHead(10,10)” instead of “i01.moveHead(10,10,10,10,10)”), it will take “90” for the servos that aren’t implemented. The same is with the speed, here it will take 1.0 for unimplemented servos.

 

Tabs:

main -> Switch sections ON/OFF (they are saved, but can’t be edited and displayed until it is switched ON again)

Right Hand/Right Arm/Left Hand/Left Arm/Head/Torso -> Edit the actual servo positions

 

Buttons:

Connect / Disconnect -> Connect to / Disconnect from InMoov

Load Scri                      -> Load the current script out of the Python service (has to be executed first)

Save Scri                      -> Save the script / Export the script (a new window will open)

Load Gest                    -> Load the selected gesture for editing

___ ___ Add Gest      -> Add the loaded gesture to the script

___ ___Update Gest -> Update the selected gesture with the loaded one

Remove Gest              -> Removes the selected gesture out of the script

Test Gest                      -> Test your created gesture (requires InMoov – connection)

 

_____Add                     -> Add a frame with servo movements

Add Speed                    -> Add a frame with speed settings

_____Add Sleep          -> Add a frame with sleep

_____Add Speech      -> Add a frame with speech

 

Import Min Rest Max    -> Import the current InMoov min-/ rest-/ max-settings (requires InMoov – connection)

Remove                         -> Remove the selected frame (servo, sleep, speech or speed)

Load                               -> Load the selected frame (servo, sleep, speech or speed)

Update                           -> Update the selected frame (servo, sleep, speech or speed)

Copy                               -> Copy the selected frame (servo, sleep, speech or speed)

Up                                   -> Move the selected frame up (servo, sleep, speech or speed)

Down                              -> Move the selected frame down (servo, sleep, speech or speed)

Test                                 -> Test the selected frame (servo, sleep, speech or speed) (requires InMoov – connection)

 

CheckBoxs:

Move Real Time            -> Move your robot when you adjust the sliders (requires InMoov – connection)

Comments 2

Comments are closed.