Aerostack2

DocsROS 2 Interfaces

State estimator

What the state estimator publishes, and what each plugin subscribes to.

The state estimator runs as one node per drone, called state_estimator. The node publishes the same outputs whatever plugin it loads, and the plugin decides what it subscribes to. State estimator explains the plugins and the TF tree.

The node creates its topics and loads its plugin about a second after it starts, so they don't show up straight away.

Outputs

TopicTypeFrameQoS
self_localization/posegeometry_msgs/PoseStampedearthReliable
self_localization/twistgeometry_msgs/TwistStampedbase_linkReliable
/tftf2_msgs/TFMessagemap → odom → base_linkTF defaults
/tf_statictf2_msgs/TFMessageearth → mapTF defaults

Every plugin publishes earth → map as a static transform. The EKF moves it to /tf when simple_ekf.earth_map_transform.static_tf is false.

The pose and twist are published on every update unless publish_hz sets a rate. They use reliable QoS with a depth of 10, even though the names header gives sensor data QoS for self_localization/*. A sensor data subscriber still receives them.

The names header also defines self_localization/odom, but nothing publishes it.

Debug topics

Every plugin also gets a copy of its own estimate, which helps to compare plugins or check one before you trust it.

TopicType
state_estimation/<plugin>/posegeometry_msgs/PoseStamped
state_estimation/<plugin>/twistgeometry_msgs/TwistStamped

They're on by default and published on every update. <plugin>.debug_publish_hz sets a rate, and 0 turns them off.

Plugin inputs

Ground truth

TopicTypeParameter
ground_truth/posegeometry_msgs/PoseStampedground_truth.pose_sub_topic
None by defaultgeometry_msgs/TwistStampedground_truth.twist_sub_topic
None by defaultmocap4r2_msgs/RigidBodiesground_truth.mocap_sub_topic

The pose has to be in the earth frame. With no twist topic, the twist is differentiated from the pose. With a motion capture topic, the pose comes from the rigid body named in ground_truth.rigid_body_name instead.

Raw odometry

TopicTypeParameter
sensor_measurements/odomnav_msgs/Odometryraw_odometry.odom_sub_topic
sensor_measurements/gpssensor_msgs/NavSatFixOnly with raw_odometry.use_gps

With use_gps on, the plugin also serves the GPS origin. These are the only origin services in Aerostack2, so anything that flies to GPS coordinates needs this plugin.

ServiceTypeWhat it does
set_originas2_msgs/SetOriginSets the origin. Refused once one is set, whether by a call, the parameters or the first fix
get_originas2_msgs/GetOriginReturns the origin, if it's set

Both sit at the root of the namespace, so for drone0 they're /drone0/set_origin and /drone0/get_origin.

Simple EKF

TopicTypeParameter
sensor_measurements/imusensor_msgs/Imusimple_ekf.predict_topic
platform/infoas2_msgs/PlatformInfosimple_ekf.platform_topic
ground_truth/poseSet per sourcesimple_ekf.<source>.topic
None by defaultgeometry_msgs/TwistStampedsimple_ekf.imu_model_fallback.body_rates_topic
None by defaultas2_msgs/Thrustsimple_ekf.imu_model_fallback.thrust_topic

Each source in update_topics sets its own topic and type. The type is one of geometry_msgs/PoseStamped, geometry_msgs/PoseWithCovarianceStamped, nav_msgs/Odometry and mocap4r2_msgs/RigidBodies. The default configuration has a single source on ground_truth/pose.

platform/info tells the filter when the drone first goes offboard, which ends the correction it applies on the ground. The two fallback topics stand in for the IMU when it stops arriving.

Setting simple_ekf.internal_ekf_debug_topics to a base name also publishes the filter's raw state under it, before smoothing. The plugin's README lists those topics.

Parameters

ParameterDefaultWhat it does
plugin_nameThe plugin to load. Required
publish_hz0.0How often the pose and twist are published, in Hz. 0 publishes on every update
<plugin>.debug_publish_hz-1.0How often the debug topics are published. -1 publishes on every update and 0 turns them off

All the estimator's timers run on wall time, so publish_hz and debug_publish_hz ignore use_sim_time.

Last updated on November 3, 2026

On this page

Last updated on November 3, 2026