Skip to content

Behavior Coordinator

Martin Molina edited this page Oct 1, 2021 · 2 revisions

Aerostack uses a behavior coordinator to control the execution of multiple robot behaviors that operate concurrently, avoiding consistency conflicts. This mechanism is supported by a software tool using an algorithm for constraint-based configuration (CBC) that can be found here:

The behavior coordinator 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 is usually stored in the folder of an application 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