Connecting to QGroundControl through ROS?

Hi!

I have a drone with a Pixhawk FMU and a RPI companion computer which has been set up following the official guide: Raspberry Pi Companion with Pixhawk | PX4 Guide (main)

In order to easily connect to the drone from anywhere, I have plugged a LTE module on the RPI and set up a VPN. If possible, I would like to use SW like QGroundControl to connect to the drone using this tunnel (instead of the radio).

If I used Mavlink for the FMU<->RPI communication, I understand I could use mavproxy or mavlink-router to forward mavlink packets through the VPN and easily connect to QGC. However, I plan to run some ROS2 applications on the RPI, so I think I would rather configure PX4 to use uXRCE DDS instead of Mavlink.

But if PX4 communicates with the RPI using ROS, is it still possible to use the RPI as a bridge for QGC application? Is there a way to convert ROS messages and Mavlink messages?

Thank you.

We use a SiK radio for telemetry with QGC.

But if you want to use QGC over ROS, then MAVROS could be an option. It has the option to specify the gcs_url which would be the IP of the computer running QGC and which is in the same VPN.

However, this would mean that you cannot use uXRCE DDS anymore (unless you have a Pixhawk 6x, then you can utilize both Ethernet and serial communication, one for DDS and the other for mavlink-router).

Ah yes! Mavros seems to do exactly what I need.

I am curious about the ethernet+serial setup you mention. I don’t have a ethernet slot on my Pixhawk, but it has 2 telemetry ports so technically I could use one port for uXRCE DDS communication and the other for mavlink communication. I don’t think it makes much sense but can PX4 handle both simultaneously?