Skip to content

Repository files navigation

LocoLab

Isaac Lab Z RL

🎯 Overview

To develop high-performance locomotion algorithms, a well-configured and stable RL environment is essential.

Existing locomotion env projects are fragmented, lacking expandability, and oftenly do not guarantee robust sim2real transfer.

We introduce LocoLab, a RL locomotion env benchmark with sim2real robustness guarantees. It enables researchers to focus on algorithm iterations instead of tedious environment setup.

Key Features:

  • Flexibility: ManagerBased Rl env, easy to read, modify, and adapt to new tasks
  • Faster Rollout speed: Collisions of robot models are properly simplified.
  • Experiment Friendly: Functions like adding terrain levels logging per terrain types help to experiment and debug.

Tested and deployable tasks are:

  • Velocity-Flat-G1
  • Velocity-Flat-Go2
  • Velocity-Rough-Go2

📦 Installation

  • 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 LocoLab separately from the Isaac Lab installation (i.e. outside the IsaacLab directory):

    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
  • Install Z RL, which is built on RSL-RL but more flexible for developing algorithms.

    git clone https://github.com/syw-robotics/z_rl.git
    cd z_rl
    python -m pip install -e .

🚀 Usage

  • Training:

    python scripts/z_rl/train.py --task=<TASK_NAME>
  • Playing:

    python scripts/z_rl/train.py --task=<TASK_NAME>
  • Helpful scripts:

    • Running a task with a random agent for testing:

      python scripts/random_agent.py --task=<TASK_NAME>
    • Fetch a training logging from remote server:

      ./scripts/sync_logs.sh --help  # check this script for usage
  • Preset terrains:

    LocoLab provides additional preset terrain types beyond IsaacLab's defaults, including custom height-field and mesh terrains. See the terrain README.

📂 Task Organization

The tasks are organized in the following hierarchy:

tasks
├── manager_based
│   ├── locomotion
│   │   ├── velocity
│   │   │   ├── config
│   │   │   │   ├── unitree_go2
│   │   │   │   │   ├── agents
│   │   │   │   │   │   ├── z_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.

📝 TODO

  • G1: Add Velocity-Flat-AMP-G1 and Velocity-Rough-G1
  • B2: Add Velocity-Flat-B2 and Velocity-Rough-B2
  • Go2: Debug and refine Velocity-Rough-Go2-ZRL-BarlowTwins and Velocity-Rough-Go2-ZRL-DreamWaQ
  • Symmetry Config Definition: Alongside with which in Z RL

About

IsaacLab rl locomotion env benchmark with sim2real robustness guarantees.

Resources

Stars

13 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages