NAOqi Core - Overview | API | Launch trigger conditions | Advanced
Namespace : AL
#include <alproxies/alautonomouslifeproxy.h>
As any module, this module inherits methods from ALModule API. It also has the following specific methods:
Lets the developer manually set limited state changes in AutonomousLife. For futher details, see: Autonomous Life states.
When changing the state to “disabled” or “safeguard”, stopAll() is called internally.
Note Manual change from interactive to solitary state will fail.
Parameters: |
|
---|
Retrieves the current state of AutonomousLife.
Returns: | Can be one of the Autonomous Life states. |
---|
Allows you to set if the robot is on the floor, or higher up such as on a table.
This notably have an effect on how the robot search for humans with Basic Awareness. Set it correctly to enhance tracking success.
The default offset is 0.
Parameters: |
|
---|
Retrieves the current offset of the robot from the floor.
The default offset is 0.
Returns: | A float value in meters. |
---|
Sets if a given safeguard will be handled by Autonomous Life or not. Default for all safeguards is true.
These parameters are automatically reset to default at the end of each activity.
Parameters: |
|
---|
Checks if a given safeguard will be handled by Autonomous Life or not. Default for all safeguards is true.
Parameters: |
|
---|---|
Returns: | A bool, true if Autonomous Life handles the safeguard. |
Retrieves the current focused activity.
Returns: | The name of the focused activity. Is an empty string (“”) if no activity is focused. |
---|
The focused activity is the one running activity.
Parameters: |
|
---|
The focused activity is the one running activity.
This function allows to use the stacking feature of activity focus.
Parameters: |
|
---|
This will stop the focused activity.
If there is a previous activity remaining on the stack, it is restarted and focused.
See switchFocus() and STOP_AND_STACK_CURRENT to see how to leave activities on the stack when switching focus.
This will stop the focused activity.
It will also clear the stack; no stacked activities will automatically be restarted and focused.
See switchFocus() and STOP_AND_STACK_CURRENT to see how to leave activities on the stack when switching focus.
Gets the time in seconds as life sees it. Based on gettimeofday().
Returns: | The int time in seconds as Autonomous Life sees it. |
---|
Gets focus count, last focused time, etc for each activity.
Times based on getLifeTime()
Returns: | A map of activity names, with a corresponding map of “prevFocusTime”, “prevUnfocusTime”, “focusCount”, “totalDuration”. Times are 0 for unlaunched Activities. |
---|
Gets focus count, last focused time, etc just for each autonomous activity. This returns a subset of what ALAutonomousLifeProxy::getActivityStatistics() returns. An autonomous activity is one that has launch trigger conditions.
Times based on getLifeTime()
Returns: | A map of activity names, with a corresponding map of “prevFocusTime”, “prevUnfocusTime”, “focusCount”, “totalDuration”. Times are 0 for unlaunched Activities. |
---|
There are two overloads of this function. It is recommended to specify maximum depth to prevent large ALValues from being transmitted.
Gets a list of the order that activities that have been focused, and their time focused.
Times based on getLifeTime()
Returns: | A list of pairs, each pair is ActivityName, PreviousFocusedTime. |
---|
Gets a list of the order that activities that have been focused, and their time focused.
Times based on getLifeTime()
Parameters: |
|
---|---|
Returns: | A list of pairs, each pair is ActivityName, PreviousFocusedTime. |
There are two overloads of this function. It is recommended to specify maximum depth to prevent large ALValues from being transmitted.
Gets a list of the order that states that have been entered, and their time entered.
Times based on getLifeTime()
Returns: | A list of pairs, each pair is StateName, PreviousEnteredTime. |
---|
Gets a list of the order that states that have been entered, and their time entered.
Times based on getLifeTime()
Parameters: |
|
---|---|
Returns: | A list of pairs, each pair is StateName, PreviousEnteredTime. |
Tells you if an activity has “interactive” or “solitary” nature.
If you pass a string which is not an activity, this will throw.
Parameters: |
|
---|---|
Returns: | “interactive” or “solitary” |
Raised when the state of autonomous life changes.
Note that if one interactive activity switches focus to another interactive activity, this event is raised, as the “interactive” state is being reasserted.
This event is raised after Autonomous Life has completed all necessary internal operations to prepare for the state.
Parameters: |
|
---|
Raised whenever the focused activity changes.
Parameters: |
|
---|
Raised whenever an activity completes its execution and exits.
Note This event is raised before the FocusedActivity event.
Parameters: |
|
---|
Raised whenever an activity is going to be focused.
Note This event is raised before the FocusedActivity event.
Parameters: |
|
---|
Raised whenever there are activities that have launch conditions triggered.
Parameters: |
|
---|