Troubleshoot with gestures InMoov2.0

I made a few test with the my updated script InMoov2full.py because Grog has implemented all the gestures into the new service and I discovered something odd.

The same gestures with exact same positions on the script don't give the same result depending on the version that calls them.

For exemple this is "rest" default position with the version 1695 (InMoov1.0). You can see "rotate" servo is facing the camera and the position on the slider is 90:

 

In this second exemple it is again "rest" default position with the version 1987 (InMoov2.0). You can see "rotate" servo is NOT facing the camera and the position on the slider is 90:

 

This error occurs with all the gestures, I'm not sure it affects only "rotate" servo, but it is the most obvious.

The problem makes it impossible to use the gesture "poor bottle" because the hands are very wrongly positionned and it makes a real mess on the carpet when InMoov tries to serve me a little beer.

:)

Also, the tracking nor the camera are activated after the initialisation is complete. I have to click on capture by hand.

Jaw servo doesn't seem to work anymore according to voice, I tried to test with another script that used to work with InMoov2.0 but the script now gives an error.

This is the script I could use before:

#inmoov2.ear and mouth talk
headPort = "COM7"

i01 = Runtime.createAndStart("i01", "InMoov")
head = i01.startHead(headPort)
#neck = i01.getHeadTracking()
#neck.faceDetect()

#eyes = i01.getEyesTracking()
#eyes.faceDetect()
############################################################
#if needed we can tweak the default settings with these lines
i01.head.jaw.setMinMax(6,30)
i01.head.mouthControl.setmouth(6,30)
############################################################

ear = runtime.createAndStart("ear","Sphinx")

ear.attach(i01.head.mouthControl.mouth)
ear.addCommand("attach head", "i01.head", "attach")
ear.addCommand("disconnect head", "i01.head", "detach")

ear.addCommand("manual", ear.getName(), "lockOutAllGrammarExcept", "voice control")
ear.addCommand("voice control", ear.getName(), "clearLock")
 
ear.addComfirmations("yes", "correct", "yeah", "ya")
ear.addNegations("no", "wrong", "nope", "nah")

# all commands MUST be before startListening
ear.startListening()

 

 

One last point, but maybe that's because Grog didn't get the time to implement them yet in the background, none of the default gestures work at voice command:

ear.addCommand("open hand", i01.getName(), "handOpen", "both")
ear.addCommand("close hand", i01.getName(), "handClose", "both")
ear.addCommand("camera on", i01.getName(), "cameraOn")
ear.addCommand("off camera", i01.getName(), "cameraOff")
ear.addCommand("capture gesture", i01.getName(), "captureGesture")
ear.addCommand("track", i01.getName(), "track")
ear.addCommand("freeze track", i01.getName(), "clearTrackingPoints")
ear.addCommand("hello", i01.getName(), "hello")
ear.addCommand("giving", i01.getName(), "giving")
ear.addCommand("fighter", i01.getName(), "fighter")
ear.addCommand("fist hips", i01.getName(), "fistHips")
ear.addCommand("look at this", i01.getName(), "lookAtThis")
ear.addCommand("victory", i01.getName(), "victory")
ear.addCommand("arms up", i01.getName(), "armsUp")
ear.addCommand("arms front", i01.getName(), "armsFront")
ear.addCommand("da vinci", i01.getName(), "daVinci")


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
GroG's picture

Hmmmm... still lots of

Hmmmm... still lots of problems.... :( But thanks for testing :) Yay !

Ok, lets address them in order...

Servo Positions
I suprised at this, my first thought is that the formula needed to support mapping range values in Servo is affecting it.

positioning is now processed through the following formula

public float calc(float s){
	return  minY + ((s - minX)*(maxY - minY))/(maxX - minX);
}

This allows the map function to exist, which will allow any range of servo positions to be mapped on any other range.  But maybe the calculation is effecting the previous positioning.  I think I should be able to test this - I'll just capture the output from the Servo service being sent to the servo in the two versions...  Thanks for the heads up.

 

MouthControl

The mouth control script requires a very small change.  The issue is mouthControl is no longer in head .. its just part of InMoov ..  so i01.head.mouthControl becomes i01.mouthControl

#inmoov2.ear and mouth talk
headPort = "COM15"
 
i01 = Runtime.createAndStart("i01", "InMoov")
mouthControl = i01.startMouthControl(headPort)
head = i01.startHead(headPort)
ear = i01.startEar()
mouth = i01.startMouth()
mouth.speakBlocking("Ok Gael I think I got it this time")
#neck = i01.getHeadTracking()
#neck.faceDetect()
 
#eyes = i01.getEyesTracking()
#eyes.faceDetect()
############################################################
#if needed we can tweak the default settings with these lines
i01.head.jaw.setMinMax(6,30)
mouthControl.setmouth(6,30)
############################################################
 
ear = runtime.createAndStart("ear","Sphinx")
 
ear.attach(i01.mouthControl.mouth)
ear.addCommand("attach head", "i01.head", "attach")
ear.addCommand("disconnect head", "i01.head", "detach")
 
ear.addCommand("manual", ear.getName(), "lockOutAllGrammarExcept", "voice control")
ear.addCommand("voice control", ear.getName(), "clearLock")
 
ear.addComfirmations("yes", "correct", "yeah", "ya")
ear.addNegations("no", "wrong", "nope", "nah")
 
# all commands MUST be before startListening
ear.startListening()
 
Default Gesture
 
I wasn't sure what should be included in the default gestures... I could look in 1695 .. or use the list which you were trying.  Either way this would be trivial.
 
Thanks again for testing Gael, I've been busy with work work - but there is an additional problem I now have to deal with ... https://code.google.com/p/myrobotlab/downloads/list no longer allows updates :P
They have changed their policy regarding posting releases - so I have to move mrl to another system/site.  I'm trying github, but they have issues with some of their tools.. and there is a lot of infrastructure I need to get working in order to migrate.
hairygael's picture

Thanks a lot Grog for looking

Thanks a lot Grog for looking into this.

Man, if you need to migrate the whole site, it is going to be heavy...

I will test the #inmoov2.ear and mouth talk script to see if it works

 

hairygael's picture

Perfect I think your

Perfect I think your correction about the mapping values interfering the min and max is fixed!!!

Only the jaw seems to have some trouble behaving with the voice, although the servo is correctly attached. The slider has effect on it.