Px4+uxrce+zenoh_bridge_ros2dds

I’m trying to set up interoperability between the uxrce_agent and zenoh_bridge_ros2dds.

The problem: PX4 topics have INVALID topic type hash and BEST_EFFORT QoS. The zenoh_bridge_ros2dds bridge detects the PX4 topics, but data from them does not flow through the bridge into Zenoh — even though the keys are created and can be subscribed to.

However, if I start publishing my own messages to any PX4 topic with QoS=BEST_EFFORT, I begin receiving both my messages AND the messages sent by the flight controller in Zenoh. If QoS != BEST_EFFORT, I only see my own messages in Zenoh.

As I understand it, the CycloneDDS instance bundled inside zenoh_bridge_ros2dds is discarding data from PX4 topics. I tried configuring CycloneDDS via an XML file, but apparently the latest bridge version uses CycloneDDS 0.10.x, while the parameter I need — //CycloneDDS/Domain/Compatibility/IgnoreTypeInformation — seems to be available only in 0.11.x.

I would be over the moon if you could help! :folded_hands:

Hi @fj17,

Are you aware that PX4 has native Zenoh support built in? Since v1.17, there’s a zenoh module using Zenoh-Pico that runs directly on the FMU and talks to a Zenoh router without going through DDS at all.

The architecture is:

PX4 (Zenoh-Pico) → Zenoh router (rmw_zenohd) → ROS 2 (rmw_zenoh)

This skips the uXRCE-DDS agent and CycloneDDS entirely, which would avoid the type hash and QoS issues you’re hitting.

To set it up:

  1. Make sure your board config has CONFIG_MODULES_ZENOH=y (several boards include it by default, and SITL has px4_sitl_zenoh)
  2. Set ZENOH_ENABLE=1 on PX4
  3. Configure the network endpoint: zenoh config net client tcp/<companion_ip>:7447
  4. On the companion, run ros2 run rmw_zenoh_cpp rmw_zenohd and set RMW_IMPLEMENTATION=rmw_zenoh_cpp

More details in the docs

Let us know how it goes!

Thank you @rroche for your detailed answer!

Yes, I’ve heard about that approach, but I read that Zenoh-Pico in PX4 currently only works over Ethernet. Or am I mistaken? My flight controller doesn’t have Ethernet capability yet, unfortunately. So I thought that it’s not for me yet.

If I can’t get the bridge working, I’ll probably start exploring that direction anyway.

Thanks again for the suggestion! :folded_hands: