Changes between Version 4 and Version 5 of en/ProgrammingRobotsCourse/PepperApi


Ignore:
Timestamp:
Sep 30, 2019, 10:31:40 PM (10 months ago)
Author:
Ales Horak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • en/ProgrammingRobotsCourse/PepperApi

    v4 v5  
    44
    55* http://doc.aldebaran.com/2-5/index_dev_guide.html
    6 * programming in Choregraphe via Python:
     6
     7=== programming in Choregraphe via Python
    78  * enter only one box `Python Script`
    89  * edit its contents via double click:
     
    2021     [[Image(pepper_project_cz.png)]]
    2122   * save the project and run in on a virtual robot
    22 * speech input via Python:
     23 * for details see http://doc.aldebaran.com/2-5/software/choregraphe/objects/python_script.html and http://doc.aldebaran.com/2-5/software/choregraphe/reference.html
     24
     25=== speech input via Python
    2326  * in `__init__` add:
    2427    {{{#!python
     
    5659}}}
    5760
    58    
     61=== dialog   
     62* add boxes `Set Language` with `Czech` and add `Czech` to project properties
     63* right click the free area -> `Create a new box` -> `Dialog...`
     64* in the Dialog -> `Add Topic` - choose `Czech` and `Add to the package content as collaborative dialog` (allows to start the dialog just by talking to the robot)
     65* connect `onStart` -> `Set Language` -> `Dialog`
     66* in Project files double click on `dialog_czc.top` and enter
     67  {{{
     68topic: ~dialog()
     69language: czc
     70
     71concept:(ahoj) "ahoj robote"
     72concept:(dobrý_den) ["dobrý den" "krásný den" "krásný den přeju"]
     73
     74u:(~ahoj) ahoj člověče
     75  \pau=1000\
     76  to máme dnes hezký den
     77
     78u:(~dobrý_den) ~dobrý_den
     79}}}
     80* see [http://doc.aldebaran.com/2-5/naoqi/interaction/dialog/dialog.html QiChat - Introduction] and [http://doc.aldebaran.com/2-5/naoqi/interaction/dialog/dialog-syntax_full.html QiChat - Syntax] for details
     81
     82=== adding animations
     83
     84* single animation - via `Animation` box
     85* connect to dialog:
     86  * add rule to topic:
     87    {{{
     88u:(["můžeš zamávat" zamávej] {prosím}) ahojky $zamavej=1
     89}}}
     90  * add [http://doc.aldebaran.com/2-5/software/choregraphe/objects/box_input_output.html#choregraphe-reference-box-output output] to the dialog box (right click -> Edit box) named `zamavej` (Bang, punctual)
     91  * add `Kisses` animation box, connect it to the `zamavej` output