MAVSDK is a set of libraries providing a high-level API to MAVLink. It aims to be:
- Easy to use with a simple API supporting both synchronous (blocking) API calls and asynchronous API calls using callbacks.
- Fast and lightweight.
- Cross-platform (Linux, macOS, Windows, iOS, Android).
- Extensible (using the
MavlinkDirectplugin, or the deprecatedMavlinkPassthroughplugin). - Fully compliant with the MAVLink standard/definitions.
The API for all languages is defined by the proto IDL (proto files), and the bindings are generated from it. This way each language gets an idiomatic API, using the tooling and syntax its users expect. For example, the Python library can be installed from PyPI using pip.
There are two ways a language binds to MAVSDK:
- Directly, by calling the C++ library through its C wrapper. This is what the C, Python and Kotlin bindings in this repository do, which means no extra process and no gRPC dependency.
- Over gRPC, by talking to
mavsdk_server, a process which exposes the API on a local port. The clients that live in their own repositories work this way.
The C++ part consists of:
- The core library implementing the basic MAVLink communication.
- The plugin libraries implementing the MAVLink communication specific to a feature.
- The mavsdk_server implementing the gRPC server for the language clients.
These are built from the C++ library and released together with it:
- C - C wrapper (
libcmavsdk), which the Python and Kotlin bindings build on. - Python -
mavsdkon PyPI, with a synchronous API inmavsdkand an asyncio API inmavsdk.asyncio. Since v4 this replaces the gRPC-based MAVSDK-Python, see the migration guide. - Kotlin - Kotlin Multiplatform bindings for Android and desktop JVM, using JNI.
- MAVSDK - this repo containing the source code for the C++ core, as well as the C, Python and Kotlin bindings.
- MAVSDK-Proto - Common interface definitions for API specified as proto files used by gRPC between language clients and mavsdk_server.
- MAVSDK-Python - gRPC-based MAVSDK client for Python (first released on PyPI 2019), published as
mavsdk-grpcsince v4. For the binding in this repo, see above. - MAVSDK-Swift - MAVSDK client for Swift (used in production, first released 2018).
- MAVSDK-Java - MAVSDK client for Java (first released on MavenCentral in 2019).
- MAVSDK-Go - MAVSDK client for Go (work in progress).
- MAVSDK-JavaScript - MAVSDK client in JavaScript (proof of concept, 2019).
- MAVSDK-Rust - MAVSDK client for Rust (proof of concept, 2019).
- MAVSDK-CSharp - MAVSDK client for CSharp (proof of concept, 2019).
- Docs - MAVSDK docs source.
Instructions for how to use the C++ library can be found in the MAVSDK docs (links to other programming languages can be found from the documentation sidebar).
Quick Links:
- Getting started
- C++ API Overview
- API Reference
- Installing the Library
- Building the Library
- Examples
- FAQ
This project is licensed under the permissive BSD 3-clause, see LICENSE.md.
This project is maintained by volunteers:
Maintenance is not sponsored by any company, however, hosting of the docs and the forum is provided by the Dronecode Foundation.
If you just have a question, consider asking in the forum.
If you have run into an issue, discovered a bug, or want to request a feature, create an issue. If it is important or urgent to you, consider sponsoring any of the maintainers to move the issue up on their todo list.
If you need private support, consider paid consulting:
(Create a pull request if you wish to be listed here.)
