Skip to content

syw-robotics/LocoLab

Repository files navigation

LocoLab: Starter Environment Suite for Locomotion Task Training and Evaluation

Isaac Lab RSL RL Python pre-commit

Overview

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 tasks
  • Faster 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

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

Usage

  • 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

Task Organization

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.

Code formatting

We have a pre-commit template to automatically format your code. To install pre-commit:

pip install pre-commit

Then you can run pre-commit with:

pre-commit run --all-files

About

Starter Environment Suite for Locomotion Task Training and Evaluation in IsaacLab

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors