Skip to main content

Simulation

fourier_aurora_sdk provides the GR3 robot motion control interface and the Mujoco simulation environment. This article uses the demo_walk (fourier_aurora_sdk/python/example/gr3/demo_walk.py) from this repository as an example to demonstrate the process of verifying RL policies(WBC Yaw) on the Mujoco simulator using this SDK.

Installation Dependencies

  • The Aurora core and its dependencies are provided via a Docker image, please refer to the Installation Tutorial.
  • fourier_aurora_sdk provides a Python client to deploy policies. For its installation tutorial, please refer to the Aurora Client Introduction.

Connect a joystick

This demo requires a connected joystick. The robot’s walking speed is controlled using the joystick.

Start the Container

Run the following command in the root directory of the fourier_aurora_sdk repository to start the container:

bash docker_run.bash

Note: Please ensure that fourier-aurora and related modules are installed in the Docker image according to the installation guide.

Start the Simulator

  1. After entering the Docker image, open a new terminal and enter the started container:
    (sudo) docker exec -it fourier_aurora_sdk bash
  2. Start the simulation environment:
    python3 sim/start_simulate_root.py
    Follow the prompt instructions. The simulation environment will start, and the robot will be placed at the starting position.

Start Aurora

  1. Edit the configuration file config/config.yaml, please make sure the RobotName field is correctly set to "gr3", the HardwareType field is correctly set to "v224", and the RunType field is correctly set to 0 (Simulator).

  2. Run in the terminal:

    AuroraCore --config config/config.yaml
  3. If started successfully, the terminal will display the following information:

    [info] FSM state run, enter "Default" mode by default

Using Python Client

  1. Enter the Python virtual environment with fourier_aurora_client installed:

    conda activate your_env_name
  2. The model trained by fourier_lab is located at fourier_aurora_sdk/python/example/gr3/wbc_yaw.pt. Run the deployment demo:

    cd fourier_aurora_sdk/python/example/gr3
    python3 demo_walk.py

Expected Results

Run the demo, the terminal prompts to press the Enter key to switch to the PD Stand Task.

After entering the PD Stand Task, click the Reset button of the Mujoco simulator to let the robot stand on the ground, and press the Enter key to switch to the user command mode.

Once in user command mode, you can control the robot’s walking with the controller joysticks.

The left joystick (vertical axis) controls forward and backward movement.

The left joystick (horizontal axis) controls lateral (sideways) movement.

The right joystick (horizontal axis) controls yaw (rotation).