MAVLINKHUD

Overview

The DDS parameter group configures the Micro-ROS (DDS) client embedded within ArduPilot. This system allows the autopilot to communicate natively with ROS 2 (Robot Operating System) nodes running on a companion computer (e.g., Raspberry Pi, Jetson).

This replaces the traditional MAVLink-to-ROS bridge (mavros) with a direct, high-bandwidth, low-latency link using the XRCE-DDS protocol.

Key Concepts

1. Connection

The Micro-ROS client connects to a Micro-ROS Agent running on the companion computer via Serial or UDP.

2. Domain ID (DDS_DOMAIN_ID)

In DDS, the "Domain" is like a virtual network segment. Robots on Domain 0 cannot see messages from robots on Domain 1. This allows multiple robots to operate on the same WiFi network without crosstalk.

3. Reliability (DDS_MAX_RETRY / DDS_TIMEOUT_MS)

Configures how the client behaves if the Agent is not reachable (e.g., companion computer booting up).

Parameter Breakdown

  • DDS_ENABLE: Master switch.
  • DDS_DOMAIN_ID: ROS 2 Domain ID (default 0).
  • DDS_UDP_PORT: Port for UDP transport (default 2019 or 8888 depending on transport).
  • DDS_TIMEOUT_MS: Ping timeout.

Integration Guide

Setting up ROS 2

  1. Companion: Install ROS 2 (Humble or later) and the micro_ros_agent.
  2. ArduPilot: Set DDS_ENABLE = 1.
  3. Transport: Connect Serial or Ethernet.
  4. Launch: Start the agent: ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/ttyACM0 ...
  5. Verify: Run ros2 topic list to see ArduPilot topics (IMU, Battery, etc.).

Developer Notes

  • Library: libraries/AP_DDS
  • Protocol: XRCE-DDS (eProsima).

DDS_DOMAIN_ID

Default 0
Range 0 232

DDS Domain ID (DDS_DOMAIN_ID)

Description

DDS_DOMAIN_ID is used for high-level robotics integration with ROS2 (Robot Operating System).

In a ROS2 network, different groups of robots and computers can be isolated by using a "Domain ID." For the autopilot to talk to your companion computer (e.g. Jetson, Raspberry Pi) running ROS2 nodes, this parameter must match the ROS_DOMAIN_ID environment variable set on your computer.

Tuning & Behavior

  • Default: 0.
  • Usage: Ensure this matches your ROS2 network configuration. If they don't match, the autopilot and the companion computer will not "see" each other.
  • Reboot Required: Yes.

DDS_ENABLE

Default 1
Range 0 1

DDS enable (DDS_ENABLE)

Description

Master switch for the DDS (Data Distribution Service) client, which enables high-speed, native communication with ROS2 (Robot Operating System 2) environments.

Tuning & Behavior

  • Default Value: 1 (Enabled if compiled in)
  • Requires reboot to take effect.

DDS_MAX_RETRY

Default 10
Range 0 100

DDS ping max attempts (DDS_MAX_RETRY)

Description

This parameter controls the connection robustness between ArduPilot and the ROS 2 (Robot Operating System) DDS Agent. It limits how many times the client will try to establish a session before giving up.

The Mathematics

Counter logic.

The Engineer's View

Defined in libraries/AP_DDS/AP_DDS_Client.cpp.

  • 0: Unlimited retries (Best for persistent autonomy).
  • >0: Give up after N attempts.

Tuning & Behavior

  • Default Value: 10
  • Recommendation: Set to 0 for production robots where the companion computer might boot slower than the autopilot.

DDS_TIMEOUT_MS

ms
Default 1000
Range 100 5000

DDS Connection Timeout (DDS_TIMEOUT_MS)

Description

DDS_TIMEOUT_MS defines how patient the autopilot is when trying to establish a link with the ROS2 network.

DDS_UDP_PORT

Default 2019
Range 1 65535

DDS UDP port (DDS_UDP_PORT)

Description

Specifies the network port used for UDP-based DDS communication.