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

Synbot Plugin Tutorial - interface to Syn Bot Software

EZ Robot Command SIML Framework - Configuring the Bot Response Message

All SIML Codes to configure Bot Response Message is grouped in SIML File EZ Robot request - Bot Response Message building
in models XXXXXXXPROCESSEZCOMMAND and XXXXXXXMESSAGEBUILDING

After interpretation of user Input request by the Framework - Variable Workflag is set depending the input phrase syntaxic structure after [Verb]

[Verb complement][movement direction] or [Verb complement][movement direction][secondarydirection]
Worfflag is set to [BBID Complement]_[mnemonic directions] where mnemonic directions is a combination of primary and secondary directions if any.
mnemonic is F,B,L,R,U,L for Forward, Backward,Left,Right,Up and Down and can be configued in map movement_direction_global
Example CAMERA_UL - BBID Complement=CAMERA - Direction=Up Secondary Direction=Left

[movement direction] or [movement direction][secondarydirection]
Worfflag is set to [BBID Verb]_[mnemonic directions] where mnemonic directions are F or B.
Left and Right global movement are converted in adapting left and right speeds.
Example TURN_F - BBID Verb=TURN - Direction=Forward

[Verb Complement]
Worfflag is set to [BBID Complement]_[BBID Verb]
Example - ARMS_EXTEND - BBID Complement=ARMS - BBID Verb=EXTEND

[Verb Complement]][Attribute]
Worfflag is set to [BBID Complement]_[BBID Attribute]
Example - HEAD_LEFTTORIGHT - BBID Complement=HEAD - BBID Attribute=LEFTTORIGHT

[Position]
Worfflag is set to POSITION_[BBID Position]
Example - POSITION_SPLITS - BBID Position=SPLITS

[Action speed]
Worfflag is set to SPECIAL_SPEED.

if only [verb] Worfflag is set to [BBID Verb].

if a [free attribute] is specified, workflag value can be complemented with _[BBID free atribute] when specified in free control map for the free attribute value(Type 2)
Exemple for [Position] STOP
Entry in Authorized combinations map is

Code:

[MapItem Content="0|STOP|EMPTY|EMPTY|STOP" Value="% FREEPOSSIBLEDECODE1 NO EMPTY EMPTY Stopcomplement NOANDOF NO EMPTY" /]


With free control map set to Stopcomplement
In map Stopcomplement you find in each entry value a type 2 (%2) free attribute value

Code:

[MapItem Content="en|any movement" Value="%2 ALLMOVES" /]


[BBID free atribute] is in this case ALLMOVES and workflag is set to POSITION_STOP_ALLMOVES

Map synonym_action_robot enable to configure synonyms for a robot index or for all robots (index 0)

Code:

[Map Name="synonym_action_robot"]
For example entry in this map[Code][MapItem Content="0|POSITION_STOP_ALLMOVES" Value="% ALLMOVES_STOP" /]

and workflag value POSITION_STOP_ALLMOVES will be transformed to ALLMOVES_STOP for every robot types.

Code:

[MapItem Content="1|CAMERA_CENTER" Value="% HEAD_CENTER" /]


For robot index 1 (JD) - workflag value CAMERA_CENTER will be transformed to HEAD_CENTER and EZ Command will be the same for "Center Cam" and "Center Head"

In the main SIML [Switch Var="Workflag"]
Several models for Building EZ Command can be easily managed

Variable aigui is used to select the building message action :

aigui = "" implicit value
Setting Variable EZFrame with frame name
Or Setting Variable EZAction with action name
Or Setting Variable EZScript with script name
Or Setting Variable tempcommand with a complete EZB command or command sequence (each command separate by | separator)
Will build the EZ Builder corresponding Command.

Variables can be set to select the EZB control name for autoposition plugin name and for script manager plugin name for example :

Code:

[Var Set="Scriptcontrolname"]Script Manager Synbot[/Var]
[Var Set="Frameactioncontrolname"]Auto Position[/Var]]


Variable EZvariablename can be set to an EZBuilder variable name and variable EZvariablevalue to the value to set - this EZBuilder variable will be set in the build command to the value to set if not Empty.
Used for example to Set an EZbuilder variable value which can be tested in a launched script - for example in

Code:

[Case Value="STEPPING_F"][Var Set="EZvariablename"]Nbsteps[/Var][Var Set="EZvariablevalue"][User Get="Complementactionfree" /][/Var][Var Set="EZscript"]Steps Forward[/Var][/Case]


where the number of steps is set in tne EZ Builder variable Nbsteps.

aigui = "1"
Variable Gotofunction is used to redirect the process to model XXXXXXXPROCESSCOMMAND_[Var Get="Gotofunction" /]
You can in this model build your specific EZ Command Message and use variables values set during input syntaxic analysis.
Variables can be set before redirecting for using in the processing model - for example

Code:

[Case Value="SING"][Var Set="tempparam"], "ignoreScript"[/Var][Var Set="Notsay"]|[/Var][Var Set="Aigui"]1[/Var][Var Set="Gotofunction"]SOUNDBOARD[/Var][/Case]


aigui = "2"
Forward or Reverse EZB command will be sent depending on variable tempdirection value, value of variables wotkspeedleft and workspeedright will be used for Setspeed command , value of worduration variable will be used to generate a sleep command
aigui = "6" and aigui = "7"
Can be set in case the command cannot be executed due to device status - example CAMERA_START and camera already active - only text message response is built (no command)
aigui = "8"
Can be set when command is existing but not yet coded - message "I have not yet learned this command" will be sent in the bot response.
aigui = "9"
Unknown command.

Standard text messages are Build in XXXXXXXMESSAGEBUILDING Model , but you can overwrite these messages in setting variable mess1 and mess2 (case value of aigui = 6,7,8,9 where no EZ Builder commands are built) for example

Code:

[Case Value="CAMERA_RECOGNITION"][Var Set="EZscript"]Start Bing Vision Recognition[/Var][Var Set="mess1"]|Waiting for Bing Vision recognition[/Var][/Case]

Steps