Skip to main content

Wiki-GRx-Mujoco

Introduction

Wiki-GRx-Mujoco provides an environment for testing reinforcement learning policies of GR1 robot models trained on NVIDIA Isaac Gym in Mujoco. At the same time, you can also use Mujoco to view your robot model.

User Guide

Create conda environment:

Create conda environment:

conda create -n wiki-grx-mujoco python==3.8

Activate the created environment:

conda activate wiki-grx-mujoco

Install Mujoco and Mujoco-viewer:

pip install mujoco mujoco-python-viewer
  1. Install dependencies:

    cd wiki-grx-mujoco
    pip install -e .
  2. Load model in Mujoco:

    Enter the file directory:

    ./mujoco-3.1.5/bin/

    Run:

    ./simulate

    Then drag the .xml file you want to view into the robots folder

Load trained policy in Mujoco:

  1. Enter file directory

    ./run/scripts
  2. Run code with appropriate parameters:

    ./mjsim.py <robot_name> --load_model <path_to_model>

    Example:

    Load standing policy to make robot GR1T1 stand:

    ./mjsim.py gr1t1 --load_model /home/username/.../policy/stand_model_jit.pt

    Or load walking policy to make robot GR1T2 walk:

    ./mjsim.py gr1t2 --load_model /home/username/.../policy/walk_model_jit.pt

    You can modify model parameters in gr1tx_lower_limb.xml and robot_config.

  3. Use keyboard to control robot:

    After the simulation starts, you can press . to make the robot stand, press / to make the robot walk.