All Tutorials / Jlucben / Synbot Plugin Tutorial - interface to Syn Bot Software

Synbot Plugin Tutorial - interface to Syn Bot Software

EZ Robots Commands SIML Framework - Configuration - Verb

Verb

Maps movement_verb_1_fr and movement_verb_1_en are used to configure for the suffixed language (fr and en) the text keywords which will be recognized in User Input messages as a [Verb)

Code:

[MapItem Content="swing" Value="%F NO SWING" /]
[MapItem Content="go" Value="%F NO GO" /]
[MapItem Content="move" Value="%F NO GO" /]
[MapItem Content="roll" Value="%F NO ROLL" /]
[MapItem Content="walk" Value="%F NO WALK" /]
[MapItem Content="run" Value="%T NO WALK FAST" /]
[MapItem Content="turn off" Value="switch off" /]
[MapItem Content="turn on" Value="switch on" /]
[MapItem Content="turn" Value="%F NO TURN2" /]
[MapItem Content="lift" Value="%F DIR LIFT" /]
[MapItem Content="raise" Value="lift" /]
[MapItem Content="switch off" Value="%F POS STOP1" /]
[MapItem Content="switch on" Value="%F POS START1" /]code] If the first character of Value is not % , entry will be linked to the value.
For example "raise" will be equivalent to "lift" which is the main entry.
On a main entry content
Word 1
Character 1 = %
Character 2 specify if or not a parameter will be present in Word 4 - T True if present , F False if not.

Word 4 if present is a parameter value - this value can be retrieved when building Bot Response Message by value of User Variable Verbargument
This argument if present for Movement Direction Verb can be interpreted as movement speed mnemonic - Map move_speed_global - example is verb Run linking to the FAST mnemonic

Word2 is used to specify if [Verb] will be interpreted with a Synonym Command - Its a mnemonic configured in Synonym_autho_model Map (See after)

Word 3 is a mnemonic link to the Map movement_verb_group in which are defined for the mnemonic link entry global configuration parameters (valid for every language used).
[code][Map Name="movement_verb_group"]
[MapItem Content="GO" Value="% DIR FBLR FBLR SPEED1 ALL GO MOVE" /]
[MapItem Content="GO1" Value="% DIR FBLR FBLR SPEED1 ALL GO1 MOVE" /]
[MapItem Content="ROLL" Value="% DIR FBLR FBLR SPEED1 WITHWHEELS MOVE MOVE" /]
[MapItem Content="WALK" Value="% DIR FBLR FBLR SPEED1 WITHLEGS WALK MOVE" /]
[MapItem Content="TURN1" Value="% DIR LR FB SPEED2 ALL MOVE MOVE" /]
[MapItem Content="GOFORWARD" Value="% DIR F LR SPEED1 ALL GO1 MOVE" /]
[MapItem Content="GOBACK" Value="% DIR B LR SPEED1 ALL GO1 MOVE" /]
[MapItem Content="TURN2" Value="% DIR_ACOMP_APOS LR FB SPEED2 ALL TURN TURN" /]
[MapItem Content="MOVE6" Value="% DIR_ACOMP FBLR FBLR SPEED1 ALL GO1 MOVE" /]
[MapItem Content="MOVE7" Value="% MCOMP EMPTY EMPTY NO EMPTY MOVE MOVE" /]
[MapItem Content="LIFT" Value="% MCOMP EMPTY EMPTY NO EMPTY MOVE MOVE" /]
[MapItem Content="LOWER" Value="% MCOMP EMPTY EMPTY NO EMPTY MOVE MOVE" /]
[MapItem Content="CENTER" Value="% MCOMP EMPTY EMPTY NO EMPTY CENTER CENTER" /]
[MapItem Content="SWING" Value="% MCOMP EMPTY EMPTY NO EMPTY SWING SWING" /]
[MapItem Content="EXTEND1" Value="% MCOMP EMPTY EMPTY NO EMPTY EXTEND EXTEND" /]
[MapItem Content="EXTEND2" Value="% MCOMP_MPOS EMPTY EMPTY NO EMPTY PUT PUT" /]
[MapItem Content="PUT_YOU1" Value="% APOS EMPTY EMPTY NO ALL PUT_YOU PUT_YOU" /]
[MapItem Content="PUT_YOU2" Value="% MPOS EMPTY EMPTY NO ALL PUT_YOU PUT_YOU" /]
[MapItem Content="PUT" Value="% MCOMP_APOS EMPTY EMPTY NO EMPTY PUT PUT" /]
[MapItem Content="SMILE" Value="% NO EMPTY EMPTY NO WITHHEAD SMILE SMILE" /]
[MapItem Content="DO" Value="% ACOMP_APOS EMPTY EMPTY NO ALL DO DO" /]
[MapItem Content="TAKE" Value="% MCOMP EMPTY EMPTY NO ALL TAKE TAKE" /]
[MapItem Content="SHOOT" Value="% ACOMP EMPTY EMPTY NO ALL SHOOT SHOOT" /]
[MapItem Content="STOP" Value="% ACOMP_APOS EMPTY EMPTY NO ALL STOP STOP" /]
[MapItem Content="STOP1" Value="% MCOMP_APOS EMPTY EMPTY NO ALL STOP STOP" /]
[MapItem Content="STOP2" Value="% ACOMP_APOS EMPTY EMPTY NO ALL STOP2 STOP2" /]
[MapItem Content="START" Value="% ACOMP_APOS EMPTY EMPTY NO ALL START START" /]
[MapItem Content="START1" Value="% MCOMP_APOS EMPTY EMPTY NO ALL START START" /]
[MapItem Content="PAUSE" Value="% MCOMP_APOS EMPTY EMPTY NO EMPTY PUT PUT" /]
[MapItem Content="OPEN" Value="% MCOMP EMPTY EMPTY NO EMPTY OPEN OPEN" /]
[MapItem Content="CLOSE" Value="% MCOMP EMPTY EMPTY NO EMPTY CLOSE CLOSE" /]
[MapItem Content="SPEED" Value="% NO EMPTY EMPTY F1 ALL TBD TBD" /]
[MapItem Content="TILT" Value="% MCOMP EMPTY EMPTY NO EMPTY TILT TILT" /]
[MapItem Content="SING" Value="% DIRECT EMPTY EMPTY NO ALL SING SING" /]
[MapItem Content="DANCE" Value="% DIRECT EMPTY EMPTY NO ALL DANCE DANCE" /]
[MapItem Content="LEAN1" Value="% MCOMP EMPTY EMPTY NO EMPTY LEAN LEAN" /]
[MapItem Content="LEAN2" Value="% ACOMP EMPTY EMPTY NO EMPTY LEAN LEAN" /]
[MapItem Content="SCRATCH" Value="% MCOMP EMPTY EMPTY NO EMPTY SCRATCH SCRATCH" /]
[MapItem Content="UNFOLD" Value="% MCOMP EMPTY EMPTY NO EMPTY UNFOLD UNFOLD" /]
[MapItem Content="BEND" Value="% MCOMP EMPTY EMPTY NO EMPTY BEND BEND" /]
[MapItem Content="LOOKAT" Value="% MCOMP EMPTY EMPTY NO WITHMOVINGCAM LOOKAT LOOKAT" /]
[MapItem Content="TURN3" Value="% MCOMP_MPOS EMPTY EMPTY NO EMPTY MOVE MOVE" /]
[MapItem Content="SEE" Value="% ACOMP_APOS EMPTY EMPTY NO EMPTY SEE SEE" /]
[/Map]


Value of Content entry is the mnemonic for the verb.

Word 2 is used to specify some informations about the verb command structure with a mnemonic linked to verb_autho_model map.

Code:

[Map Name="verb_autho_model"]
[MapItem Content="NO" Value="FFFF" /]
[MapItem Content="DIR" Value="FFFT" /]
[MapItem Content="MCOMP" Value="FMFF" /]
[MapItem Content="ACOMP" Value="FAFF" /]
[MapItem Content="DIR_ACOMP" Value="FAFT" /]
[MapItem Content="DIR_ACOMP_APOS" Value="FAAT" /]
[MapItem Content="MPOS" Value="FFMF" /]
[MapItem Content="APOS" Value="FFAF" /]
[MapItem Content="MCOMP_APOS" Value="FMAF" /]
[MapItem Content="MCOMP_MPOS" Value="FMMF" /]
[MapItem Content="ACOMP_APOS" Value="FAAF" /]
[MapItem Content="DIRECT" Value="TFFF" /]
[/Map]


Char 1 of Value is F False or True if we want to specify a [Verb][Direct Complement] Command structure for example SING a song.
Char 2 specify if [Complement] is M Mandatory A Authorized or F Forbidden in the command.
Char 3 specify if [Position] is M Mandatory A Authorized or F Forbidden in the command.
Char 4 specify if [Movement Direction] is Authorized T or not F in the command.
For example if you want that the verb authorize only a
[verb][complement][position] command structure you choose as mnemonic MCOMP - [Complement] will be Mandatory and[ Movement direction] [Attribute] and [Position] are not Authorized for Example CENTER mnemonic.

Word 3 is used to specify which Movement Directions are Authorized for [Verb] - It can be overwrited at the Complement Level and at the global Combination Level.
Word 4 is used to specify which Secondary Movement Directions are Authorized for [Verb] - It can also be overwrited at the Complement Level and at the global Combination Level.
Word 3 and Word 4 are mnemonic for movement directions authorizations Linked to b[]movement_autho_model[/b] map.

Code:

[Map Name="movement_autho_model"]
[MapItem Content="ALL" Value="TTTTTT" /]
[MapItem Content="NO" Value="FFFFFF" /]
[MapItem Content="EMPTY" Value="FFFFFF" /]
[MapItem Content="FLRUD" Value="TFTTTT" /]
[MapItem Content="FBLUD" Value="TTTFTT" /]
[MapItem Content="FBRUD" Value="TTFTTT" /]
[MapItem Content="FBLRD" Value="TTTTFT" /]
[MapItem Content="FBLR" Value="TTTTFF" /]
[MapItem Content="LRUD" Value="FFTTTT" /]
[MapItem Content="FLRD" Value="TFTTFT" /]
[MapItem Content="FBUD" Value="TTFFTT" /]
[MapItem Content="FLR" Value="TFTTFF" /]
[MapItem Content="LR" Value="FFTTFF" /]
[MapItem Content="FB" Value="TTFFFF" /]
[MapItem Content="UD" Value="FFFFTT" /]
[MapItem Content="L" Value="FFTFFF" /]
[MapItem Content="R" Value="FFFTFF" /]
[MapItem Content="D" Value="FFFFFT" /]
[MapItem Content="U" Value="FFFFTF" /]
[MapItem Content="F" Value="TFFFFF" /]
[MapItem Content="B" Value="FTFFFF" /]
[/Map]


Value is a 6 characters Word - Each character define the authorization or not for a movement direction T Authorized F Not Authorized - Char 1 Forward - Char 2 Backward - Char 3 Left - Char 4 Right - Char 5 Up - Char 6 Down
For example mnemonic R authorize only Movement Direction to the Right.

Word 5 is only used with [Verb] [Movement Direction] command structure (Otherwise EMPTY) - It's a mnemonic to verb_direction_autho_model Map.

Code:

[Map Name="verb_direction_autho_model"]
[MapItem Content="NO" Value="FF" /]
[MapItem Content="SPEED1" Value="T1" /]
[MapItem Content="SPEED2" Value="T2" /]
[/Map]


Char 1 specify if [Movement Duration] is authorized T or not F.
Char 2 specify if [Speed Adjective] are authorized 1 or 2 or not F
1 or 2 specify the way [Action Speed] will act - 1 same action on left and right speed - 2 - action on the difference between left and right speed.

Word 6 specify the Robot Type authorization for the verb - mnemonic linked to Robot Type authorization Map.

Word 7 is the Verb AuthoID

Word 8 is the Verb BBID


For example

Code:

[MapItem Content="TURN2" Value="% DIR_ACOMP_APOS LR FB SPEED2 ALL TURN TURN" /]


[Complement] , [Position] and [Movement Direction] are Authorized and if [Movement Direction] is present only Left and Right Direction are Authorized for main Direction and Forward and Backward for the Secondary Direction.
The Verb BBID and AuthoID is TURN and at the verb level All Robot types are authorized.
Turn head to the Left - Turn left forward - Turn cam on - will be recognized

In English language one complementary map is used for verb output form exceptions movement_verb_1_form3_en when the "I verb" is not correct - example with "Put you" verb "I put you" is incorrect and must be "[b]I'm putting me[b]"

French Verb Configuring

For french language , several additionnal Maps need to be configure :
for verb input forms movement_verb_1_form1_fr , movement_verb_1_form2_fr - example
verb "Aller " "Peux tu aller " "J'aimerai que tu ailles " and "va "
for verb output forms movement_verb_1_form3_frand just with exceptions [b] movement_verb_1_form4_fr[/b} and [b] movement_verb_1_special_fr[/b} - example
verb "Aller " "je vais " "dans quelle direction veux tu quej'ailles "


Verb Configuring synonym

Code:

[MapItem Content="switch off" Value="% POS STOP1" /]

Word2 of main entry in the Maps movement_verb_1_fr and movement_verb_1_en is used to specify if [Verb] will be interpreted with a Synonym Command - Its a mnemonic configured in Synonym_autho_model Map.

Code:

 [Map Name="Synonym_autho_model"]
[MapItem Content="NO" Value="FFFFF" /]
[MapItem Content="DIR" Value="TFFFF" /]
[MapItem Content="COMP" Value="FTFFF" /]
[MapItem Content="ATT" Value="FFTFF" /]
[MapItem Content="POS" Value="FFFTF" /]
[MapItem Content="DIR_COMP" Value="TTFFF" /]
[MapItem Content="COMP_ATT" Value="FTTFF" /]
[MapItem Content="OTHER" Value="FFFFT" /]
[/Map]

Mnemonic is defining which type of synonym will be linked to the Verb Entry - (NO for No synonym).
It can be for example a Movement Direction , a Complement , an Attribute , a Position , a combination Movement Direction Complement ,or anything you want (OTHER)
If OTHER the corresponding pattern must be coded in SIML Files.

Code:

[Pattern]
[Item]XXXXXCOMP synonymtext[/Item]
[/Pattern]


When Synonym Flag is set for verb , Synonym value is configured in Maps synonym_movement_en and synonym_movement_fr d├ępending on the language used

Code:

[Map Name="synonym_movement_en"]
[MapItem Content="turn off" Value="stopped" /]
[MapItem Content="turn on" Value="started" /]
[MapItem Content="stop" Value="stopped" /]
[MapItem Content="bow down" Value="your body down" /]
[MapItem Content="lift" Value="up" /]
[MapItem Content="lower" Value="down" /]
[MapItem Content="look" Value="your camera" /]
[MapItem Content="pause" Value="paused" /]
[MapItem Content="lean" Value="down" /]
[MapItem Content="tilt" Value="down" /]
[MapItem Content="kneel" Value="on your knees" /]
[MapItem Content="sit" Value="sitting" /]
[MapItem Content="crouch" Value="crouching" /]
[MapItem Content="switch off" Value="stopped" /]
[MapItem Content="switch on" Value="started" /]
[MapItem Content="start" Value="started" /]
[MapItem Content="see" Value="camera recognition" /]
[/Map]


Coherence between synonym type configured for the verb and synonym value isn't controlled and it's up to you to do it - for example if type is POS , you must be sure that the synonym value is a valid Position Entry.