Tutorial - Dialog Topic

Modified on Mon, 9 May, 2022 at 10:36 AM

TABLE OF CONTENTS

LET'S DO IT

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


Your robot appears in the 
Robot view.

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



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

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

Click the Add button, then the OK button.



Create links as below.

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

The Script editor appears.



Type those rules:

u:(Hello) Hello, young Padawan 
u:(Good morning) Let's start a wonderful day

Click the play-button Play button.


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 those 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 - using Python

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article