Skip to main content

PX4/ArduPilot autopilot tools

Project description

PX4/ArduPilot Autopilot tools

autopilot_tools is a python package intended to be used as part of automated work with PX4 and Ardupilot autopilots such as hardware configuration, test scenarious providing and log analysis.

After the installation the package is accessible as a few executables:

  1. autopilot-configurator uploads the given firmware to the autopilot, reset paramters to default, upload the required parameters and perform force sensor calibration.

  2. test-scenario uploads the given mission to the autopilot, run it and wait until it is finished, then download the log from the vehicle and upload it to review.px4.io. It returns a user the result of the flight and link to the flight report.

Beside it the package allows to perform every step from a python script in a more customized way and to perform specific flight log analysis and to analyze an overall flight statistic based on multiple flight logs (total number of vehicle flight hours, flight distance, etc).

1. User guide

1.1. Installation

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

pip install autopilot_tools

1.2. Using as executables

After the installation, a few executables will appear:

  • autopilot-configurator
  • test-scenario

For usage details run them with --help option or refer to the corresponded README.md: src/autopilot_tools/utilities.

1.3. Using as a module

The package can be imported as a module. This allows you to implement more customized behaviour and use extended features if you need.

An example is shown below:

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

For a developer it is expected to use the package in Development Mode (a.k.a. “Editable Installs”)

Clone the repository, install the package in development mode and use it in virtual environment:

git clone https://github.com/PonomarevDA/autopilot_tools.git
python3 -m venv venv
./venv/bin/activate
pip install -e .

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

3. License

The package is distributed under GPLv3 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.4.4.tar.gz (51.7 kB view details)

Uploaded Source

Built Distribution

autopilot_tools-0.4.4-py3-none-any.whl (59.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for autopilot_tools-0.4.4.tar.gz
Algorithm Hash digest
SHA256 77e3193dc6c0281660b2e59af8e8f5cb2dbdc66de05d2878119f0b545f534429
MD5 9c99be94ad3ff9d50b7998673406b90c
BLAKE2b-256 c7599d3ab482675c2290c57eb92e3cb72fab679e51c114c77bae79527e6608c0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autopilot_tools-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7695bc196f36cebb97a6878828fed2d89b165f8026d0da93ea76b1a806f391c4
MD5 223232d6746a7162b4b0e6655f031f65
BLAKE2b-256 afd9d48fb528d74dc649562db5c5098391604993ca5ec80af4246f4c6a1e32d6

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