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. It allows you to:

  • 1. Upload firmware to PX4/ArduPilot targets
  • 2. Easily write set of parameters,
  • 3. Run flight mission and wait for result,
  • 4. Download flight logs,
  • 5. Upload flight logs to review.px4.io,
  • 6. Parse flight logs,
  • 7. Provide a flight log stats and overall stats of multiple log files.

1. INSTALLATION

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

pip install autopilot_tools

Alternatively, you can install the package from sources 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. USE CASES

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

2.1. Autopilot configurator

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

2.2. Test scenario

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.

2.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. DESIGN

The package is primarily based on ArduPilot/pymavlink.

3. Developer guide

A developer should follow the CONTRIBUTING.md guide.

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

4. LICENSE

The package inherits ArduPilot/pymavlink license and 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.7.tar.gz (53.1 kB view details)

Uploaded Source

Built Distribution

autopilot_tools-0.4.7-py3-none-any.whl (62.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: autopilot_tools-0.4.7.tar.gz
  • Upload date:
  • Size: 53.1 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.7.tar.gz
Algorithm Hash digest
SHA256 eeafeb9c555e9276b54c6fe338b8fab6dc2f06bb4070f2cfe09c0ddb3dd2587b
MD5 bb50845cfa194129bad8e6543e760539
BLAKE2b-256 3ade8ba3a3a5d7f77ccd4b6caf3405f0e4fc9e697d0cb7d744eb2565e9b4d750

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autopilot_tools-0.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 d5b91bfe4736c500645bc9113d688aa4de1cbd724caa4ff47ec4ec27d6a28a4c
MD5 593b9a68b38d7bf0db4ad093cfc7bc63
BLAKE2b-256 d6b3197586c6493a6fff5617e2ae84a43b63f3d56cd4fd29803359b66732f9f6

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