Training and Play
Wiki-GRx-Gym provides a training environment based on NVIDIA Isaac Gym, combined with the legged_gym and rsl_rl libraries from the Legged Robotics team at ETH Zurich, for training the Fourier N1 robot's walking ability on complex terrain.
Related Resources
- NVIDIA Isaac Gym: https://developer.nvidia.com/isaac-gym
- legged_gym: https://github.com/leggedrobotics/legged_gym.git
- rsl_rl: https://github.com/leggedrobotics/rsl_rl.git
Installation Guide
-
Install Ubuntu 20.04 / Ubuntu 22.04 system
-
Conda Environment Configuration
# Install Miniconda
cd ~/Downloads
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
# Create training environment
conda create -n wiki-grx-gym python=3.8 -y
conda activate wiki-grx-gym -
Dependency Installation
# Navigate to the project directory
cd path/to/your/project
# Install Isaac Gym
cd IsaacGym_Preview_4_Package/isaacgym/python/
pip install -e . -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
# Navigate to the project directory
cd path/to/your/project
# Install rsl_rl
cd rsl_rl
pip install -e . -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
# Navigate to the project directory
cd path/to/your/project
# Install legged_gym
cd legged_gym
pip install -e . `-i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple`
# Install other dependencies
pip install tensorboard protobuf==3.20.3 -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
Usage Instructions
-
Start Training
cd legged_gym/legged_gym/scripts
python train.py --task=N1 --headless -
Demonstration Test
python play.py --task=N1 --num_envs=1 -
Export Policy
- When running
play.py, the policy network model will be automatically exported tologs/N1/exported/policy_jit.pt. - This policy model can be used for subsequent deployment on the real robot.
- When running
[!NOTE]
The average training time using NVIDIA RTX 4090 is about 6 seconds per iteration. Completing 5000 iterations takes approximately 8 hours. Actual training time can be adjusted based on reward growth and training objectives.
Common Issues
-
Ubuntu 22.04 reports error "libpython3.8.so.1.0: cannot open shared object file"
- The displayed information is: ImportError: libpython3.8.so.1.0: cannot open shared object file: No such file or directory
- Solution reference: https://blog.csdn.net/weixin_43989965/article/details/136612205
- You can try activating the
wiki-grx-gymenvironment first, running the automatic configuration script in this project, then exiting the conda environment, and then reactivating the corresponding conda environment:
conda activate wiki-grx-gym
bash shell/conda_import_libpython.sh
conda deactivate
conda activate wiki-grx-gym