Deploy to Real Robot
fourier_aurora_sdk provides the robot motion control interface. This document uses the demo_walk (fourier_aurora_sdk/python/example/gr2/demo_walk.py) from this repository as an example to demonstrate the process of using this SDK to deploy an RL policy to a real robot.
Installation Dependencies
- Aurora and its dependencies are provided via a Docker image. Please refer to the Installation Tutorial
- fourier_aurora_sdk provides a Python client for deploying policies in the Mujoco environment simulation. Please refer to the Installation Tutorial
Connect a joystick
This demo requires a connected joystick. The robot’s walking speed is controlled using the joystick.
Start 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 have been installed in the Docker image according to the installation guide.
Prepare the Real Robot
Before controlling the real robot, please ensure the following conditions are met:
- Actuator versions are compatible
- Actuators are powered on (purple light blinking slowly)
- Network communication is normal (all actuator IPs are pingable)
- The robot is in a neutral suspended state
Start Aurora
-
Edit the configuration file config/config.yaml. Please ensure the RunType field is correctly set to 1 (real robot).
-
Run in the terminal:
AuroraCore --config config/config.yaml -
If started successfully, the terminal will display the following information:
[info] FSM state run, enter "Default" mode by default
Using the Python Client
-
Enter the Python virtual environment that already has fourier_aurora_client installed:
conda activate your_env_name -
The model trained by Wiki-GRx-Gym is located at
fourier_aurora_sdk/python/example/gr2/policy_jit.pt. Run the deployment demo:cd fourier_aurora_sdk/python/example/gr2
python3 demo_walk.py
Running Effect
Run the demo, and the terminal will prompt you to press Enter to switch to the PD Stand Task.
After entering the PD Stand Task, lower the suspension rope so that the robot stands on the ground, then press Enter again to switch to the user command mode.
Once in user command mode, you can control the robot’s walking using 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).
Note: This demo is provided only as an example of interface usage. The included control policy does not guarantee stable walking of the robot. Be sure to take proper safety precautions when running it on a real robot!