Skip to main content

PX4/ArduPilot autopilot tools

Project description

PX4/ArduPilot Autopilot tools

This repository is a collection of scripts created to facilitate automated work with the PX4/ArduPilot, such as:

  1. Upload a specific firmware to the autopilot via a link or given binaries
  2. Reset the autopilot to default and configure the required parameters
  3. Upload and run a mission
  4. Download the last flight log
  5. Analyze the flight log
  6. Analyze an overall flight statistic based on multiple flight logs (total number of vehicle flight hours, flight distance, etc)

The package is designed to be used as part of the HITL CI process.

1. User guide

1.1. Installation

The package is distrubuted via pypi.org/project/autopilot-tools/.

pip install autopilot_tools

1.2. Usage

The script below could be used as part of a CI process and it illustrates the main functionality of the package:

from autopilot_tools.vehicle import Vehicle
from autopilot_tools.analyzer import Analyzer

vehicle = Vehicle()
vehicle.connect(device="serial")
vehicle.upload_firmware(firmware_path_or_url)
vehicle.configure(params_path)
vehicle.load_mission(mission_path)

res = vehicle.run_mission(mission_path)
print(res)

log_file = vehicle.load_latest_log(mission_path)

analzyer = Analyzer()
res = analzyer.analyse_log(log_file, analyze_requests=("airspeed", "ice", "esc_status"))
print(res)

2. Developer guide

2.1. Installation from sources

git clone https://github.com/PonomarevDA/autopilot_tools.git --recursive
git submodule update --init --recursive
pip install -r requirements.txt

2.2. Deployment

Please, deploy initially on test.pypi.org. Only if everything is fine, then deploy on pypi.org.

Try the script below to get details:

./deploy.sh --help

2.3. Design

The package consists of 2 modules:

  1. configurator module has the main class Vehicle. It is based on pymavlink and allows you to configure the autopilot, set required parameters, download logs and so on via MAVLink protocol.
  2. log_analyzer module has the main class Analyzer. It allows you to analyze a single log and a bunch of them.

3. License

The package is distributed under MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autopilot_tools-0.3.0.tar.gz (34.9 kB view details)

Uploaded Source

Built Distribution

autopilot_tools-0.3.0-py3-none-any.whl (39.3 kB view details)

Uploaded Python 3

File details

Details for the file autopilot_tools-0.3.0.tar.gz.

File metadata

  • Download URL: autopilot_tools-0.3.0.tar.gz
  • Upload date:
  • Size: 34.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for autopilot_tools-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ee03d376f0376bbdd0663f8919f73ca3107de4bb0a6b9d19a24fdd711a33f5a2
MD5 5c73c45a5cc5fa9cd95188bf54ac0db5
BLAKE2b-256 ffbb23d61902f9aabc63b1565f2498476d6b656b93ec42b96b11f8790bd7deff

See more details on using hashes here.

File details

Details for the file autopilot_tools-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for autopilot_tools-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e44d72cca40a7ccdd41efd57a0df7083d6879688bab8d7d88c327f797e3cd419
MD5 e52a5708b90af2ba750160641961773c
BLAKE2b-256 4147fd615587623506c95a56b154b8779b20d8c91a104e1aff5081807f02d948

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page