SoftBank Robotics documentation What's new in NAOqi 2.5?

Activity

What is an Activity

An Activity is a specific Behavior able to run in the ALAutonomousLife framework.

For further details, see: nao Understanding Autonomous Life settings.

There are two kinds of activity:

  • Solitary activity:

    Purpose: intended to prepare, wait for, and encourage entering the interactive state. Design constrains: May be interrupted for an Interactive Activity at any time.

  • Interactive activity:

    Purpose: an Activity should be Interactive if human interaction is required for it to function. Design constrains: will not be interrupted by any other activity, but have to quit properly in order to give the focus back.

Creating an Activity

To create an Activity:

  1. Create a new Project containing at least one Behavior.
  2. In the Project Properties, set the Behavior properties as follows:

For an Interactive Activity

Step Action
Set the Nature of the Behavior to: “Interactive”.
If you want the activity to be launchable by the default dialog activity, set also the Name, Tags, and Trigger Sentences.
If you want the activity to be autonomously launched by ALAutonomousLife, set the Launch trigger condition field, using Launch trigger conditions.

You can also follow the tutorial: Creating an Interactive activity.

For a Solitary Activity

Step Action
Set the Nature of the Behavior to: “Solitary”.

Set the Launch trigger condition field, using Launch trigger conditions.

This will allow it to be autonomously launched by ALAutonomousLife.

You can also follow the tutorial: Creating a Solitary activity.

Activity - Best practices

First check the best practices of Application.

For more in-depth information, refer to State machine management of A Living Robot.

Autonomous Abilities

The developer should assume that some autonomous services are running during their Activity. These various services help smooth the transition between activities, and to help ease the developer from re-implementing these features into each of their activities in different ways.

Though stopping the services for the purpose of managing motor control is not necessary, the developer may see a need to do so. For more details please see _autonomous_abilities_management.

Exiting an activity

An activity should always finish: in all cases, there should be a path to the output of your Behavior. If it never finishes, the robot will be stuck forever in the activity.