Skip to content
Martin Molina edited this page Jan 13, 2021 · 3 revisions

Aerostack uses a behavior manager to control the execution of multiple robot behaviors that operate concurrently, avoiding consistency conflicts.

The behavior manager uses a behavior catalog (file behavior_catalog.yaml) that includes information about each behavior (for example, the possible parameters of each behavior and incompatibility with other behaviors). The behavior catalog can be found in the folder: config/mission but it can be modified for a particular application and placed in other folder.

The following example of a part of the catalog illustrates the information of the behavior ROTATE_WITH_PID_CONTROL that is present in the catalog. This behavior performs the task ROTATE with two parameters (angle or relative_angle). The behavior requires the task PID_MOTION_CONTROL and there are some constraints with incompatible behaviors:

behaviors:

- behavior: ROTATE_WITH_PID_CONTROL
  package: quadrotor_motion_with_pid_control
  task: ROTATE
  requires:
  - task: PID_MOTION_CONTROL

tasks:

- task: ROTATE
  timeout: 30
  parameters:
  - parameter: angle
    allowed_values: [-360,360]
  - parameter: relative_angle
    allowed_values: [-360,360]

exclusivity_constraints:

- mutually_exclusive:
  - TAKE_OFF
  - LAND
  - HOVER
  - FOLLOW_PATH
  - MOVE_AT_SPEED
  - MOVE_VERTICAL
  - ROTATE

Behavior execution viewer

The operation of the behavior manager can be observed with the behavior execution viewer. The viewer shows at the top the list of active behaviors. At the bottom, the viewer shows the sequence of activations and deactivations. The columns have the following meaning:

  • Column P: Priority
  • Column T: Activation (+) or deactivation (-)
  • Column S: Success (Y) or failure (N)

To launch the behavior execution viewer (for example, for the robot namespace drone7), the command is:

 $ roslaunch behavior_execution_viewer behavior_execution_viewer.launch --wait robot_namespace:=drone7 drone_id:=7 catalog_path:=AEROSTACK_STACK/config/mission/behavior_catalog.yaml

Clone this wiki locally