conda create -n terrain python=3.8
conda activate terrain
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 #or cu113,cu115,cu121, based on your cuda version
git clone https://github.com/shiki-ta/Humanoid-Terrain-Bench.git
cd Humanoid-Terrain-Bench
# Download the Isaac Gym binaries from https://developer.nvidia.com/isaac-gym
cd isaacgym/python && pip install -e .
cd rsl_rl && pip install -e .
cd legged_gym && pip install -e .
cd challenging_terrain && pip install -e .
pip install "numpy<1.24" pydelatin wandb tqdm opencv-python ipdb pyfqmr flaskcd legged_gym/scripts
- Set both first_stage flag in combine_terrain.py & envs/{robot}/{robot}.py to True. Train 1st stage base policy on flat terrain(Robots are able to walk after around 1000 iterations.):
We have released first stage base policy for all humanoid platforms.
python train.py --exptid h1-2 --device cuda:0 --headless --task h1_2_fix
- Set both first_stage flag to False. Training Recovery 2nd stage on multi-terrains:
python train.py --exptid h1-2 --device cuda:0 --resume --resumeid=test --checkpoint=1000--headless --task h1_2_fix
- Play the policy:
python play.py --exptid test --task h1_2_fix
- --exptid: string, to describe the run.
- --device: can be
cuda:0,cpu, etc. - --checkpoint: the specific checkpoint you want to load. If not specified load the latest one.
- --resume: resume from another checkpoint, used together with
--resumeid. - --seed: random seed.
- --no_wandb: no wandb logging.
- --save: make dataset