Aerostack2

DocsROS 2 Interfaces

Overview

The topics, services and actions the components of a drone use to talk to each other.

Authored by
  • @alvgaona

This section lists the ROS 2 interfaces of each component, with their names, types and QoS. It's a reference to look things up in. Communication channels explains how the components fit together.

Names

Every interface is named relative to the drone's namespace. A drone launched as drone0 publishes platform/info on /drone0/platform/info, and its take-off behavior serves /drone0/TakeoffBehavior. The pages in this section give the names without the namespace.

The TF topics are the exception. /tf and /tf_static are shared by every drone, and each drone's frames carry its namespace instead, like drone0/base_link. Frames explains the tree.

Using the names in code

The standard names are defined once in as2_core, so your code doesn't have to spell them out. In C++ they're constants in the as2_names namespace, from three headers in as2_core/names/:

#include <as2_core/names/topics.hpp>
#include <as2_core/names/services.hpp>
#include <as2_core/names/actions.hpp>

auto sub = node->create_subscription<as2_msgs::msg::PlatformInfo>(
  as2_names::topics::platform::info, as2_names::topics::platform::qos, callback);

The topic header also gives the QoS each group of topics uses. Python has the same names in a module built from the headers, without the QoS:

from as2_core import as2_names

as2_names.topics.platform.info  # 'platform/info'
as2_names.services.platform.set_arming_state  # 'set_arming_state'
as2_names.actions.takeoff  # 'TakeoffBehavior'

global is a Python keyword

as2_names.topics.global.alert_event is a syntax error in Python. Read it with getattr(as2_names.topics, "global").alert_event, or write "alert_event" directly.

The headers only cover the core components and six of the behaviors. The other behaviors and the utilities hard-code their names, which the pages in this section list.

QoS

Aerostack2 uses two QoS profiles for its topics.

ProfileSettingsUsed for
Sensor dataBest effort, depth 5Streams where only the latest message matters, like sensor_measurements/*, ground_truth/*, motion_reference/* and actuator_command/*
ReliableReliable, depth 10Status and events, like platform/info, controller/info and alert_event

A best effort subscriber receives messages from a reliable publisher, but not the other way round. To read a sensor data topic, subscribe with sensor data QoS too, or with rclcpp::SensorDataQoS() in C++ and qos_profile_sensor_data in Python.

Components

Last updated on November 3, 2026

On this page

Last updated on November 3, 2026