No Micro XRCE-DDS Communication Between ArduPilot FC and Raspberry Pi (ROS 2)

Hi everyone,

I’m trying to establish Micro XRCE-DDS communication between my flight controller (ArduPilot) and a Raspberry Pi running ROS 2 .

On the flight controller (FC):

  • Built ArduPilot with “Micro XRCE-DDS support for ROS 2” enabled (using the ArduPilot custom build server).

  • Set the serial port to “DDS XRCE” with baud 115200.

On the Raspberry Pi (PI):

  • Built the micro-ROS Agent with all required dependencies.

  • Started the agent at 115200 baud, and it prints “running…” as expected.

However, in Mission Planner I get the message:

dds: no ping response, exiting

Does anyone know what might be causing this or how to troubleshoot it?

Thanks!

On the Raspberry Pi, which UART are you using? Has the UART been enabled?

Thanks for answering.

On the Pi (raspberry pi zero 2 W), I’m using GPIO0 (/dev/ttyS0). I have enabled serial using the following steps:

  • Open config tool (works in headless also):

    • sudo raspi-config
  • in the utility, select “Interfacing Options” → “Serial”:

    • When prompted, select “no” to “Would you like a login shell to be accessible over serial?”

    • When prompted, select “yes” to “Would you like the serial port hardware to be enabled?”.

  • Now, Reboot the Pi.

I have connected it as described in: ROS 2 on Raspberry Pi — Dev documentation (apart from the 5V line - the FC and Pi each has its own 5V supply).

On the FC (MicoAir 743 35A AIO) im using UART2 (serial2)

I’ve tested with my RPi4 + CubeOrange.

Using

ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/ttyAMA0 -b 115200

Worked fine for me.

Which OS are you using? ROS2 usually runs on Ubuntu, which doesn’t have raspi-config, so I manually had to edit `enable_uart=1` to `/boot/firmware/config.txt

Thank you for testing the setup.

We’re running Ubuntu 22.04 in Docker on Pi OS Lite.
When I used /dev/ttyAMA0 instead of /dev/ttyS0, I was able to establish a connection (see picture below).
However, any ros2 service requests result in no response, and echoing topics also produces no output.

I’ve come across other forum posts with similar issues, and some users reported success by enabling UART flow control (or by switching to Ethernet instead of serial).

My flight controller doesn’t have UART flow-control pins or Ethernet support. The ArduPilot ROS2 Pi guide only shows a UART connection without flow control.

I also tried baud rates of 57600 and 230400, but the issue persists.

Best regards,
Niels

DDS requires baud rates greater than ~500000. Try a baud of 921600