I have a drone that I need to control using off board mode and ros. I am trying to shift from ROS 1 to ROS 2. In ROS 1 , using MAVROS I can easily obtain the px4 messages as well as publish mavlink messages to QGroundControl through an UDP link .
With ROS2, I want to use XRCE DDS agent to take benefit of the DDS framework that tends itself to use with other drones in the same network easily.
But QGroundControl does not support XRCE DDS Agent ( I have not come across any update so far) .
So what would be my best options? Use MAVROS and XRCE DDS both with ROS 2 or keep using ROS 1?

You have two options:

  1. Use MAVROS on ROS 2. Just the same MAVROS that you used on ROS 1, but ported on ROS 2. No XRCE DDS. Everything goes through MAVLINK.
  2. Entirely drop MAVROS / MAVLINK and use XRCE DDS on ROS 2. Note that you have to use at least v1.14-rc1.