conda create -n (your env name) python=3.8
conda activate (your env name)
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 git@github.com:inFpZero/Locomotion_Baseline.git
cd Locomotion_Baseline
# 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 /rsl_rl && pip install -e .
cd /legged_gym_train && pip install -e .
pip install "numpy<1.24" pydelatin swanlab 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).
- 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.
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. - --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_swanlab: no swanlab logging.
- --debug: debug mode.
- --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.
[ ] config to deploy