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.4.tar.gz
(10.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pixhawk_lib-0.2.4.tar.gz.
File metadata
- Download URL: pixhawk_lib-0.2.4.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d71d33bb7bb102bfda9af1a81316767738e9db4b212b2fe71e92fca7821197ac
|
|
| MD5 |
b39a10b1e44f3e5efb0ffa95d422baf3
|
|
| BLAKE2b-256 |
d808b71826e93ae5beb8a535c6368377bc4520e1669f8961748dbedd299adcb0
|
File details
Details for the file pixhawk_lib-0.2.4-py3-none-any.whl.
File metadata
- Download URL: pixhawk_lib-0.2.4-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0b7d75514a4e67363b94c06387effda92041213073391e22e453434bb1797b6
|
|
| MD5 |
6c360803f306bb164720cc1f272f0da9
|
|
| BLAKE2b-256 |
5b3c815ae55ccf5ea917d7bd1888e1c0024d5b5a411dc824ce11e3819484954c
|