A Python SDK for controlling the Unitree Go2 robot and Mujoco Simulator via attachable modules.
For Ben Schepens.
The wrapper targets Ubuntu 22.04. The MuJoCo simulator, however, is also compatible with Ubuntu 24.04. However, execution of this wrapper on the robot itself under Ubuntu 24.04 is not guaranteed to work.
For installation instructions, see here.
Below are sample files demonstrating how to progammatically interact with the virtual Go2 robot in the mujoco environment. Start with these to write your own programs.
- Movement Examples — Examples for working with the controller's movement capabilities
- Video Examples — Examples for working with the controller's video capabilities
- OCR Examples — Examples for working with the controller's OCR capabilties
- Aruko Marker Examples — Examples for detecting and reacting to Aruko markers
- Terrain Generator Examples — Examples for working with the simulator's terrain generation capabilties
The example files are intended as reference implementations. When creating your own program, copy the example file to a new location before modifying it rather than editing the original example directly. This makes it easier to keep the examples unchanged and update them in the future.
Run an example (or your copied version) from the using:
python3 path/to/file.pyWhen running an example inside the simulator, launch the simulator inside another terminal. Make sure you are inside the conda enviroment in which you installed the go2sim package.
To start the simulator, run the following command.
go2simReference information regarding device and environment can be found here