Gesture issue with InMoov

146 views
Skip to first unread message

Roger

unread,
Oct 23, 2021, 10:12:13 PM10/23/21
to InMoov
Hi Gael, 

I followed the instructions in here: https://inmoov.fr/how-to-create-gestures-for-inmoov/
created a (test) takeobject.py  in inmoov/gestures folder below:

def takeobject():
    i01.setHandVelocity("left", 43, 43, 43, 43, 43, 43)
    i01.setHandVelocity("right", 43, 43, 43, 43, 43, 43)
    i01.setArmVelocity("right", 31, 43, 23, 43)
    i01.setArmVelocity("left", 60, 23, 31, 31)
    i01.setHeadVelocity(43, 43)
    i01.setTorsoVelocity(31, 16, -1)
    i01.moveHead(77.0,90.0,160.0,70.0,0.0,90.0)
    i01.moveArm("left",89.0,75.0,66.0,19.0)
    i01.moveHand("left",0.0,0.0,0.0,0.0,180.0)
    i01.moveArm("right",90.0,91.0,72.0,26.0)
    i01.moveHand("right",86.0,51.0,133.0,162.0,180.0)

and then added this section below to the end of the file file:  mrl/myrobotlabXXXX/InMoov/chatbot/bots/en/aiml/_inmoovGestures.aiml


<category><pattern>TAKE OBJECT</pattern>
  <template>I 
  <oob><mrl><service>python</service><method>exec</method><param>takeobject()</mrl></oob></template>
</category>
</aiml>

I restarted MRL and say the take object command, and nothing happens, 
I tried other gestures command like , close your hands and nothing happens...., 
now, no gestures work..., 

Please advice, 

Thank you, 

gael langevin

unread,
Oct 24, 2021, 10:21:21 AM10/24/21
to Roger, InMoov
Hello,
Make sure you do not have twice the end aiml balise:
</aiml>
It can happen when you copy paste.

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 view this discussion on the web visit https://groups.google.com/d/msgid/inmoov/a3fa265f-f951-45b9-96ba-a6b915678711n%40googlegroups.com.

Roger

unread,
Oct 24, 2021, 8:04:40 PM10/24/21
to InMoov
Hi Gael, 

Yes I confirmed it only has one </aiml> at the end, 

and I restarted mrl several times and it did not pick up the new gesture I created.. , 

Please advice, 

Thank you 

gael langevin

unread,
Oct 25, 2021, 4:05:56 AM10/25/21
to Roger, InMoov
Can you post both files (.aiml  +  .py) and the myrobotlab.log
There must be some writing error in one of your code, especially if you say that now none of the voice commands and gestures works.

Gael Langevin
Creator of InMoov
InMoov Robot
@inmoov



Roger

unread,
Oct 29, 2021, 8:41:58 PM10/29/21
to InMoov
Hi Gael, 

Finally I got hold of it,  attached are the :

1. takeobject.py  (my test gesture)
2. _inmoovGesture.aiml (added in a category at the bottom)
3. myrobotlab logs  (I think the latest logs message are at the bottom half of the logs which I dont really understand.... why it does not respond to my voice commands and gestures has stopped working since the change...) 

Please advice, 

Thank you for your help as always!
takeobject.py
_inmoovGestures.aiml
myrobotlab.log

gael langevin

unread,
Oct 30, 2021, 6:06:16 AM10/30/21
to Roger, InMoov
Hello,
From your log file the robot can hear you and give proper responses.
Now from what I see, you tried to tell him some commands that are unknown in the aiml files.
For example you said "close your hands", which is not a proper command, so the robot answered "I like to listen and be of service".
Then you told him "go to hell", to which he responded "I didn't find hell among your installed apps.  Let's try to find it."

The proper command would have been: "close hands", to which the robot would respond: "Closing my hands." And execute the python script "handsclose()"

The command you have created works properly when I test it. I allowed myself to modify it a little to make sure Chrome speech recognition understands what is the command.
So now the command is:" Take the object", to which the robot will answer "Sure, I take the object." and it will execute the python script "takeobject()"
I also modified the python script to ensure the gesture has a beginning and a end.
def takeobject():
    i01.startedGesture()

    i01.setHandVelocity("left", 43, 43, 43, 43, 43, 43)
    i01.setHandVelocity("right", 43, 43, 43, 43, 43, 43)
    i01.setArmVelocity("right", 31, 43, 23, 43)
    i01.setArmVelocity("left", 60, 23, 31, 31)
    i01.setHeadVelocity(43, 43)
    i01.setTorsoVelocity(31, 16, -1)
    i01.moveHead(77.0,90.0,160.0,70.0,0.0,90.0)
    i01.moveArm("left",89.0,75.0,66.0,19.0)
    i01.moveHand("left",0.0,0.0,0.0,0.0,180.0)
    i01.moveArm("right",90.0,91.0,72.0,26.0)
    i01.moveHand("right",86.0,51.0,133.0,162.0,180.0)
    i01.finishedGesture()

Bellow are the modified files.
I hope this helps.

Gael Langevin
Creator of InMoov
InMoov Robot
@inmoov



_inmoovGestures.aiml
takeobject.py

Roger

unread,
Oct 31, 2021, 8:51:08 PM10/31/21
to InMoov
Hi Gael, 

Oh I see, I missed the beginning and an end, no wonder it was not working for me, it all makes sense now, 

Thank you so much for your modifications (it looks more structured!) and assistance as always, 

I tested the voice commands and my new gesture, it is working perfectly! 

I'm going to try create more and more gestures now, 

Thank you :D!
Reply all
Reply to author
Forward
0 new messages