PX4 Messages in ROS 2

Interact with uORB messages in APX4 using ROS 2

circle-exclamation

uORB messagesarrow-up-right published by the FMU can be made available to AuterionOS apps by enabling the Micro XRCE-DDSarrow-up-right (uXRCE-DDS) bridge for use in ROS 2 applicationsarrow-up-right. 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.

circle-info

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-DDSchevron-right
circle-check

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_msgsarrow-up-right.

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