PX4/ArduPilot MAVLink usefull 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:
- Upload a specific firmware to the autopilot via a link or given binaries
- Reset the autopilot to default and configure the required parameters
- Upload and run a mission
- Download the last flight log
- Analyze the flight log
- 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.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:
- 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.
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file autopilot_tools-0.1.0.tar.gz
.
File metadata
- Download URL: autopilot_tools-0.1.0.tar.gz
- Upload date:
- Size: 27.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fec9c9f8b676fa8d804abd37a96d1f514897703d86a1f992cc7de45b95bafa6 |
|
MD5 | dd9de8914c45bc20e31e4e1c249cdd03 |
|
BLAKE2b-256 | 046c2816ac8147f21722228a07a0c1f9ae96d7e71707ae376f6489d12af31c68 |
File details
Details for the file autopilot_tools-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: autopilot_tools-0.1.0-py3-none-any.whl
- Upload date:
- Size: 30.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a35a8ee970bb3b0d75da8a557a4b00743921e0ddfd0d88813b721a9704d5baba |
|
MD5 | bd9a7c35d179ba8cd11c2b15123a2c06 |
|
BLAKE2b-256 | acf0b8a21a1df1186a61acd41fa84ecf34028dcb73273cd9cc8220ff6c2afe17 |