NAO Tips Vol. 3: How to package and install applications with trigger sentences 

NAO's ability to listen to and act on voice commands is central to its ability to function as a social robot. This tutorial shows how to package and install Chorégraphe applications with trigger sentences onto your NAO robot. Trigger sentences enable you to launch your application through a voice command in Autonomous mode

Part 1 - Adding trigger sentences. 

To add trigger sentences click the 'properties' button within the 'project content' window (see below). If you cannot find the project content window, select 'View' in the top menu bar and make sure the 'project content' is checked. 

Next you need to select 'Behavior_1' (this is the default name for applications unless changed) in the top left hand corner of the pop-up window. 

Now you will be able to add trigger sentence by clicking in the 'trigger sentences' box and adding each sentence in the top right hand bar (for example Macarena Dance). 

Now that you have assigned trigger sentences to your application, the application is ready to be installed on your robot. To do this, click the 'package & install' icon contained in the 'robot applications' window (see below). Now your application is ready to be launched via voice command. 

A. Package & Install - adds current application to your robot. 

B. Application list - Know which Applications are currently installed on the robot.

C. Default flag - Indicates which behaviours are set as Default Behaviours.

D. Execution status - Play/Stop installed Behaviour or Application.

 

Bonus tip: Add a kill/exit switch to your application so that the application can be exited from the robot. 

A kill/exit switch is highly recommended for all applications loaded onto NAO and can be achieved using a variety of different sensors - some being more practical than others. In the image below the tactile head sensor is used for this function by connecting the box's input to the beginning of the application and its output to the end of the application. In this case, if the head sensor is triggered a signal is sent to end the application overriding all other boxes.