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.

As an example, the package allows to create the following testing pipeline:

  1. Upload the firmware given as a link or file to the autopilot
  2. Reset the autopilot to default and configure the given parameters
  3. Perform force calibration
  4. Reboot the autopilot
  5. Upload a given mission to the autopilot
  6. Run the mission and wait until in is finished
  7. Download the last flight log
  8. Analyze the flight log
  9. 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. 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 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.4.1.tar.gz (40.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autopilot_tools-0.4.1-py3-none-any.whl (46.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: autopilot_tools-0.4.1.tar.gz
  • Upload date:
  • Size: 40.2 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.1.tar.gz
Algorithm Hash digest
SHA256 9999d072761c147084cc86fff1612c568141c82d1b4d9d4330056c97c7331ba0
MD5 008d7cb0df8492b322c76d9d5bfbe297
BLAKE2b-256 82c12c48339068615eeddbadbde9ae95a1cb58a44528244f3c1fc0ece4227977

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autopilot_tools-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f603255dfaf5dbf53bc9d9ae6727c1ff29842ad6460aad73aee0d68b324cc92c
MD5 04220d6a28f302822de3397d65e51be2
BLAKE2b-256 9e8c9dd918e63febedecfc7cf1b075947303f5a5f4e761f2ba05659e0e272a11

See more details on using hashes here.

Supported by

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