DroneKit-Python
Overview
DroneKit-Python is a Python package that adds an abstraction layer on top of MAVLink messages, making it easier to access received telemetry and send commands.
DroneKit-Python: https://dronekit.netlify.app/
Setup
Dronekit-Python’s Python package name is dronekit
, installed through pip. However, this package is outdated and does not support Python 3.11, which Autonomy now uses. Thus, Autonomy has its own fork for dronekit
in Dronekit-python fork, located in the The common Repository as a submodule. Thus, it should be imported from the common repository using common.modules.mavlink.dronekit
.
Usage
Do not use DroneKit-Python frame conversions
The implementation of conversions in DroneKit-Python are not accurate enough. The library uses a spherical approximation model and does not correct for latitude. All conversions between global and relative frame are implemented by Autonomy or a different library.
Example
The pathing repository’s connection_check.py
file contains an example of connecting to a drone through Dronekit-Python. It can be used in conjunction with a simulated drone in Mission Planner: Mission Planner Simulated Ardupilot
Pathing repository: Pathing Repository