Skip to main content

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

  1. In a terminal window, run git clone git@github.com:UnmannedAerialSystems/MAVez.git
  2. Switch into the newly cloned directory by running cd MAVez
  3. 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

  1. Install prerequisites:
brew install python3 gcc
pip install future pymavlink MAVProxy opencv-python
  1. Clone ArduPilot repository
git clone https://github.com/ArduPilot/ardupilot.git
cd ardupilot
git submodule update --init --recursive
  1. Install environment
cd Tools/environment_install
./install-prereqs-mac.sh  # decline all prompts
  1. Compile the binaries

Return to ./ardupilot

./waf configure --board sitl
./waf copter
./waf plane
  1. Run SITL
./Tools/autotest/sim_vehicle.py -v ArduCopter --console --map

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

mavez-3.8.2.tar.gz (36.4 kB view details)

Uploaded Source

Built Distribution

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

mavez-3.8.2-py3-none-any.whl (38.9 kB view details)

Uploaded Python 3

File details

Details for the file mavez-3.8.2.tar.gz.

File metadata

  • Download URL: mavez-3.8.2.tar.gz
  • Upload date:
  • Size: 36.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for mavez-3.8.2.tar.gz
Algorithm Hash digest
SHA256 e3cb34a4a3671c9c7cb3e8422baa7320fd6294abde099fb9733065c4575a80a6
MD5 04659a939c95436b5f310a7042c98bbb
BLAKE2b-256 dbc0c9d26830667f7725fb63c1802b8e90b1596f26d7b1f68532436c0be61bf4

See more details on using hashes here.

File details

Details for the file mavez-3.8.2-py3-none-any.whl.

File metadata

  • Download URL: mavez-3.8.2-py3-none-any.whl
  • Upload date:
  • Size: 38.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for mavez-3.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2e140d5ce77d9e66f0e41c33519faf96df87b79b73ef8cbe23efcd5c28154b5e
MD5 b2bf0b0ca76b3b3252ef89411bbc4f5b
BLAKE2b-256 03fba61140d666ee2b8c6455dbd114b55fd630d074bcd6e8a0a5554522fb8afa

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