This repo is used to train low-level locomotion policy of Unitree Go2 and H1 in Isaac Lab.
-
Create a new conda environment with python 3.10.
conda create -n isaaclab python=3.10 conda activate isaaclab
-
Make sure that Isaac Sim is installed on your machine. Otherwise follow this guideline to install it. If installing via the Omniverse Launcher, please ensure that Isaac Sim 4.1.0 is selected and installed. On Ubuntu 22.04 or higher, you could install it via pip:
pip install isaacsim-rl==4.1.0 isaacsim-replicator==4.1.0 isaacsim-extscache-physics==4.1.0 isaacsim-extscache-kit-sdk==4.1.0 isaacsim-extscache-kit==4.1.0 isaacsim-app==4.1.0 --extra-index-url https://pypi.nvidia.com
-
Install PyTorch.
pip install torch==2.2.2 --index-url https://download.pytorch.org/whl/cu121
-
Clone the Isaac Lab repository, and link extensions.
Note: This codebase was tested with Isaac Lab 1.1.0 and may not be compatible with newer versions. Please make sure to use the modified version of Isaac Lab provided below, which includes important bug fixes and updates. As Isaac Lab is under active development, we will consider supporting newer versions in the future.
git clone [email protected]:yang-zj1026/IsaacLab.git cd IsaacLab cd source/extensions ln -s {THIS_REPO_DIR}/isaaclab_exts/omni.isaac.leggedloco . cd ../..
-
Run the Isaac Lab installer script and additionally install rsl rl in this repo.
./isaaclab.sh -i none ./isaaclab.sh -p -m pip install -e {THIS_REPO_DIR}/rsl_rl cd ..
-
train
python scripts/train.py --task=go2_base --history_len=9 --run_name=XXX --max_iterations=2000 --save_interval=200 --headless python scripts/train.py --task=h1_base --run_name=XXX --max_iterations=2000 --save_interval=200 --headless
-
test
python scripts/play.py --task=go2_base_play --history_len=9 --load_run=RUN_NAME --num_envs=10 python scripts/play.py --task=h1_base_play --load_run=RUN_NAME --num_envs=10
Use
--headless
to enable headless mode. Add--enable_cameras --video
for headless rendering and video saving.
You can add additional environments by placing them under isaaclab_exts/omni.isaac.leggedloco/omni/isaac/leggedloco/config
.