dronecore
Dronecode SDK

Updated 6 days ago

Dronecode SDK

 

The Dronecode SDK is a MAVLink Library for the PX4 flight stack, with APIs for C++, Python, Android, and iOS (coming soon).

The SDK is the best way to integrate with PX4 over MAVLink! It is supported by Dronecode, ensuring that it is robust, well tested, and maintained.

The library provides a simple core C++ API for managing one or more vehicles, providing programmatic access to vehicle information and telemetry, and control over missions, movement and other operations.

Developers can extend the SDK using plugins in order to add any other required MAVLink API (for example, to integrate PX4 with custom cameras, gimbals, or other hardware over MAVLink).

The library can run on a vehicle-based companion computer or on a ground-based GCS or mobile device. These devices have significantly more processing power that an ordinary flight controller, enabling tasks like computer vision, obstacle avoidance, and route planning.

Project Status

The SDK is still in alpha development.

  • The core C++ API has been created and is (largely) stable.
  • Currently you can only develop in C++. Cross-platform wrappers are being developed using gRPC and Reactive Extensions.

To use the SDK you will need to build the C++ library. The Guide explains how to write SDK apps using C++. A number complete examples can be found here.

Library Features

The core library is written in C++, with auto-generated bindings for other supported programming languages.

The library is:

  • Straightforward and easy to use. It has an API that supports both synchronous (blocking) and asynchronous calls (using callbacks).
  • Fast, robust, and lightweight. Built to handle onboard usage with high rate messaging.
  • Cross-platform (Linux, macOS, Windows, iOS, Android).
  • Extensible, using compile-time plugins.

The main features provided by the core API are (in all programing languages):

  • Connect to and manage up to 255 vehicles via a TCP, UDP or serial connection.
  • Get information about vehicles (vendor, software versions, product versions etc.)
  • Get vehicle telemetry and state information (e.g. battery, GPS, RC connection, flight mode etc.) and set telemetry update rates.
  • Send commands to arm, disarm, kill, takeoff, land and return to launch.
  • Create and manage missions.
  • Control a camera and gimbal both inside and outside of missions.
  • Send commands to directly control vehicle movement.
  • Send commands to start sensor calibration.

See the FAQ for answers to common questions about the library.

API Overview

DronecodeSDK is the main library class. API consumers use DronecodeSDK 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:

  • DronecodeSDK: 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.
  • 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).
  • Logging: Data logging and streaming from the vehicle.

Getting Started

The Quick Start explains how to set up a development environment and write a minimal example for all our supported programming languages/platforms.

Developers who want to contribute to the API will need to build the C++ library (and other programming language wrappers) from source. For more information see the contributing section below.

Getting Help

This guide contains information and examples showing how to use the SDK. If you have specific questions that are not answered by the documentation, these can be raised on:

Use Github for bug reports/enhancement requests:

Contributing

We welcome contributions! If you want to help or have suggestions/bug reports please get in touch with the development team.

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

License

  • The Dronecode SDK is licensed under the permissive BSD 3-clause.
  • This documentation is licensed under CC BY 4.0 license.
© Dronecode 2017. License: CC BY 4.0            Updated: 2018-07-12 03:09:32