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

Robot type and Robot Type Authorization

Map typerobot is used to configure the robot types recognized

Code:

[Map Name="typerobot"]
[MapItem Content="JD" Value="1" /]
[MapItem Content="SIX" Value="3" /]
[MapItem Content="ROLLI" Value="2" /]
[MapItem Content="ADVENTUREL" Value="4" /]
[/Map]

Content must link with the Robot Type configured in the SynBot plugin
Value is the corresponding robot index - a maximum of 10 different robot types can be configured.

Map Robot_autho_model is used to configure robot types authorization models

Code:

[Map Name="Robot_autho_model"]
[MapItem Content="ALL" Value="TTTTTTTTTT" /]
[MapItem Content="NO" Value="FFFFFFFFFF" /]
[MapItem Content="WITHCAM" Value="TTTTTTTTTT" /]
[MapItem Content="WITHHEAD" Value="TFFFFFFFFF" /]
[MapItem Content="WITH2LEGS" Value="TFFFFFFFFF" /]
[MapItem Content="WITH6LEGS" Value="FTFFFFFFFF" /]
[MapItem Content="WITHLEGS" Value="TTFFFFFFFF" /]
[MapItem Content="WITHWHEELS" Value="FFTTFFFFFF" /]
[MapItem Content="WITH2ARMS" Value="TFTFFFFFFF" /]
[MapItem Content="WITH2HANDS" Value="TFFFFFFFFF" /]
[MapItem Content="WITH2GRIPPERS" Value="TFTFFFFFFF" /]
[MapItem Content="WITHFIXEDCAM" Value="FFFTFFFFFF" /]
[MapItem Content="WITHMOVINGCAM" Value="TTTFTTTTTT" /]
[MapItem Content="JD" Value="TFFFFFFFFF" /]
[/Map]

Content is an authorization model mnemonic which will be used in other maps to specify type of robot authorization.
Value is a ten characters string and for each character an authorization F False or T True.
Position of the character in the string links to robot index ( for example first character for robot index 1 JD)

Movement Direction

Maps movement_direction_fr and movement_direction_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 [Movement direction)

Code:

[MapItem Content="to the right" Value="% RIGHT" /]
[MapItem Content="on the right side" Value="% RIGHT" /]



On a main entry content (Char 1 = %)
Second block is a mnemonic link to the Map movement_direction_global in which are defined for the mnemonic link entry global configuration parameters (valid for every language used).

Code:

[Map Name="movement_direction_global"]
[MapItem Content="LEFT" Value="% L" /]
[MapItem Content="RIGHT" Value="% R" /]
[MapItem Content="FORWARD" Value="% F" /]
[MapItem Content="BACKWARD" Value="% B" /]
[MapItem Content="UP" Value="% U" /]
[MapItem Content="DOWN" Value="% D" /]
[/Map]

This map doesn't need to be changed.
the second character is just a character mnemonic for the movement direction F Forward B Backward L Left R Right U Up D Down

Direct calls without a preceding [verb] must be configured in the SIML maps synonym_global_fr or synonym_global_en depending on the language used.
Each entry authorized in direct call must refererenced in these maps - value for each entry give the text synonym to use with this direct call (including [verb].

Code:

[MapItem Content="left" Value="move left" /]



Configuring Verb , Complement , Position and Attribute

SIML Maps are used to configure for the suffixed language (fr and en) the text keywords which will be recognized in User Input in order to generate a Bot Response to command Robots.

Building Bot response is done in the SIML File : [b]EZ Robot request - Bot Response Message building[b].
You will need to insert SIML codes in this file depending on the structure and the content of user Input Phrase.
Each entity 'Verb , Complement , Position and Attribute) if recognized in the input phrase will have in configuration maps a Bot Building ID or BBID which can be retrieved in SIML file to build the Bot Response. - See Next for more d├ętails.

Authorized combinations between [Verb][Complement][Attribute] and [Position] in the Input Phrase will be configured in a specific Map combination_verb_comp_att_pos
Each entity 'Verb , Complement , Position and Attribute) if recognized in the input phrase will have in configuration maps an AuthoID which will be used in key of this combination Maps.
This structure allows to regroup entities values with the same level of authorization.

To make easier the configuration :
BBID and AuthoID are the same for [Attribute]
They can be different for [Verb] [Complement] and [Position].

Managing Mandatories Argument in user input phrase

We can indicate in [verb] or [Complement] Configuration Maps if additionnal [Movement Direction] , [Complement] [Attribute] [Position] are required (Mandatory) or not.

When parameter value is Mandatory and is not found in the User Input Phrase , SIML Command Framework include standard dialogs with User in order to get the missing value.
Example with "lift your left arm"
Lift need a complement so a first dialog is occuring to get this complement.
lift your arm is ambigous so a second dialog is occuring to get the non ambigous complement valueUser-inserted image
Standard dialogs message are coded in SIML FileEZ Robot Request - Ask precision dialogs where you can modify them.

Code:

 [Switch Var="Typeask"]
[Case Value="1"][User xml:space="preserve" Set="bot_event_response"]can you clarify in what direction I should [User Get="usedverb" /] [User Get="verbcomplement" /][/User][/Case]
[Case Value="2"][User Think:Set="Askprecision"]2[/User][User xml:space="preserve" Set="bot_event_response"]You ask me to [User Get="usedverb" /] [User Get="verbcomplement" /] can you clarify which one[/User][/Case]
[Case Value="3"][User xml:space="preserve" Set="bot_event_response"]You ask me to [User Get="usedverb" /] but what[/User][/Case]
[Case Value="4"][User xml:space="preserve" Set="bot_event_response"]What do you want I [User Get="usedverb" /][/User][/Case]
[Case Value="5"][User xml:space="preserve" Set="bot_event_response"]How do you want I [User Get="usedverb" /][/User][/Case]
[Case Value="6"][User Think:Set="Askprecision"]3[/User][User xml:space="preserve" Set="bot_event_response"]You ask me to [User Get="usedverb" /] [User Get="verbcomplement" /] can you clarify how[/User][/Case]
[/Switch]

6 kind of situation are included in the Framework (Value of the AskPrecision Variable but don't care ) :
1 - Request for [Movement Direction]
2 - Ambigous value for [Complement] - Request for additionnal information - Possible responses LEFT or RiGHT
3 - Request for [Direct Complement] example request song name with the Sing Verb
4 - Request for [Complement]
5 - Request for [Position]
6 - Request for [Attribute]

Maps action_side_fr and action_side_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 valid response for Case 2