Skip to content

Latest commit

Β 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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.
  • 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, 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())

It is recommended to try out the programs under examples/

πŸ“ Examples

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

πŸ“ Examples Progress

File Name Status
avoid_obstacles.py ❌
dance.py βœ…
get_state.py ❌
led_control.py βœ…
move_forward.py βœ…
move_joints.py βœ…
square.py βœ…

πŸ’‘ Note

  • Files marked with ❌ are currently not operational and need debugging or additional implementation to function correctly.
  • All βœ… examples are fully functional and ready to use.

πŸ—„οΈ Project Structure

go1pylib/
β”œβ”€β”€ examples/
β”‚   β”œβ”€β”€ move_forward.py
β”‚   β”œβ”€β”€ dance.py
β”‚   └── avoid_obstacles.py
β”œβ”€β”€ src/
β”‚   └── go1pylib/
β”‚       β”œβ”€β”€ go1.py
β”‚       β”œβ”€β”€ mqtt/
β”‚       β”œβ”€β”€ state.py
β”‚       └── ...
β”œβ”€β”€ tests/
└── README.md

πŸ“š Documentation

Basic documentation can be found here. (Will be updated)

🀝 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!

About

go1pylib is a Python library designed to control the Go1 robot by Unitree Robotics. It provides an easy-to-use interface for robot movement, state management, collision avoidance, battery monitoring, and MQTT communication. Ideal for research and robotics development. https://pypi.org/project/go1pylib/

Topics

Resources

Contributing

Stars

10 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages