Skip to content

yan9900/ma_quadruped_lab

Repository files navigation

Legged Lab: Direct IsaacLab Workflow for Legged Robots

IsaacSim Isaac Lab RSL_RL Python Linux platform Windows platform License pre-commit

Overview

This repository provides a direct workflow for training a legged robot using IsaacLab. It provides high transparency and low refactoring difficulty of the direct environment, and uses isaaclab components to simplify the workflow.

Key Features:

  • Easy to Reorganize Provides a direct workflow, allowing for fine-grained definition of environment logic.
  • Isolation Work outside the core Isaac Lab repository, ensuring that the development efforts remain self-contained.
  • Long-term support This repository will be updated with the updates of isaac sim and isaac lab, and will be supported for a long time.

Installation

LeggedLab is built against the latest version of Isaacsim/IsaacLab. It is recommended to follow the latest updates of legged lab.

1. Install Isaac Sim + Isaac Lab

  • Install Isaac Sim and Isaac Lab by following the installation guide. We recommend using the conda installation as it simplifies calling Python scripts from the terminal.

Note

you may run into some dependency versions issues while installing isaacsim 5.0.0.0 and isaaclab 2.2.1 (0.45.12), you can refer to the file legged_lab/legged_lab_requirements.txt to manually install the required packages with compatible versions.

2. Install this repository

  • Clone this repository separately from the Isaac Lab installation (i.e. outside the IsaacLab directory):
# Option 1: HTTPS
git clone https://github.com/yan9900/ma_quadruped_lab.git

# Option 2: SSH
git clone git@github.com:yan9900/ma_quadruped_lab.git
  • Since we are using a local version of rsl_rl, we have to uninstall the original one with following command
pip uninstall rsl-rl-lib
  • Using a python interpreter that has Isaac Lab installed, install the library
cd ma_quadruped_lab
pip install -r requirements.txt

3. Usage

  • Verify that the extension is correctly installed by running the following command:
python legged_lab/scripts/train.py --task=go2_flat --headless --logger=tensorboard --num_envs=64
  • to resume training from a checkpoint, add the argument --resume and --checkpoint to specify the path to the checkpoint file. for example:
python scripts/train.py --task go2_fall_recovery --num_envs 2048 --run_name only_target_posture --headless --resume true --load_run 2025-09-05_19-07-26_onupright_and_target --checkpoint model_1200.pt

Use Your Own Robot

Assets must be converted into USD format to be compatible with Legged Lab/IsaacLab. Convert Tutorial.

Multi-GPU and Multi-Node Training

Legged Lab supports multi-GPU and multi-node reinforcement learning using rsl_rl, the usage is exactly the same as IsaacLab. Detailed information

Troubleshooting

Pylance Missing Indexing of Extensions

In some VsCode versions, the indexing of part of the extensions is missing. In this case, add the path to your extension in .vscode/settings.json under the key "python.analysis.extraPaths".

{
    "python.analysis.extraPaths": [
        "${workspaceFolder}/legged_lab",
        "<path-to-IsaacLab>/source/isaaclab_tasks",
        "<path-to-IsaacLab>/source/isaaclab_mimic",
        "<path-to-IsaacLab>/source/extensions",
        "<path-to-IsaacLab>/source/isaaclab_assets",
        "<path-to-IsaacLab>/source/isaaclab_rl",
        "<path-to-IsaacLab>/source/isaaclab",
    ]
}

References and Thanks

This project repository builds upon the shoulders of giants.

  • IsaacLab The various reusable practical components in IsaacLab greatly simplify the complexity of LeggedLab.
  • legged_gym We borrowed the code organization and environment definition logic of legged_gym and simplified it as much as possible.
  • Protomotions The motivation for building this repository comes from protomotions. For the first time, we realized that we could create our own environment using only IsaacLab components without inheriting 'DirectRLEnv' or 'ManagerBasedRLEnv'.
  • [Legged Lab] (https://github.com/Hellod035/LeggedLab) Where we borrowed the strutcture from.
  • [robot lab] (https://github.com/fan-ziqi/robot_lab) Where we transfered the Go2 model and corresponding rewards functions from.

About

No description, website, or topics provided.

Resources

License

Stars

3 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages