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.0.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.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pixhawk_lib-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 585458d08a789b7e63ae779e0a21d62042d6cfdfa73fcb0b18a54d472a2029e8
MD5 a7dedc3dbb98d3d49cea9047eb457e61
BLAKE2b-256 7edbd87ec40ef884f789447c9e1d92b9dc400668240d9937d24c3c17df4c4b6e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pixhawk_lib-0.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e78f9ea7c0f3946e2a44fb460d039df747621d9286b959c7bc9a5e5172ba214
MD5 28fc770f0bc281cc021f7ae1cdc8e8f1
BLAKE2b-256 ff621fb50d43950de9bbf16947cabfae876b73a73f6290c39846cf666e761214

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