Skip to content

Repository files navigation

aerpawlib

Python Version License Version Unit Tests Ruff Documentation AERPAW

A Python library for controlling vehicles within the AERPAW platform. Provides a unified interface for vehicle control, telemetry, and mission execution with ArduPilot.

Features

  • Unified vehicle control
  • Scriptable missions
  • Multi-vehicle coordination
  • Safety checker
  • AERPAW Platform integration

Installation

pip install .

On AERPAW C-VMs the library is already available. For a local simulator, install SITL extras and build ArduPilot:

pip install -e ".[sitl]"
aerpawlib-setup-sitl

Quick Start

# my_mission.py
from aerpawlib.v2 import Drone, VectorNED, BasicRunner, entrypoint

class MyMission(BasicRunner):
    @entrypoint
    async def run(self, drone: Drone):
        await drone.takeoff(altitude=25)
        await drone.goto_coordinates(drone.position + VectorNED(20, 0))
        await drone.land()
aerpawlib --api-version v2 --script my_mission.py --conn udpin://127.0.0.1:14550 --vehicle drone --no-aerpaw-environment

--no-aerpaw-environment is required outside the AERPAW testbed. Copter takeoff on the testbed must be at least 20 m (examples use 25 m).

Documentation

API reference for writing experiment scripts: https://aerpaw.github.io/aerpawlib

Examples

# Basic square flight
aerpawlib --script examples/v1/basic_example.py --conn udpin://127.0.0.1:14550 --vehicle drone --no-aerpaw-environment

# A more complex example using --config to specify multiple arguments at once
aerpawlib --config configs/v1-drone.json --config configs/sitl-drone.json --script examples.v1.basic_runner

See examples/README.md for the full list, including multi-vehicle ZMQ missions (aerpawlib-run-proxy plus --zmq-identifier / --zmq-proxy-server).

Running tests

pip install -e ".[dev]"
pytest tests/unit/ -v

Integration tests need SITL:

pip install -e ".[dev,sitl]"
aerpawlib-setup-sitl
pytest tests/integration/ -v

See tests/README.md for details.

License

MIT License: see LICENSE.

About

aerpawlib is AERPAW's vehicle control library

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages