Skip to main content

go1pylib

go1pylib: Python Library for Go1 Robot Control

PyPI version License: MIT Python Versions

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 in robotics.


🌟 Features

  • Robot Control: Control Go1's movements including forward, backward, turns, and pose adjustments.
  • Collision Avoidance: Includes safe navigation with customizable obstacle detection thresholds.
  • Battery Monitoring: Real-time battery status with configurable LED indicators.
  • LED Control: Customizable LED color control based on robot state or custom feedback.
  • MQTT Communication: Reliable MQTT communication for Go1 state management and control.
  • Multiple Control Modes: Switch modes such as WALK and STAND for various scenarios.

🚀 Installation

Install the latest version of go1pylib with pip:

pip install go1pylib

💻 Usage

Here's an example to get started:

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

Find more examples in the examples directory for controlling the robot, collision avoidance, and LED control.

🗄️ Project Structure

go1pylib/
├── examples/
│   ├── move_forward.py
│   ├── dance.py
│   └── avoid_obstacles.py
├── src/
│   └── go1pylib/
│       ├── go1.py
│       ├── mqtt/
│       ├── state.py
│       └── ...
├── tests/
└── README.md

📚 Documentation

Full documentation can be found here.

🤝 Contributing

Contributions are welcome! Check out our contributing guidelines for more information.

⚠️ License

This project is licensed under the MIT License. See the LICENSE file for details.

💎 Acknowledgments

Special thanks to:

Thank you to all contributors who made this project possible!

Metadata

Release files for go1pylib 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for go1pylib 0.1.5
File Size Uploaded Provenance Actions
go1pylib-0.1.5.tar.gz 15.4 kB Without provenance Details for go1pylib-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for go1pylib 0.1.5
File Interpreter ABI Platform Actions
go1pylib-0.1.5-py3-none-any.whl Python 3 none any Details for go1pylib-0.1.5-py3-none-any.whl

Total release size: 31.1 kB

Release files / go1pylib-0.1.5.tar.gz

Download URL go1pylib-0.1.5.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5f882e8ecbc1dd0f564ea2266612ca5b0999b2786d91e9fb3e3367b3cba0bda2
BLAKE2b-256 checksum
How to use checksums
a1b3bf51802ef87e8b06641bf8faf2a9fd97553a428d29dca4ec982518ddc0e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.10

Release files / go1pylib-0.1.5-py3-none-any.whl

Download URL go1pylib-0.1.5-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c62d43c2057c76971ce637a36b4c0cc0e2d6a4b0d457b066a7a32fd3cfad615d
BLAKE2b-256 checksum
How to use checksums
95a727a38c076847cb309f84a2be58df05bc6b13f618359f8061e59097b76f17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.10

Security for go1pylib 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page