diff --git a/docs/_01_aerostack2_concepts/architecture/index.rst b/docs/_01_aerostack2_concepts/architecture/index.rst index 4b9c5f94..4bbd7901 100644 --- a/docs/_01_aerostack2_concepts/architecture/index.rst +++ b/docs/_01_aerostack2_concepts/architecture/index.rst @@ -50,9 +50,15 @@ Aerostack2 includes a set of software components that implement specialized algo Behaviors --------- -This level includes a set of components corresponding to different robot behaviors provided by Aerostack for autonomous operation. -Each component encapsulates the algorithms used to implement a particular behavior (e.g., take off, hover, generate trajectory, etc.) together with mechanisms for execution monitoring to facilitate the specification of mission plans. -Each behavior has a uniform interface that is common for all behaviors to facilitate its use. +Aerostack2 uses a specialized type of component, called behavior, that implements functional robotic abilities such as motion control, motion planning, or perception processing. +Behaviors provide a logical layer to formulate mission plans. +Using behaviors, a mission plan is expressed as a controlled sequence of activations (or deactivations) of multiple behaviors that may operate concurrently. +Each behavior activation initiates the execution of a particular task described with certain parameters (e.g., following a particular path described with a list of waypoints). +Compared to directly use of state estimators and actuator controllers, behaviors provide a simple and uniform method to define missions. + +Each behavior component corresponds to a specific robot skill allowing self-supervised and streamlined execution of tasks. +Depending on the ability addressed by the behavior, it can correspond to motion control, e.g. taking off or hovering, to motion planning, e.g. trajectory generation, +or perception processing, e.g. video recording or gimbal control. diff --git a/docs/_01_aerostack2_concepts/behaviors/images/robot_behaviors.png b/docs/_01_aerostack2_concepts/behaviors/images/robot_behaviors.png new file mode 100644 index 00000000..afd824c4 Binary files /dev/null and b/docs/_01_aerostack2_concepts/behaviors/images/robot_behaviors.png differ diff --git a/docs/_01_aerostack2_concepts/behaviors/index.rst b/docs/_01_aerostack2_concepts/behaviors/index.rst index a404c026..2f3d7a2a 100644 --- a/docs/_01_aerostack2_concepts/behaviors/index.rst +++ b/docs/_01_aerostack2_concepts/behaviors/index.rst @@ -4,8 +4,31 @@ Behaviors ========= -TDB +Aerostack2 uses a specialized type of component, called behavior, that implements functional robotic abilities such as motion control, motion planning, or perception processing. +Behaviors provide a logical layer to formulate mission plans. +Using behaviors, a mission plan is expressed as a controlled sequence of activations (or deactivations) of multiple behaviors that may operate concurrently. +Each behavior activation initiates the execution of a particular task described with certain parameters (e.g., following a particular path described with a list of waypoints). +Compared to directly use of state estimators and actuator controllers, behaviors provide a simple and uniform method to define missions. -* Motion behaviors -* Perception behaviors -* Trajectory generation behaviors \ No newline at end of file +Each behavior component encapsulates the implementation of the algorithms used to execute the task, providing a common interface for all behaviors. +Therefore, the behavior implementation encapsulates how a specific task is accomplished, e.g. a landing maneuver can be done by descending until touching the ground, or using vision for centering the drone in a landing spot. +In both cases, the system calls the landing behavior using an identical interface regardless of the implementation details are. + +This common interface is used to control the execution of the behavior. +Aerostack2 behaviors extend ROS2 actions with some ROS2 services. +The main difference is the ability to pause, resume and modify the running goal, while standard ROS2 actions can only be activated and cancelled. +The interface also informs about the execution of the behavior with two separate outputs: the execution state of the behavior (e.g., idle, running, or paused), and a periodic feedback. +The feedback provides information about the progress of the behavior execution, e.g., the current position of the drone while following a path. + +.. figure:: images/robot_behaviors.png + :scale: 70 + :class: with-shadow + + Aerostack2 behaviors + + +.. warning:: Do not mix up aerostack2 behaviors with behavior trees. Behaviors can be used with and without behavior trees. The BT is the "task planner" while the behavior system is the "executor". You can replace BT with other planners available in Aerostack2. ``as2_behavior_trees`` package contains BT NodeTrees wrappers to activate Aerostack2 behaviors. are used to specify the mission plan, while the behaviors are the components that implement the tasks of the mission plan. + +The catalog of behaviors can be checked in the following section :ref:`behaviors`. + +Finally, how to add your custom new behavior can be found in the :ref:`development_tutorials_behavior` section. \ No newline at end of file diff --git a/docs/_01_aerostack2_concepts/index.rst b/docs/_01_aerostack2_concepts/index.rst index b3b6a21e..c3a13abf 100644 --- a/docs/_01_aerostack2_concepts/index.rst +++ b/docs/_01_aerostack2_concepts/index.rst @@ -14,4 +14,5 @@ deploy aerial robotics systems so the user can familiarize with them. aerial_platforms/index.rst motion_controller/index.rst state_estimator/index.rst + behaviors/index.rst diff --git a/docs/_04_robot_behaviors/index.rst b/docs/_04_robot_behaviors/index.rst index 9d9c2e43..ced48b01 100644 --- a/docs/_04_robot_behaviors/index.rst +++ b/docs/_04_robot_behaviors/index.rst @@ -4,8 +4,9 @@ Robot Behaviors =============== -In this section, we give a list of behaviors that has been implemented in Aerostack2. -For more information about what a behavior is, please refer to the :ref:`as2_concepts_behaviors` section, and how work on Aerostack2 architecture in the :ref:`as2_concepts_architecture_behaviors` section. +This catalog shows the list of behaviors according to the tasks that they perform. + +.. note:: For more information about what a behavior is, please refer to the :ref:`as2_concepts_behaviors` section, or how they interact with other Aerostack2 components at :ref:`_as2_concepts_architecture` section. .. TDB: Reference msgs in parameters column to as2_msgs section. .. TDB: Add description to request, result and feedback msgs. diff --git a/docs/_09_development/_tutorials/_tutorials/behavior.rst b/docs/_09_development/_tutorials/_tutorials/behavior.rst index 54d3dbd2..f785bec1 100644 --- a/docs/_09_development/_tutorials/_tutorials/behavior.rst +++ b/docs/_09_development/_tutorials/_tutorials/behavior.rst @@ -1,7 +1,7 @@ .. _development_tutorials_behavior: ====================== -Writing a New Bheavior +Writing a New Behavior ====================== .. contents:: Table of Contents