Authors: Xuxin Cheng*, Kexin Shi*, Ananye Agarwal, Deepak Pathak
Website: https://extreme-parkour.github.io
Paper: https://arxiv.org/abs/2309.14341
Tweet Summary: https://twitter.com/pathak2206/status/1706696237703901439
conda create -n parkour python=3.8
conda activate parkour
cd
pip3 install torch==1.10.0+cu113 torchvision==0.11.1+cu113 torchaudio==0.10.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
git clone [email protected]:chengxuxin/extreme-parkour.git
cd extreme-parkour
# Download the Isaac Gym binaries from https://developer.nvidia.com/isaac-gym
# Originally trained with Preview3, but haven't seen bugs using Preview4.
cd isaacgym/python && pip install -e .
cd ~/extreme-parkour/rsl_rl && pip install -e .
cd ~/extreme-parkour/legged_gym && pip install -e .
pip install "numpy<1.24" pydelatin wandb tqdm opencv-python ipdb pyfqmr flask
cd legged_gym/scripts
- Train base policy:
python train.py --exptid xxx-xx-WHATEVER --device cuda:0
Train 10-15k iterations (8-10 hours on 3090) (at least 15k recommended).
- Train distillation policy:
python train.py --exptid yyy-yy-WHATEVER --device cuda:0 --resume --resumeid xxx-xx --delay --use_camera
Train 5-10k iterations (5-10 hours on 3090) (at least 5k recommended).
You can run either base or distillation policy at arbitary gpu # as long as you set
--device cuda:#
, no need to setCUDA_VISIBLE_DEVICES
.
- Play base policy:
python play.py --exptid xxx-xx
No need to write the full exptid. The parser will auto match runs with first 6 strings (xxx-xx). So better make sure you don't reuse xxx-xx. Delay is added after 8k iters. If you want to play after 8k, add --delay
- Play distillation policy:
python play.py --exptid yyy-yy --delay --use_camera
- Save models for deployment:
python save_jit.py --exptid xxx-xx
This will save the models in legged_gym/logs/parkour_new/xxx-xx/traced/
.
Can be used in both IsaacGym and web viewer.
ALT + Mouse Left + Drag Mouse
: move view.[ ]
: switch to next/prev robot.Space
: pause/unpause.F
: switch between free camera and following camera.
- --exptid: string, can be
xxx-xx-WHATEVER
,xxx-xx
is typically numbers only.WHATEVER
is the description of the run. - --device: can be
cuda:0
,cpu
, etc. - --delay: whether add delay or not.
- --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.
- --use_camera: use camera or scandots.
- --web: used for playing on headless machines. It will forward a port with vscode and you can visualize seemlessly in vscode with your idle gpu or cpu. Live Preview vscode extension required, otherwise you can view it in any browser.
https://github.com/leggedrobotics/legged_gym
https://github.com/Toni-SM/skrl
If you found any part of this code useful, please consider citing:
@article{cheng2023parkour,
title={Extreme Parkour with Legged Robots},
author={Cheng, Xuxin and Shi, Kexin and Agarwal, Ananye and Pathak, Deepak},
journal={arXiv preprint arXiv:2309.14341},
year={2023}
}