About DroneKit:
DroneKit-Pythonallows developers to create apps that run on an onboard companion computer and communicate with the ArduPilot flightcontroller using a low-latency link.
The API communicates with vehicles over MAVLink. It provides programmatic access to a connectedvehicle’s telemetry, state and parameter information, and enables both missionmanagement and direct control over vehicle movement and operations.
Open source community:
DroneKit-Python is an open source and community-driven project.
You can find all thesource code on Githubhere and check out our permissive Apache v2 Licence.
API features:
The API providesclasses and methods to:
- Connect to a vehicle (or multiple vehicles) from a script
- Get and set vehicle state/telemetry and parameter information.
- Receive asynchronous notification of state changes.
- Guide a UAV to specified position (GUIDED mode).
- Send arbitrary custom messages to control UAV movement and other hardware (GUIDED mode).
- Create and manage waypoint missions (AUTO mode).
- Override RC channel settings.
A complete APIreference is available here.
Installing DroneKit:
It is installedfrom pip on all platforms:
- sudo pip install dronekit
Companion Computers:
A companion computeris a device that travels on-board the vehicle and controls/communicates withthe autopilot over a low-latency link. Apps running on a companion computer canperform computationally intensive or time-sensitive tasks, and add much greater intelligence than is provided by the autopilot alone.
DroneKit can be used with onboard computers running variants of Linux that support both Python and the installation of Python packages from the Internet. The following computing platforms are known to work with DroneKit, and are supported by the ArduPilot developer community.
- RaspberryPi
- Intel Edison
- BeagleBoneBlack
- Odroid
Communicating with Raspberry Pi via MAVLink:
This page explains how to connect and configure a Raspberry Pi (RPi) so that it is able to communicate with a Pixhawk flight controller using the MAVLink protocol over a serial connection. This can be used to perform additional tasks such as image recognition which simply cannot be done by the Pixhawk due to the memory requirements for storing images.
Tips: Powering via USB is recommended as it is typically safer - because the input is regulated. If powering via USB, do not also connect the +5V pin as shown (still connect common ground).
Connecting to RPi with an SSH/Telnet client:
http://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html#connecting-to-rpi-with-an-ssh-telnet-client
Disable the OS control of the serial port:
http://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html#disable-the-os-control-of-the-serial-port
Testing the connection:
http://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html#testing-the-connection
Configure MAVProxy to always run:
http://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html#configure-mavproxy-to-always-run
To learn more about using MAVProxy please read the MAVProxy documentation.
It is also worth noting that MAVProxy can do a lot more than just provide access to your Pixhawk. By writing python extension modules for MAVProxy you can add sophisticated autonomous behaviour to your vehicle. A MAVProxy module has access to all of the sensor information that your Pixhawk has, and can control all aspects of the flight. To get started with MAVProxy modules please have a look at the existing modules in the MAVProxy source code.
MAVProxy:
A UAV ground station software package for MAVLink based systems.
MAVProxy is a fully-functioning GCS for UAV’s. The intent is for a minimalist, portable and extendable GCS for any UAV supporting the MAVLink protocol (such as the APM).
A list of commits to MAVProxy (closest thing to a change log that is available) can be seen here:
https://github.com/Dronecode/MAVProxy/commits/master