Software
MAVLink
From github.com/mavlink/mavlink (opens in a new tab)
- Drones and boats
- Library
- LGPL-3.0-only
MAVLink is a lightweight, header-only message library for communication between drones and ground control stations, built from XML message-set specifications called dialects.
Facts
- GitHub stars
- 2,482read on 28 Nov 2026
- Last update
- 27 Nov 2026Newest commit on master
- Maintenance
- Activea commit in the last 90 days
- Difficulty
- Intermediate
Checked on GitHub on 28 Nov 2026.
Licenses
- Code
- LGPL-3.0-only (opens in a new tab)
Read by Robotheca from COPYING (opens in a new tab) (LGPL-3.0-only) at commit c3c725a (opens in a new tab), on 28 Nov 2026.
- Commercial use
- Yes
Copyleft: Modified source must be published.
At a glance
- What it is
- Message-set specifications for different systems (dialects) are defined in XML files.
- Python tools convert these XML definitions into source code for supported languages.
- The reference C implementation is optimized for resource-constrained systems with limited RAM and flash memory.
- Suited to applications with very limited communication bandwidth.
- Includes Python scripts with examples and utilities for working with MAVLink data.
- Generated C headers can be installed and used from cmake via find_package.
Robotheca's summary of the project's documents, not the creator's words.
- Robots on Robotheca
- No robot on Robotheca uses it yet.
- Licence
- LGPL-3.0-only. Commercial use: Yes. Where it was read
- Install
- In the creator's words: The project's README (opens in a new tab)
- Maintenance
- Active, last commit on 27 Nov 2026.
Use it
How to install it, in the creator's words: The project's README (opens in a new tab)
Robotheca doesn't review code. Read it before running it.
Files and versions
- Repository on GitHubgithub.com/mavlink/mavlink (opens in a new tab)
- The version Robotheca readc3c725a (opens in a new tab)
- Latest releaseNone published on GitHub
Robotheca read the repository at two versions: the summary at 2e2b6af and the facts and the README at c3c725a (read on 28 Nov 2026).
Robotheca never hosts the code: each link goes to the creator's own page.
The README
The creator's own README, copied as written: README.md by @mavlink, at commit c3c725a, under LGPL-3.0-only (opens in a new tab). The original on GitHub (opens in a new tab).
Read the README here
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 (opens in a new tab). 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:
# 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:
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 (opens in a new tab) (C) or examples/cpp (opens in a new tab) (C++11).
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) (opens in a new tab).
Note: Installing the MAVLink Toolchain (opens in a new tab) explains how to install MAVLink on other Ubuntu platforms and Windows, while Generating MAVLink Libraries (opens in a new tab) explains how to build MAVLink for the other programming languages supported by the project (opens in a new tab). The sub-topics of Using MAVLink Libraries (opens in a new tab) explain how to use the generated libraries.
Key Links
Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.