ROS2 Offboard on Hardware

I’ve been working with ROS2 for a while with PX4, have all my apps built w.r.t RTPS bridge and the SITL, is working fine. I want to test it on a real drone with a Pixhawk 5x(holybro) and Nvidia Jetson Nano. I understand that the guide to building a Hardware RTPS bridge is still not out from the developers.

I have tried building with the link below, but for some reason, the terminal crashes every time, without an error.

Anyone else has tried it??
What is the PX4 developer’s timeline to release it??


Hey, did you manage to build it? I’m trying to do that too :confused:

(SOLVED) with reference to Micrortps_client does not receive uorb message and Unable to establish FastRTPS connection with pixhawk. #38 .

Plug Pixhawk 4 into companion computer via USB, make and upload the firmware from the PX4-Autopilot directory:

make px4_fmu-v5_rtps
make px4_fmu-v5_rtps upload

Enter the nsh> from ~/PX4-Autopilot/Tools$:


Start the micrortps_client over UART instead of UDP (which works for SITL):

nsh>  micrortps_client start -t UART

In a new terminal, source ROS2 and start the micrortps_agent over UART:

micrortps_agent start -t UART

In a new terminal, source ROS2 and echo the desired topic (or run the desired listener):

ros2 topic echo /fmu/vehicle_odometry/out

And the vehicle_odometry topic is printed for the Pixhawk 4 as desired. Hope this helps someone else stuck in the future!

Make sure it’s an UART connection instead of a UDP as it is a USB connection. If you’re using a pixhawk 5x, and connecting to the Companion Computer using the ETH port then use UDP.

You could later add a bash script to start PX4 at startup and automatically connect.

1 Like