Which one is the most advantageous: MAVLink, MAVSDK, or MAVROS?

Hello, I am working on a project where I use PX4 with an MC (mission computer). I have delegated the drone control to the MC and I am managing the controls from there. In my initial work, I was using MicroXRCEAgent to communicate with ROS2 for controlling the drone.

Is it logical to use MicroXRCEAgent, also known as uXRCE-DDS (PX4-ROS 2/DDS Bridge)? Additionally, another module is added for communication. Isn’t it safer to control directly in offboard mode via MAVLink or MAVSDK?

My goal is to access as many components of the drone as possible. Which is safer to use and allows for greater control over PX4: MAVROS, MAVLink, or MAVSDK

What is the difference between MAVROS, MAVLink, and MAVSDK? Is the difference only in the communication methods, or does one allow you to easily access IMU data while the others do not?

I am actively using ROS2 in my system, but I want the communication with PX4 to be fast. I don’t want to wait for the ‘uXRCE-DDS’ connection time, and additionally, it sometimes doesn’t work. I don’t want to have issues like this

I chose uXRCE-DDS because it allowed for easier coding, but now I want the system connections to be more robust. My primary goal is security. Which one would be more appropriate to use in this case?"

Hi @serkan, please see below

My goal is to access as many components of the drone as possible. Which is safer to use and allows for greater control over PX4: MAVROS, MAVLink, or MAVSDK

if that is your goal then stick with uXRCE-DDS, its our fastest interface and it gives you access to almost everything in a way MAVLink will never do.

What is the difference between MAVROS, MAVLink, and MAVSDK? Is the difference only in the communication methods, or does one allow you to easily access IMU data while the others do not?

Both MAVROS and MAVSDK are using MAVLink in the backend, so you are 100% depending on MAVLink. What you have to understand about MAVLink is that its a standard, and that multiple projects are using it, which means the interface is stable, but also means that its limited to what makes it into the standard. The second thing you have to understand is that its not meant to be a realtime protocol.

Heres a list of supported mavlink messages:

https://mavlink.io/en/messages/common.html

I think you made the right choice with uXRCE-DDS if what you want is access to all components, with almost no latency added from the protocol.