Post · 5 min read· pp. 99–102

Communication channels

DocsConcepts

The standard channels that connect the components of a drone.

Authored by

  • @alvgaona

The components of a drone talk to each other over a small set of standard channels. Each channel is a group of ROS 2 topics with fixed names, published under the drone's namespace, so motion_reference/pose for drone0 is /drone0/motion_reference/pose. Because the names are fixed, any component can be replaced by another that uses the same channels.

Four channels close the control loop. Select one to see its topics:

React Flow

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.

Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

self_localization

Motion references

Where the drone should be or how it should move. The motion controller reads them according to its current control mode.

motion_reference/pose``motion_reference/twist``motion_reference/trajectory``motion_reference/thrust

Published by : Motion behaviors, Trajectory generation, Motion reference handlers (Python API, teleoperation)

Used by : Motion controller

The channels

ChannelTopicsPublished byUsed by
Motion referencesmotion_reference/*Behaviors, motion reference handlersMotion controller
Actuator commandsactuator_command/*Motion controllerAerial platform
Sensor measurementssensor_measurements/*, ground_truth/*Aerial platform, sensor driversState estimator, perception
Self localizationself_localization/*, TFState estimatorController, behaviors, user interfaces
Platform statusplatform/infoAerial platformController, behavior trees, user interfaces
Alertsalert_eventMissions, user interfacesAerial platform

Motion references

Motion references describe where the drone should be or how it should move. There are four topics: pose, twist, trajectory and thrust. How the motion controller reads them depends on its control mode. In position mode it follows the pose and takes the speed limit from the twist; in speed mode it follows the twist.

Control modemotion_reference/posemotion_reference/twistmotion_reference/trajectorymotion_reference/thrust
HoverNo topics. The drone holds its current position.
Positiontarget positionspeed limit—Not used—Not used
Speed—Not usedvelocity—Not used—Not used
Speed in a planeheighthorizontal velocity—Not used—Not used
Trajectory—Not used—Not usedsetpoints—Not used
Body rates—Not usedangular rates—Not usedcollective thrust

Every mode except hover and body rates also carries a yaw. A yaw angle travels in the orientation of the pose and a yaw speed in twist.angular.z.

What each control mode reads from the motion references, as sent by the motion reference handlers.

You rarely publish them by hand. Behaviors publish them for you, and the motion reference handlers in as2_motion_reference_handlers set the control mode and publish the right topics in one call. Motion controller explains the control modes.

Actuator commands

Actuator commands are what the motion controller sends to the platform, on the pose, twist, thrust and trajectory topics. Their meaning depends on the control mode the platform accepts, which varies from drone to drone. One platform may take speed commands while another only takes body rates and thrust. The controller asks the platform which control modes it supports and sends commands in one of them.

Control modeactuator_command/poseactuator_command/twistactuator_command/trajectoryactuator_command/thrust
HoverNo topics. The platform holds its position.
Positionpositionvelocity—Not used—Not used
Speed—Not usedvelocity—Not used—Not used
Trajectory—Not used—Not usedsetpoint—Not used
Body rates—Not usedangular rates—Not usedcollective thrust

Every mode except hover and body rates also carries a yaw. A yaw angle travels in the orientation of the pose and a yaw speed in twist.angular.z.

What the multirotor simulator platform reads in each mode. Other platforms support a subset of these modes.

Sensor measurements

Each sensor publishes on its own topic under sensor_measurements/, such as odom, imu, gps, camera, lidar or battery. Platforms publish the sensors built into the drone, and drivers publish extra ones such as a RealSense camera. Simulators also publish the true pose of the drone on ground_truth/pose and ground_truth/twist.

Self localization

The state estimator publishes where the drone is on self_localization/pose and how fast it moves on self_localization/twist. It also publishes the TF tree that relates the drone to the world. Reading the pose from TF is preferred, because TF can give it in any frame.

Platform status

The platform publishes platform/info, which says whether it's connected, armed and in offboard mode, which control mode it's in, and where its state machine is, such as landed, flying or landing. Missions and user interfaces read it; the behavior tree's IsFlying condition, for example, checks it. The take-off and land behaviors move the state machine forward by sending it events. Aerial platform describes the state machine.

/drone0/platform/infoas2_msgs/PlatformInfo

diagram
connected

diagram
armed

diagram
offboard

status

DisarmedLandedTaking offFlyingLandingEmergency

current_control_mode

Speed+Yaw angle

A sample platform/info message from a drone in flight.

Alerts

alert_event carries emergencies for one drone. The platform acts on two of them. A kill switch cuts the motors and an emergency hover stops the drone in place, and both put the platform in its emergency state. The Python API can send any alert, and the RViz teleoperation panel can send a kill switch.

diagram

Three alerts aren't acted on yet

Emergency land, force hover and force land are defined in the message, and the Python API has methods that send them, but nothing in Aerostack2 reacts to them yet. Don't rely on them to bring a drone down. A behavior tree can react to any alert with the WaitForAlert decorator.

For the platform

-3Emergency landEMERGENCY_LANDnot acted on yet

-2Emergency hoverEMERGENCY_HOVER

-1Kill switchKILL_SWITCH

Information

0InfoINFO_ALERT

For Aerostack2

+1Force hoverFORCE_HOVERnot acted on yet

+2Force landFORCE_LANDnot acted on yet

AlertEvent values. The sign says who is meant to handle each alert, and dashed alerts aren't acted on yet.

Frames and timestamps

Every motion reference carries a frame ID and a timestamp in its header. The motion controller uses the TF tree to convert a reference from its frame into the one it controls in, so a mission can give a point in the world frame or relative to the drone. Pose topics use the shared earth frame and twist topics use the drone's base_link frame. Frames explains the frame tree.

Last updated on November 11, 2026

[

diagram

Architecture

The layers of Aerostack2, how a drone's software is organized, and how components are swapped.](024_2026-12-05_architecture.md)[

diagram

Frames

The coordinate frames every drone uses, how they relate, and which one to use when.](027_2026-12-05_frames.md)