Python Library for Go1 Robot Control
Project description
go1pylib: Python Library for Go1 Robot Control
go1pylib is a Python library designed for controlling the Go1 robot, providing high-level methods for robot movement, state management, and collision avoidance. With built-in functionality for MQTT communication and control modes, go1pylib is ideal for both development and research use in robotics applications.
Features
- Robot Control: Seamlessly control Go1's movements, including forward, backward, turns, and various pose adjustments.
- Collision Avoidance: Built-in methods for safe navigation with customizable thresholds for obstacle detection.
- Battery Monitoring: Real-time battery status feedback with configurable LED indicators based on battery levels.
- LED Control: Control LED colors for custom feedback based on robot state or user-defined actions.
- MQTT Communication: Reliable MQTT communication interface for Go1 state management and control.
- Multiple Control Modes: Switch between modes such as WALK and STAND for different application scenarios.
Installation
Install the latest version of go1pylib using pip:
pip install go1pylib
Usage
Here's a quick example demonstrating basic usage:
import asyncio
from go1pylib import Go1, Go1Mode
async def main():
robot = Go1()
robot.init() # Connect to the robot
# Set to WALK mode and move forward
robot.set_mode(Go1Mode.WALK)
await robot.go_forward(speed=0.3, duration_ms=1000)
# Check battery status
battery_level = robot.get_battery_level()
print(f"Battery Level: {battery_level}%")
# Stop and disconnect
robot.set_mode(Go1Mode.STAND_DOWN)
robot.disconnect()
asyncio.run(main())
Examples
Examples for controlling the robot, collision avoidance, and LED control can be found in the examples
directory.
Project Structure
go1pylib/
├── examples/
│ ├── move_forward.py
│ ├── dance.py
│ └── avoid_obstacles.py
├── src/
│ └── go1pylib/
│ ├── go1.py
│ ├── mqtt/
│ ├── state.py
│ └── ...
├── tests/
└── README.md
Documentation
Complete documentation can be found here.
Contributing
Contributions are welcome! Please see our contributing guidelines for more information.
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
Built Distribution
File details
Details for the file go1pylib-0.1.1.tar.gz
.
File metadata
- Download URL: go1pylib-0.1.1.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3455159b8655696c800267a4d2525c8d63bb957aa28f181aafbc1c7ccfb94cd2 |
|
MD5 | 8bd54dc9317226de733d0a9f3f2c0fb8 |
|
BLAKE2b-256 | 8995aa9f2b858bd0cb4214952f36667594385d23f5fa6b6a07ed8d6bd816886d |
File details
Details for the file go1pylib-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: go1pylib-0.1.1-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff4b17cf651484cdcae800942e559aa21c1dc0796934fa7bad0cd0d59cfb7e71 |
|
MD5 | e9db008dcd24946441706b01d95478bc |
|
BLAKE2b-256 | 6b42836faa594d78aa7c3462847cd572d157b21e39eedb63144b40aa13cc568c |