MAVLink MAVLink -- Micro Air Vehicle Message Marshalling Library. MAVLink is a very lightweight, header-only message library for communication between drones and/or ground control stations. It consists primarily of message-set…

MAVLink
MAVLink -- Micro Air Vehicle Message Marshalling Library.
MAVLink is a very lightweight, header-only message library for communication between drones and/or ground control stations. It consists primarily of message-set specifications for different systems ("dialects") defined in XML files, and Python tools that convert these into appropriate source code for supported languages. There are additional Python scripts providing examples and utilities for working with MAVLink data.
> Tip MAVLink is very well suited for applications with very limited communication bandwidth. Its reference implementation in C is highly optimized for resource-constrained systems with limited RAM and flash memory. It is field-proven and deployed in many products where it serves as interoperability interface between components of different manufacturers.
Quick start
Generate C headers
To install the minimal MAVLink environment on Ubuntu LTS 20.04, 22.04, or 24.04, enter the following on a terminal:
bash
# Dependencies
sudo apt install python3-pip
# Clone mavlink into the directory of your choice
git clone https://github.com/mavlink/mavlink.git --recursive
cd mavlink
python3 -m pip install -r pymavlink/requirements.txt
You can then build the MAVLink2 C-library for message_definitions/v1.0/common.xml from the /mavlink directory as shown:
bash
python3 -m pymavlink.tools.mavgen --lang=C --wire-protocol=2.0 --output=generated/include/mavlink/v2.0 message_definitions/v1.0/common.xml
Use from cmake
To include the headers in cmake, install them locally, e.g. into the directory install:
cmake -Bbuild -H. -DCMAKE_INSTALL_PREFIX=install -DMAVLINK_DIALECT=common -DMAVLINK_VERSION=2.0
cmake --build build --target install
Then use find_package to get the dependency in CMakeLists.txt:
find_package(MAVLink REQUIRED)
add_executable(my_program my_program.c)
target_link_libraries(my_program PRIVATE MAVLink::mavlink)
And pass the local install directory to cmake (adapt to your directory structure):
cd ../my_program
cmake -Bbuild -H. -DCMAKE_PREFIX_PATH=../mavlink/install
For a full example, check [examples/c](examples/c).
*Note: even though we use target_link_libraries in cmake, it doesn't actually "link" to MAVLink as it's just a header-only library.*
Other instructions
Instructions for using the C libraries are then covered in Using C MAVLink Libraries (mavgen).
> Note: Installing the MAVLink Toolchain explains how to install MAVLink on other Ubuntu platforms and Windows, while Generating MAVLink Libraries explains how to build MAVLink for the other programming languages supported by the project.
> The sub-topics of Using MAVLink Libraries explain how to use the generated libraries.
Key Links
- Documentation/Website (mavlink.io/en/)
- Discussion/Support
- Contributing
- License
Members
-
qgroundcontrol ★ PINNED
Cross-platform ground control station for drones (Android, iOS, Mac OS, Linux, Windows)
C++ ★ 4.7k just nowExplain → -
mavlink ★ PINNED
Marshalling / communication library for drones.
Python ★ 2.3k 2d agoExplain → -
mavros ★ PINNED
MAVLink to ROS gateway with proxy for Ground Control Station
C++ ★ 1.2k 20h agoExplain → -
c_uart_interface_example ★ PINNED
Simple MAVLink to UART interface example for *nix systems
C++ ★ 305 2y agoExplain → -
c_library_v2 ★ PINNED
Official reference C / C++ library for the v2 protocol
C ★ 338 2d agoExplain → -
MAVSDK ★ PINNED
API and library for MAVLink compatible systems written in C++ 20
C++ ★ 895 2d agoExplain → -
MAVSDK-Python
MAVSDK client for Python.
Python ★ 442 4d agoExplain → -
rust-mavlink
MAVLink library for Rust.
Rust ★ 279 2d agoExplain → -
mavlink-camera-manager
MAVLink Camera Manager Service
Rust ★ 174 24d agoExplain → -
mavlink-devguide
MAVLink Developer Guide
Python ★ 143 2d agoExplain → -
mavlink2rest
mavlink2rest creates a REST server that provides mavlink information from a mavlink source
Rust ★ 127 2mo agoExplain → -
c_library_v1
MAVLink protocol C/C++ implementation auto-generated from latest protocol specs.
C ★ 105 2d agoExplain → -
MAVSDK-Java
MAVSDK client for Java.
Jinja ★ 105 2mo agoExplain → -
MAVSDK-Proto
Collection of proto files used by gRPC in MAVSDK
Python ★ 59 4d agoExplain → -
qgc-user-guide ▣
QGroundControl User Guide (Gitbook source)
CSS ★ 48 2y agoExplain → -
qgc-dev-guide ▣
QGroundControl Developers Guide
★ 46 2y agoExplain → -
MAVSDK-JavaScript
JS wrapper for MAVSDK using grpc-web to generate a static http client, communicating through the Envoy proxy.
JavaScript ★ 29 4y agoExplain → -
MAVSDK-Swift
MAVSDK client for Swift.
Swift ★ 29 14d agoExplain → -
MAVSDK-Rust
MAVSDK client for Rust. https://mavsdk.mavlink.io
Rust ★ 26 2y agoExplain → -
mavlink-gbp-release
git-buildpackage repository for releasing mavlink as 3-rd party library for ROS
CMake ★ 26 9mo agoExplain → -
MAVSDK-docs
MAVSDK Guide Docs - Source Code
★ 25 1y agoExplain → -
MAVSDK-Go
No description.
Go ★ 23 9mo agoExplain → -
MAVSDK-CSharp ▣
MAVSDK client for C#. https://mavsdk.mavlink.io
C# ★ 20 4y agoExplain → -
MAVSDK-Swift-Example
Example app using MAVSDK for iOS (Swift)
Swift ★ 17 4y agoExplain → -
libevents
No description.
C++ ★ 15 2mo agoExplain → -
containers
Docker image for building QGroundControl
Shell ★ 15 5y agoExplain → -
rfcs
Requests for Comment for MAVLink protocol spec
★ 10 2y agoExplain → -
mavros-release
Bloom release repository for mavros.
★ 7 9mo agoExplain → -
mavlink-ivy-interface
MAVLink to IVY Bus Interface
C ★ 6 12y agoExplain → -
docs.qgroundcontrol.com
QGroundControl User Guide (generated). Sources: https://github.com/mavlink/qgroundcontrol/tree/master/docs
HTML ★ 4 9d agoExplain → -
mavlink.io
Mavlink Developer Guide Content: See https://github.com/mavlink/mavlink-devguide
HTML ★ 3 2d agoExplain → -
mavsdk.mavlink.io
Mavlink SDK guide
HTML ★ 3 3d agoExplain → -
dev.qgroundcontrol.com
QGroundControl Developers Guide Content: See https://github.com/mavlink/qgc-dev-guide
HTML ★ 2 2y agoExplain → -
api.qgroundcontrol.com
Docs repo for QGroundControl source code docs
HTML ★ 1 6d agoExplain → -
MAVSDK-XCFramework ▣
No description.
Swift ★ 1 5y agoExplain → -
gst-plugins-good ⑂
'Good' GStreamer plugins and helper libraries
C ★ 1 2y agoExplain → -
homebrew-mavsdk
Homebrew repository for MAVSDK
Ruby ★ 1 6y agoExplain → -
homebrew-tap
No description.
Ruby ★ 0 3mo agoExplain → -
qgc-gstreamer
No description.
★ 0 1y agoExplain → -
mavlink-uavrt ⑂
Marshalling / communication library for drones.
★ 0 3y agoExplain →
No repos match these filters.