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:
- 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.
- Entirely drop MAVROS / MAVLINK and use XRCE DDS on ROS 2. Note that you have to use at least
v1.14-rc1
.
Hi, sorry to bring this years-old topic back, but would it be possible to run XRCE DDS and stream MAVLink simultaneously with the same companion computer and PX4 FC (XRCE DDS for navigation, control etc and MAVLink for ground station communication)? I understand that for DDS, you would have to use a TELEM port with MAVLink disabled, but could another connection be added (eg:serial) for MAVLink streaming? Thanks to all replies in advance!
You can configure one serial port for a MAVLink instance and another for XRCE-DDS.
For the MAVLink instance, set the MAV_<i>_CONFIG
parameter to the appropriate port (e.g., TELEM1
).
For the XRCE-DDS instance, disable the corresponding MAV_<i>_CONFIG
(choose Disable
) for the serial port and configure the UXRCE_DDS_CFG
parameter to use the port assigned to XRCE-DDS (e.g., TELEM2
)
Thank you for the reply. That’s the plan for now, most likely connecting one TELEM to an RC, one for the XRCE-DDS instance, and USB for MAVLink.
Btw, is there another way to allow QGC to connect to the vehicle with only DDS? Feels like a bit of a waste of resources and a USB port just to stream MAVLink for QGC to listen to.