Micro XRCE-DDS

Configuring Micro XRCE-DDS on Skynode

Micro XRCE-DDS allows uORB topics on the FMU to be published in ROS 2 in AuterionOS.

Micro XRCE-DDS is supported in APX4 3.0 and later. It is enabled and configured by default.

Setting up Micro XRCE-DDS on an existing Auterion-powered vehicle is only possible for the manufacturer of that vehicle.

The DDS bridge comprises two components:

  1. The Micro XRCE-DDS Agent, which is installed and enabled by default in AuterionOS, and

  2. The Micro XRCE-DDS Client, which must be enabled in the flight controller.

Enabling the Micro XRCE-DDS Client

The PX4 module Micro XRCE-DDS Client is called uxrce_dds_client and is configured by a set of PX4 parameters:

PX4 ParameterValue

UXRCE_DDS_CFG

Ethernet

UXRCE_DDS_PRT

8888

UXRCE_DDS_AG_IP

The IPv4 address of the Skynode in int32 format.

For example, the default parameter value 170461697 is equivalent to the IP address 10.41.10.1.

Reboot the device after making these changes in order for them to apply.

After rebooting APX4, verify in the MAVLink Shell that the Micro XRCE-DDS Client is running and connected:

uxrce_dds_client status
nsh> uxrce_dds_client status
INFO  [uxrce_dds_client] Running, connected
INFO  [uxrce_dds_client] Using transport:     udp
INFO  [uxrce_dds_client] Agent IP:            10.41.10.1
INFO  [uxrce_dds_client] Agent port:          8888
INFO  [uxrce_dds_client] Custom participant:  yes
INFO  [uxrce_dds_client] Localhost only:      no
INFO  [uxrce_dds_client] Payload tx:          46079 B/s
INFO  [uxrce_dds_client] Payload rx:          11680 B/s

A script is provided in APX4 to convert IPv4 addresses from decimal dot notation to int32 format. The script is also available upstream: https://github.com/PX4/PX4-Autopilot/blob/main/Tools/convert_ip.py

python3 ./Tools/convert_ip.py A.B.C.D

The FMU must have Ethernet enabled and an IPv4 address in the same subnet as the Skynode to use Micro XRCE-DDS.

Adding or removing topics

The list of topics the FMU publishes and subscribes to using Micro XRCE-DDS is defined in src/modules/uxrce_dds_client/dds_topics.yaml.

The dds_topics.yaml file has three sections:

  1. publications: Topics published to ROS 2,

  2. subscriptions: Topics subscribed to from ROS 2, and

  3. subscriptions_multi: Topics subscribed to from ROS 2 for which a separate instance of the uORB topic is created for the incoming ROS 2 messages.

To add a topic to Micro XRCE-DDS, specify the topic name and message type under the appropriate section. For example, the following creates a publisher for the vehicle_odometry topic:

publications:
  ...
  - topic: /fmu/out/vehicle_odometry
    type: px4_msgs::msg::VehicleOdometry

Testing communication between APX4 and ROS 2

To verify that your APX4 to ROS 2 communication is working and that you are receiving messages from the flight controller, run the following command in your Skynode's SSH shell. You should see the frequency at which the messages are coming through.

ros_setup 
ros2 topic hz /fmu/out/vehicle_odometry

Last updated