This codebase serves as a starter manager based rl environment for building locomotion projects on Isaac Lab.
Key Features:
Flexibility: Easy to read, modifiy, reuse existing modules, and adapt to new tasksFaster Rollout speed: Collisions of robot models are simplified, since isaacsim runs collision detection on cpu.Experiment Friendly: Functions as adding terrain levels logging per terrain types help to experiment and debug.
Tested and deployable tasks are:
- Velocity-Flat-Go2
- Velocity-Rough-Go2
-
Install Isaac Lab by following the installation guide. We recommend using the conda or uv installation as it simplifies calling Python scripts from the terminal.
-
Clone
LocoLabseparately from the Isaac Lab installation (i.e. outside theIsaacLabdirectory):git clone https://github.com/syw-robotics/LocoLab.git
-
Using a python interpreter that has Isaac Lab installed, install the library in editable mode using:
python -m pip install -e source/locolab
-
Helpful scripts:
-
Listing the available tasks:
python scripts/list_envs.py
-
Running a task with a random agent for testing:
python scripts/random_agent.py --task=<TASK_NAME>
-
Fetch a trainning logging from remote server:
./scripts/sync_logs.sh --help # check this script for usage
-
-
Training:
python scripts/rsl_rl/train.py --task=<TASK_NAME>
-
Playing:
python scripts/rsl_rl/train.py --task=<TASK_NAME>
-
Deployment:
For sim2im and sim2real deployment, see go2_isaaclab_deploy
The tasks are organized in the following hierarchy:
tasks
├── manager_based
│ ├── locomotion
│ │ ├── velocity
│ │ │ ├── config
│ │ │ │ ├── unitree_go2
│ │ │ │ │ ├── agents
│ │ │ │ │ │ ├── rsl_rl_ppo_cfg.py
│ │ │ │ │ │ └── ...
│ │ │ │ │ ├── mdp_cfg (mdp configurations)
│ │ │ │ │ ├── flat_env_cfg.py
│ │ │ │ │ ├── rough_env_cfg.py
│ │ │ │ │ └── __init__.py (register the environment cfgs)
│ │ │ └── mdp (mdp components)
│ │ └── ...
│ └── ...
└── ...
Different types of tasks are organized in different sub-directories, such that tasks are clearly separated and mdp components are easily reusable.
We have a pre-commit template to automatically format your code. To install pre-commit:
pip install pre-commitThen you can run pre-commit with:
pre-commit run --all-files