PX4 Messages in ROS 2

Interact with uORB messages in APX4 using ROS 2

This is a preview feature which might change with AuterionOS 3.0

uORB messages published by the FMU can be made available to AuterionOS apps by enabling the Micro XRCE-DDS (uXRCE-DDS) bridge for use in ROS 2 applications. The bridge supports communication in both directions, meaning ROS 2 applications can receive certain uORB topics from APX4, as well as send messages to the flight controller.

Micro XRCE-DDS is supported in APX4 3.0 and later.

Configuration

Drone Manufacturers need to follow the instructions linked below to enable Micro XRCE-DDS in AuterionOS:

Micro XRCE-DDS

Please contact the vehicle manufacturer or success@auterion.com if you are developing an application for an Auterion-powered vehicle and require help with the setup of Micro XRCE-DDS.

ROS 2 topic naming

When Micro XRCE-DDS is enabled, a pre-determined set of uORB topics coming from APX4 will be published in ROS 2. The ROS 2 topics are prefixed with /fmu/out/. For example, a ROS 2 node can receive vehicle_odometry uORB messages by subscribing to /fmu/out/vehicle_odometry.

Similarly, Micro XRCE-DDS subscribes to a set of ROS 2 topics to be published as uORB topics in the FMU. These ROS 2 topics are prefixed with /fmu/in. For example, a ROS 2 node can publish to the vehicle_visual_odometry uORB topic by publishing to /fmu/in/vehicle_visual_odometry.

ROS 2 message definitions

The ROS 2 message headers are built from the (uORB) message definitions and are available by the px4_msgs ROS 2 package: https://github.com/PX4/px4_msgs.

To ensure compatibility, the ./msg directory of px4_msgs that is being used to compile the AuterionOS application should have the same contents as the ./msg directory of the APX4 firmware that is being used.

Last updated

#145: Add GPS denied

Change request updated