Skip to content

Jack-Zhang1101/LeggedLab

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Legged Lab: Direct IsaacLab Workflow for Legged Robots

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

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.

It has all the necessary conditions for sim-to-real and has been tested on real unitree g1 and h1 robots, video available. Deploy Code: https://github.com/Hellod035/unitree_deploy_py

Maintainer: Wandong Sun
Contact: 24b908020@stu.hit.edu.cn

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.

If you use Legged Lab in your research, please cite it as follows:

@software{LeggedLab,
  author = {Wandong, Sun},
  license = {MIT},
  title = {Legged Lab: Direct IsaacLab Workflow for Legged Robots},
  url = {https://github.com/Hellod035/LeggedLab},
  version = {0.0.1},
  year = {2025}
}

Installation

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

  • Clone this repository separately from the Isaac Lab installation (i.e. outside the IsaacLab directory):

# Option 1: HTTPS
git clone https://github.com/Hellod035/LeggedLab

# Option 2: SSH
git clone git@github.com:Hellod035/LeggedLab.git
  • Using a python interpreter that has Isaac Lab installed, install the library
cd LeggedLab
pip install -e .
  • Verify that the extension is correctly installed by running the following command:
python legged_lab/scripts/train.py --task=h1_flat --headless --logger=tensorboard --num_envs=64

Use Your Own Robot

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

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",
    ]
}

Pylance Crash

If you encounter a crash in pylance, it is probable that too many files are indexed and you run out of memory. A possible solution is to exclude some of omniverse packages that are not used in your project. To do so, modify .vscode/settings.json and comment out packages under the key "python.analysis.extraPaths" Some examples of packages that can likely be excluded are:

"<path-to-isaac-sim>/extscache/omni.anim.*"         // Animation packages
"<path-to-isaac-sim>/extscache/omni.kit.*"          // Kit UI tools
"<path-to-isaac-sim>/extscache/omni.graph.*"        // Graph UI tools
"<path-to-isaac-sim>/extscache/omni.services.*"     // Services tools
...

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'.

About

Direct IsaacLab Workflow for Legged Robots

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%