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.1.0.tar.gz (8.2 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.1.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pixhawk_lib-0.1.0.tar.gz
  • Upload date:
  • Size: 8.2 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.1.0.tar.gz
Algorithm Hash digest
SHA256 218351006854aa7305139b927e7b5c3daf5bdf5e9f09b5cb951757687ba0605e
MD5 12d8e1916444d28fba7dc0502c0200a6
BLAKE2b-256 33b759325f806af80e57d5453233db3746dabdb1af0dfe1031801af5518f366a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pixhawk_lib-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b1128afc01425563ed385701412cd0f9c9960c02d3e06ca6374c0ded09b2c5e3
MD5 a29bbba5845551cc76b5e977e0bf2329
BLAKE2b-256 613563c1dfca0ef58230952f10a153cb8cb5fda18ed2a87d4ebc4a973b30b103

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