MAVSDK C++ Library

Slack Discuss GitHub Actions Status Coverage Status

The MAVSDK C++ library 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 designed to be performant, and can be used to enable tasks like computer vision, obstacle avoidance, and route planning.

Project Status

The MAVSDK C++ library is a robust and well-tested library that is in use in production environments. Note however that the API is still being evolved and the project does not provide future compatibility guarantees.

Getting Started

Check out the QuickStart guide to get started.

A simple complete example can be found in Takeoff and Land.

Updating / API changes

Information about API changes between versions: API changes.

API Overview

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 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.

In addition, "Server Plugins" can be used to implement vehicle-side MAVLink functionality. The might be used to expose a MAVLink interface from non-MAVLink autopilots or components.

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.

Contributing/Extending

The Contributing section contains everything you need to contribute to project, including topics about building the SDK from source code, running our integration and unit tests, and all other aspects of core development.

Troubleshooting

If something doesn't work as expected, make sure to check Troubleshooting.

© MAVSDK Development Team 2017-2023. License: CC BY 4.0            Updated: 2023-12-27 03:10:20

results matching ""

    No results matching ""