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.

Basic Awareness and Autonomous Moves

The developer should assume that ALBasicAwareness and ALAutonomousMoves services are already started when an Activity is started. These two 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.

Stopping the services for the purpose of managing motor control is not necessary:

The developer may of course stop/start/customize ALBasicAwareness and ALAutonomousMoves at any time during an Activity. The services will be resumed and reset by ALAutonomousLife when an Activity exits.

It may be desirable to change the parameters of ALBasicAwareness, or temporarily stop it to reclaim CPU.

For further details see: ALBasicAwareness, ALAutonomousMoves and ALAutonomousLife.

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.