Mavlink Libraries: Which one should I use?

Hello,

I’m trying to decide what would be the best Mavlink library to build companion computer software off of. Here’s my current understanding of the options:

Dronekit
Pros: Takes care of lower level functions for you, decent documentation.
Cons: Documentation out of date, projec unclear if it supports Python 3+, unclear if support if there for newer builds of Arducopter.

MAVSDK-Python
Pros: Takes care of lower level functions, decent documentation.
Cons: Seems to be built for PX4, some messages and commands don’t work correctly for Ardupilot.

Pymavlink
Pros: Up to date, good compatibility with Ardupilot
Cons: You need to a lot of lower level things yourself, more work to develop with than Dronekit

MAVROS
Pros: Up to date, nice integration with ROS, support for Ardupilot
Cons: I’d need to learn how to use ROS

Are there any options I’m missing? Is Dronekit dead? My options (in order of preference) seem to be:

  1. Dronekit is actually alive and working on Python 3+, just use that
  2. Learn how to use ROS and use MAVROS
  3. Use Pymavlink and just write everything myself.

What are people in industry using?

1 Like

Dronekit hasn’t had any active development in several years - avoid it if possible.

pymavlink continues to receive updates and is an excellent place to start.

MAVROS would only be attractive, in my opinion, if you had a compelling reason to use ROS for other available features. If all you need is a way to send MAVLink messages, it’s probably a bit much. On the plus side, it receives active development, and there’s even a release for ROS2.

Dronekit is working perfectly with python3.
I think documentation explains everything and is up to date with the code, why do you say that it is not up to date?
If you’re a beginner, I recommend you to start with dronekit.
Then you can proceed to pymavlink.
You can also extend the capabilities of dronekit with pymavlink since it exposes the mav connection out of the vehicle class.
I still use dronekit since it is really stable, works out of the box, and deals with all the connection related things in background and when it is not sufficient, I just use mav connection of it to extend the capabilities.

avoid dronekit for now. read them

  1. Connect to drone via HereLink and Drone-kit Python - #9 by Alvin - HereLink - Cubepilot
  2. Dronekit 2.9.2 experience sharing · Issue #1139 · dronekit/dronekit-python · GitHub
  3. DroneKit-Python Rescue Project - #26 by rmackay9

MAVSDK-Python does not seem to work well with Ardupilot (I am still trying to confirm, confirmed)

Things have changed recently, mavsdk-python version 1.4.9 works with Pi OS.

Version 1.4.9 with Jetson Ubuntu 20.04 still having some running issue.