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

Synbot Plugin Tutorial - interface to Syn Bot Software

EZ Robots Commands SIML Framework - Details of new command creation

To better illustrate , below are a step to step example some new commands
Instructions are for English configuration.

Adding Take Photo Command

Think first at the phrase structure -
can be : "photograph" , "take" or "shoot" or "do" "a photo" , and same ("take" or "shoot" or "do") with "photo" , "picture" ,"a picture" , "snapshot" , "a snapshot"

We have 4 verb forms - Do , Shoot , Take and Photograph
Do is already configured - Shoot , Take and Photograph need to be created.
We have a complement with several possible forms : picture , photo , a picture , a photo , a photography , ......
The best way is to create a complement with CAMERA prefix for exemple CAMERA_PHOTO

Lets go

map movement_verb_1_en

Code:

[MapItem Content="do" Value="%F NO DO" /]
[MapItem Content="shoot" Value="%F NO SHOOT" /]
[MapItem Content="take" Value="%F NO TAKE" /]
[MapItem Content="photograph" Value="%F COMP TAKE" /]


map synonym_movement_en

Code:

[MapItem Content="photograph" Value="a picture" /]


map movement_verb_group

Code:

[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" /]


map verb_complement_en

Code:

[MapItem Content="a snapshot" Value="picture" /]
[MapItem Content="snapshot" Value="picture" /]
[MapItem Content="a photography" Value="picture" /]
[MapItem Content="photography" Value="picture" /]
[MapItem Content="a photo" Value="picture" /]
[MapItem Content="photo" Value="picture" /]
[MapItem Content="a picture" Value="picture" /]
[MapItem Content="picture" Value="% CAMERA_PHOTO" /]


map verb_complement_group

Code:

[MapItem Content="0|CAMERA_PHOTO" Value="%F NO NO WITHCAM CAMERA_PHOTO CAMERA_PHOTO" /] 


map combination_verb_comp_att_pos

Code:

[MapItem Content="0|SHOOT|CAMERA_PHOTO|EMPTY|EMPTY" Value="% NO NO EMPTY WITHCAM" /]
[MapItem Content="0|TAKE|CAMERA_PHOTO|EMPTY|EMPTY" Value="% NO NO EMPTY WITHCAM" /]
[MapItem Content="0|DO|CAMERA_PHOTO|EMPTY|EMPTY" Value="% NO NO EMPTY WITHCAM" /]



In EZ Robot request - Bot Response Message building SIML File
Variable Workflag will be set to CAMERA_PHOTO_DO CAMERA_PHOTO_TAKE and CAMERA_PHOTO_SHOOT

We can configure synonyms in mapbsynonym_action_robot[/b]

Code:

[MapItem Content="0|CAMERA_PHOTO_SHOOT" Value="% CAMERA_PHOTO_TAKE" /]
[MapItem Content="0|CAMERA_PHOTO_DO" Value="% CAMERA_PHOTO_TAKE" /]



And Add in the [Switch Var="Workflag"]the following code

Code:


[Case Value="CAMERA_PHOTO_TAKE"][Var Set="Aigui"]1[/Var][Var Set="tempcommand"]ControlCommand("Camera", CameraSnapshot)[/Var][/Case]



And test first in the Synbot Studio Console then in SynBot plugin
And It's Working ......

User-inserted image

In my Robot Pictures Folder :
User-inserted image