An intuitive MAVLink library for ArduPilot via pymavlink
Project description
PSU UAS MAVez
The Pennsylvania State University
Description
Library for controlling ArduPilot from an external computer via pymavlink.
For detailed documentation on pymavlink, visit mavlink.io. "Standard Messages/Commands" > "common.xml" is a particularly useful resource.
Table of Contents
Installation
- In a terminal window, run
git clone git@github.com:UnmannedAerialSystems/MAVez.git - Switch into the newly cloned directory by running
cd MAVez - Install the package locally in editable mode
pip install -e .
While not required, it is highly recommended that you utilize ArduPilot's Software in the Loop (SITL) simulator to make testing significantly easier. Install instructions are provided for Windows and MacOS in the appendix. For Linux or WSL instructions, refer to the ArduPilot setup page
Example Usage
Below is a simple script designed to work with SITL. This example is provided at /examples/basic.py/
from MAVez import flight_controller
from MAVez.safe_logger import configure_logging
import asyncio
logger = configure_logging()
async def main():
controller = flight_controller.FlightController(connection_string='tcp:127.0.0.1:5762', baud=57600, logger=logger)
await controller.set_geofence("./examples/sample_missions/sample_fence.txt")
await controller.arm()
await controller.takeoff("./examples/sample_missions/sample1.txt")
controller.append_mission("./examples/sample_missions/sample2.txt")
controller.append_mission("./examples/sample_missions/sample3.txt")
await controller.auto_send_next_mission()
await controller.auto_send_next_mission()
await controller.wait_for_landing()
await controller.disarm()
if __name__ == "__main__":
asyncio.run(main())
License:
This project is licensed under the GNU General Public License v3.0.
Authors:
Ted Tasman Declan Emery Vlad Roiban
Appendix:
SITL Installation
Windows
SITL comes precompiled for Windows as part of Mission Planner. Installing Mission Planner is the most painless method for using SITL on Windows.
MacOS
- Install prerequisites:
brew install python3 gcc
pip install future pymavlink MAVProxy opencv-python
- Clone ArduPilot repository
git clone https://github.com/ArduPilot/ardupilot.git
cd ardupilot
git submodule update --init --recursive
- Install environment
cd Tools/environment_install
./install-prereqs-mac.sh # decline all prompts
- Compile the binaries
Return to ./ardupilot
./waf configure --board sitl
./waf copter
./waf plane
- Run SITL
./Tools/autotest/sim_vehicle.py -v ArduCopter --console --map
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mavez-3.5.1.tar.gz.
File metadata
- Download URL: mavez-3.5.1.tar.gz
- Upload date:
- Size: 33.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16132ceeab482d15da0bcf95bb7a7e42042b09cf74367ac01e3bde873961e943
|
|
| MD5 |
cec5ac6171d6bb5b506fafdc266cc3cf
|
|
| BLAKE2b-256 |
06e2a79c91127015b7075867fc0af4b434f97860b9ebce77115eefe594896237
|
File details
Details for the file mavez-3.5.1-py3-none-any.whl.
File metadata
- Download URL: mavez-3.5.1-py3-none-any.whl
- Upload date:
- Size: 34.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d64be165f54a8e4387399fb40cf50e27602ccc069602ef5f8f8121e575755491
|
|
| MD5 |
01cfe962a589b99880fe7a8903ca0e7b
|
|
| BLAKE2b-256 |
5930cf53ade2d39fe041c1e9592f0cd99ec43eb7aaf4c3d788154cb1267a2daf
|