Skip to main content

Python Library for Go1 Robot Control

Project description

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.


:star2: 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.

:rocket: Installation

Install the latest version of go1pylib with pip:

pip install go1pylib

:computer: 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())

:file_folder: Examples

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

:file_cabinet: Project Structure

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

:books: Documentation

Full documentation can be found here.

:handshake: Contributing

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

:warning: License

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

:gem: Acknowledgments

Special thanks to:

Thank you to all contributors who made this project possible!

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

go1pylib-0.1.5.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

go1pylib-0.1.5-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file go1pylib-0.1.5.tar.gz.

File metadata

  • Download URL: go1pylib-0.1.5.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.10

File hashes

Hashes for go1pylib-0.1.5.tar.gz
Algorithm Hash digest
SHA256 5f882e8ecbc1dd0f564ea2266612ca5b0999b2786d91e9fb3e3367b3cba0bda2
MD5 67f920bf1d6d5b3873f33a0833bf5b56
BLAKE2b-256 a1b3bf51802ef87e8b06641bf8faf2a9fd97553a428d29dca4ec982518ddc0e3

See more details on using hashes here.

File details

Details for the file go1pylib-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: go1pylib-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.10

File hashes

Hashes for go1pylib-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c62d43c2057c76971ce637a36b4c0cc0e2d6a4b0d457b066a7a32fd3cfad615d
MD5 d7eabada9d84b74ac943cc543025e52e
BLAKE2b-256 95a727a38c076847cb309f84a2be58df05bc6b13f618359f8061e59097b76f17

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page