The MAVSDK Core provides a simple C++ API for managing one or more vehicles via MAVLink. It enables programmatic access to vehicle information and telemetry, and control over missions, movement and other operations. The C++ library is very performant, and can be used to enable tasks like computer vision, obstacle avoidance, and route planning.
Developers can extend the SDK, using plugins to add any other required MAVLink API (for example, to integrate a flight stack with custom cameras, gimbals, or other hardware over MAVLink).
The core library is used to provide the underlying implementation of the other MAVSDK libraries - e.g. MAVSDK-Swift.
The MAVSDK C++ core is a robust and well-tested library that is already in use in production environments. Note however that the API is still being evolved and the project does not provide future compatibility guarantees.
Ubuntu and Fedora users can install the SDK from *.deb or *.rpm packages in the Github release page.
Windows and macOS users will need to build the library from source in order to use it.
Mavsdk is the main library class. API consumers use Mavsdk to discover and access vehicles (System objects), which in turn provide access to all other drone information and control objects (e.g. Telemetry, Mission etc.).
The most important classes are:
- Mavsdk: Discover and connect to vehicles (System).
- System: Represents a connected vehicle (e.g. a copter or VTOL drone). It provides access to vehicle information and control through the classes listed below.
- Info: Basic version information about the hardware and/or software of a system.
- Telemetry: Get vehicle telemetry and state information (Battery, EulerAngle, GPSInfo, GroundSpeedNED, Health, Position, Quaternion, RCStatus) and set telemetry update rates.
- Action: Simple drone actions including arming, taking off, and landing.
- Mission: Waypoint mission creation and upload/download. Missions are created from MissionItem objects.
- Offboard: Control a drone with velocity commands.
- Geofence: Specify a geofence.
- Gimbal: Control a gimbal.
- Camera: Control a camera.
- FollowMe: Drone tracks a position supplied by the SDK.
- Calibration: Calibrate sensors (e.g.: gyro, accelerometer, and magnetometer).
- LogFiles: Download log files from the vehicle.
The following APIs provide more direct access to underlying MAVLink messages/types. They should only be used where features are missing from the main APIs above.
- Param: Raw access to get and set parameters.
- MissionRaw: Direct access to MAVLink mission items.
- MavlinkPassthrough: Provides full/direct MAVLink access
The Contributing section contains everything you need to contribute to the C++ API, including topics about building the SDK from source code, running our integration and unit tests, and all other aspects of core development.
Developers who want to create plugins and contribute to the API will need to build the library (and other programming language wrappers) from source.