Skip to main content

A simple library for controlling Pixhawk drones easy.

Project description

PixHawk Library

A simple Python library for controlling Pixhawk drones easy. It provides an easy-to-use interface for basic flight commands, state retrieval, safety checks, and playing tunes on the Pixhawk buzzer.

⚠️ Danger

This is under develop project and not stable

Installation

pip install pixhawk-lib

Usage

from pixhawk_lib import PixHawk

# Initialize with default settings (non-blocking)
drone = PixHawk(connection_string='/dev/ttyACM0')

# Take off and rotate
drone.takeoff(5)  # Take off to 5 meters
drone.clockwise(90)  # Rotate 90 degrees clockwise
drone.land()  # Land the drone

# With waiting enabled
drone = PixHawk(wait_until_done=True)
drone.takeoff(5)  # Waits until 5 meters is reached
drone.play_tune('HAPPY_BIRTHDAY')  # Play a tune
drone.disconnect()

Features

  • Basic flight commands: takeoff, land, clockwise, counterclockwise
  • Movement: move_forward, move_left, etc. (in centimeters)
  • Continuous movement: forward, stop, etc.
  • State retrieval: drone.state.battery(), drone.state.gps(), etc.
  • Safety decorators: Battery and GPS checks
  • Tunes: Predefined tunes like HAPPY_BIRTHDAY, DANGER

Requirements

  • Python 3.9+
  • DroneKit
  • PyMAVLink
  • pyserial

License

  • MIT License

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

pixhawk_lib-0.2.2.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

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

pixhawk_lib-0.2.2-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file pixhawk_lib-0.2.2.tar.gz.

File metadata

  • Download URL: pixhawk_lib-0.2.2.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for pixhawk_lib-0.2.2.tar.gz
Algorithm Hash digest
SHA256 8b5763ece0c0400d8d65d28509e91a88a17fc0a8c7941f42d890c47a53486c16
MD5 53dfa6d4212df8a3afaa528108bbb818
BLAKE2b-256 aab4974fd749871d24d9fe286d15625b44393008b89140f4f5d4760f01a140ae

See more details on using hashes here.

File details

Details for the file pixhawk_lib-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: pixhawk_lib-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for pixhawk_lib-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e4f4a4c43687a16e8b029290bdf71a605c471278320201b33ad175314665d84a
MD5 0144c29e679c072529e6547f0b606a74
BLAKE2b-256 6db896ef7372c5a9b2aa1fa187765359e746d38ef73ea60e9da411b70f95ae30

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