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

Synbot Plugin Tutorial - interface to Syn Bot Software

EZ Robots Commands 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 XXXXXXXPROCESSCOMMAND and XXXXXXXMESSAGEBUILDING

After interpretation of user Input request by the Framework - Variable Workflag is set depending input request structure interpretation

[movement direction] or [movement direction] [secondarydirection]
Worfflag will be set with "Complement BBId_DS" where DS are the movement direction and the secondary direction ( mnemonic configured in Map movement_direction_global)
Example CAMERA_UL - Complement CAMERA Direction Up Secondary Direction Left
Or with "verb BBId_F" - Forward Movement or "verb BBId_B"Backward Movement
Left and Right global movement are converted in adapting left and right speeds.
Example TURN_F

[Verb][Complement] without [Movement Direction]
Worfflag will be set with "Complement BBId_Verb BBId"
Example - ARMS_EXTEND

[u]Verb][Complement]][Attribute] without [Movement Direction]/[u]
Worfflag will be set with "Complement BBId_Attribute BBId"
Example - HEAD_LEFTTORIGHT

If [Verb][Position] or [Position]
Worfflag will be set with "POSITION_Position BBId"
Example - POSITION_SPLITS

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

Code:

[Map Name="synonym_action_robot"]
[MapItem Content="1|CAMERA_CENTER" Value="% HEAD_CENTER" /]
[MapItem Content="1|CAMERA_U" Value="% HEAD_U" /]
[MapItem Content="1|CAMERA_D" Value="% HEAD_D" /]
[MapItem Content="1|CAMERA_L" Value="% HEAD_L" /]
[MapItem Content="1|CAMERA_R" Value="% HEAD_R" /]
[MapItem Content="0|CAMERA_F" Value="% CAMERA_CENTER" /]
[MapItem Content="1|CAMERA_F" Value="% HEAD_CENTER" /]
[MapItem Content="1|CAMERA_LU" Value="% HEAD_LU" /]
[MapItem Content="1|CAMERA_UL" Value="% HEAD_UL" /]
[MapItem Content="1|CAMERA_LD" Value="% HEAD_LD" /]
[MapItem Content="1|CAMERA_DL" Value="% HEAD_DL" /]
[MapItem Content="1|CAMERA_RU" Value="% HEAD_RU" /]
[MapItem Content="1|CAMERA_UR" Value="% HEAD_UR" /]
[MapItem Content="1|CAMERA_RD" Value="% HEAD_RD" /]
[MapItem Content="1|CAMERA_DR" Value="% HEAD_DR" /]
[MapItem Content="1|ARMS_UNFOLD" Value="% ELBOWS_UNFOLD" /]
[MapItem Content="1|ARM_LEFT_UNFOLD" Value="% ELBOW_LEFT_UNFOLD" /]
[MapItem Content="1|ARM_RIGHT_UNFOLD" Value="% ELBOW_RIGHT_UNFOLD" /]
[/Map]

For Example For Robot Index 0 (JD) - CAMERA_CENTER will be linked 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

Setting Variable EZFrame with frame name
Or Setting Variable EZFrame with action name
Or Setting Variable EZScript with script name
Will build EZ Command with the corresponding ControlCommand()

Setting aigui to 1 and tempcommand to the EZB Command will build the response EZ Command part with the value of variable tempcommand.

Setting Variable Gotofunction to a mnemonic and variable aigui to 5 will generate a GOTO XXXXXXXPROCESSCOMMAND_mnemonic.
You can in this model build your specific EZ Command Message.

Standard text message is Build in XXXXXXXMESSAGEBUILDING Model , but you can overwrite this message in setting variable bot_event_response in the piece of code below

Code:

[Switch Var="Aigui"]
[Case Value="9"][/Case]
[Case Value="8"][User Set="bot_event_response"][Var Get="message_result_2" /]§[/User][/Case]
[Default][User Set="bot_event_response"][Var Get="message_result" /]§[/User][/Default]
[/Switch]