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.
The DDS bridge comprises two components:
The Micro XRCE-DDS Agent, which is installed and enabled by default in AuterionOS, and
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:
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:
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:
publications
: Topics published to ROS 2,subscriptions
: Topics subscribed to from ROS 2, andsubscriptions_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:
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.
Last updated