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 | {{{ |
| 68 | topic: ~dialog() |
| 69 | language: czc |
| 70 | |
| 71 | concept:(ahoj) "ahoj robote" |
| 72 | concept:(dobrý_den) ["dobrý den" "krásný den" "krásný den přeju"] |
| 73 | |
| 74 | u:(~ahoj) ahoj člověče |
| 75 | \pau=1000\ |
| 76 | to máme dnes hezký den |
| 77 | |
| 78 | u:(~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 | {{{ |
| 88 | u:(["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 |