Aldebaran documentation What's new in NAOqi 2.4.3?

Hello World 3 - using Dialog topic in Choregraphe

Audience

Level All beginners Time 5 min
OS Linux - Windows - Mac Preparation 15 min

Preparation time is given for the case you have to install tools prior the tutorial.

Before starting

Let’s do it

Step Action
Start Choregraphe.

Click the Connect to button and connect Choregraphe to your robot.

../_images/helloworld_cho_00.png

For further details, see How to connect your NAO.

Your robot appears in the Robot view.

Drag the Speech > Speech Settings > Set Language box on the grey area.

Click the parameter-button parameter button and set the language as English.

../_images/helloworld_cho_dlg_00.png

Right click the grey area and choose, in the contextual menu, Create a new Box > Dialog....

../_images/helloworld_cho_dlg_01.png

Click the Add a new topic button, then type a name without spaces, for example: HelloWorld.

Click the Add button, then the OK button.

../_images/helloworld_cho_dlg_02.png

Create links as below.

../_images/helloworld_cho_dlg_05.png

In the Project content, double click the HelloWorld_enu.top file.

The Script editor appears.

../_images/helloworld_cho_dlg_06.png

Type those rules:

u:(Hello) Hello, young Padawan

u:(Good morning) Let's start a wonderful day
../_images/helloworld_cho_dlg_07.png
Click the play-button Play button.

Result

Your robot prompts you to speak with a sound and an eye LEDs animation.

  • Say “Good morning” right in front of his face, or enter “Good morning” in the Dialog panel and press enter.

    Your robot replies “Let’s start a wonderful day”.

  • Say “Hello” right in front of his face, or enter “Hello” in the Dialog panel and press enter.

    Your robot replies “Hello, young Padawan”.

How it works

  • The Set Language box defines the language the robot will use to speak and also to listen to you.
  • The Dialog box uses the Topic file, with .top extension, stored in the current Project.
  • The Topic file contains Rules associating Human inputs to Robot outputs.

Let’s explain the 2 lines you wrote:

u:(Hello) Hello, young Padawan

u:(Good morning) Let's start a wonderful day

This line is a Rule:

  • u: is the key word for user rule,
  • (hello) and (Good morning) are Human inputs, i.e. what you can say to the robot,
  • Hello, young Padawan and Let’s start a wonderful day are Robot outputs, i.e. what the robot will answer.

What you have learned

To make the robot listen and answer an appropriate answer, you can create a set of rules associating Human inputs to Robot outputs.

To go further

Learn more about Dialog boxes, see the tutorial: Creating Dialog boxes.

Next step

Writing Python script inside or outside Choregraphe is not exactly the same.
Try to create a Python script: Hello World 4 - using Python.