Skip to main content

A python package that creates a simplified programming interface for controlling Mavlink-capable flight controllers

Project description

MAVCOM

Mavlink Communicator

Provides a simplified python interface for controlling Mavlink capable flight controllers.

Installation

pip install mavcom

Basic Usage

This is an example of how to use Mavcom with a simulated vehicle. To connect to a flight controller, you will most likely use UART0, therefore the connection path will instead be "/dev/ttyS0".

Run SITL:

sim_vehicle.py -v ArduCopter

from mavcom.mavcontrol import Mavcom
import time

vehicle = Mavcom(
    connection_path = "127.0.0.1:14550",
)

vehicle.start()

while not vehicle.ready:
    print("Waiting for vehicle to initialise...")
    time.sleep(1)

vehicle.motors_armed = True
while not vehicle.motors_armed:
    print("Waiting for motors to spin up...")
    time.sleep(1)
    
vehicle.flight_mode = "GUIDED"
vehicle.takeoff(alt=10)

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

mavcom-1.1.7.tar.gz (13.0 kB view hashes)

Uploaded Source

Built Distribution

mavcom-1.1.7-py3-none-any.whl (13.1 kB view hashes)

Uploaded Python 3

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