- forked from: https://github.com/InternRobotics/HIMLoco
- him paper: https://arxiv.org/abs/2404.14405
- hinf paper: https://arxiv.org/abs/2304.08485 (code to be released)
- amp integrated from: https://github.com/Alescontrela/AMP_for_hardware.git
- rewards integrated from:
-
Create an environment and install PyTorch:
-
Install Isaac Gym:
- Download and install Isaac Gym Preview 4 from https://developer.nvidia.com/isaac-gym
cd isaacgym/python && pip install -e .
- Clone this repository.
cd HIMLoco
- Install HIMLoco.
cd rsl_rl && pip install -e .cd ../legged_gym && pip install -e .
- Install LidarSensor
cd LidarSensor && pip install -e .
- Train a policy:
-
flat terrain
python legged_gym/legged_gym/scripts/train.py --task aliengo --headlesspython legged_gym/legged_gym/scripts/train.py --task aliengo_recover --headless- for lidar:
- if consider robot sel-occlusion, should combine the robots' meshes first:
python legged_gym/resources/robots/aliengo/process_body_mesh.py, then change theconsider_self_occlusion=Truein env configs (暂时自遮挡后的光线追踪有点问题) python legged_gym/legged_gym/scripts/train.py --task aliengo_lidar --headless
- if consider robot sel-occlusion, should combine the robots' meshes first:
-
stairs terrain
-
change the resume flat terrain log path in
legged_gym/legged_gym/envs/aliengo/aliengo_stairs_config.pylines 192load_run = ...and changeresume = True -
python legged_gym/legged_gym/scripts/train.py --task aliengo_stairs --headlessor
-
python legged_gym/legged_gym/scripts/train --task aliengo_stairs --resume --load_run Jul29_14-35-18_ --headless
-
-
use amp
- recommand direct 1-stage training (see aliengo_stairs_amp_config.py):
python legged_gym/legged_gym/scripts/train.py --task aliengo_stairs_amp --headless
- Play and export the latest policy:
python legged_gym/legged_gym/scripts/play.py --task aliengo --load_run <run_name> --load_cfgpython legged_gym/legged_gym/scripts/play.py --task aliengo_stairs --load_run <run_name> --load_cfg- train aliengo_stairs_amp and play with random vel_x from -2.0 to 2.0, yaw from -1.0 to 1.0:

- some pretrained weights link