Skip to content

chohh7391/isaaclab_tutorial

Repository files navigation

Isaac Lab Tutorial

IsaacSim Python Linux platform

Overview

This repository contains simple tutorials for Isaac Lab.

Youtube: https://www.youtube.com/playlist?list=PLoOyjqPSGrjXFU2thNTkJYplPztOXa4_W

PDF: 이동로봇

PPT: 이동로봇

Key Features:

  • #1 Basic Tutoria: Step-by-step guide from official documentation to help you understand and use various features of the framework.

  • #2 Robot Learning Framework: Explain the two task design methods: Manager-Based & Direct. Analyze 2 or three examples for each

  • #3 External Project: How to separate tasks from official IsaacLab repository

  • #4 Deploying policies in Isaac Sim: A guide to exporting trained policies from the IsaacLab RL environment and deploying them for inference and visualization within IsaacSim's graphicial interface.

Keywords: isaaclab, tutorial

Installation

# 1) Conda env
conda create -n isaaclab_tut python=3.11
conda activate isaaclab_tut

# 2) Clone the repo
cd $HOME
git clone https://github.com/chohh7391/isaaclab_tutorial.git
cd isaaclab_tutorial

# 3) Pytorch (CUDA 12.8)
pip install --upgrade pip
pip install -U torch==2.7.0 torchvision==0.22.0 --index-url https://download.pytorch.org/whl/cu128

# 4) Isaac Sim SDK (v5.1.0)
pip install "isaacsim[all,extscache]==5.1.0" --extra-index-url https://pypi.nvidia.com

# 5) Isaac Lab (v2.3.0)
git clone -b v2.3.0 git@github.com:isaac-sim/IsaacLab.git _isaaclab
sudo apt install -y cmake build-essential
./_isaaclab/isaaclab.sh --install

# 6) Smoke test (headless sim)
python _isaaclab/scripts/tutorials/00_sim/create_empty.py --headless

# 7) Dev install
python -m pip install -e source/isaaclab_tutorial
  • Verify that the extension is correctly installed by:

    • Listing the available tasks:

      Note: It the task name changes, it may be necessary to update the search pattern "Tutorial-" (in the scripts/list_envs.py file) so that it can be listed.

      # use 'FULL_PATH_TO_isaaclab.sh|bat -p' instead of 'python' if Isaac Lab is not installed in Python venv or conda
      python scripts/list_envs.py
    • Running a task:

      # use 'FULL_PATH_TO_isaaclab.sh|bat -p' instead of 'python' if Isaac Lab is not installed in Python venv or conda
      python scripts/<RL_LIBRARY>/train.py --task=<TASK_NAME>
    • Running a task with dummy agents:

      These include dummy agents that output zero or random agents. They are useful to ensure that the environments are configured correctly.

      • Zero-action agent

        # use 'FULL_PATH_TO_isaaclab.sh|bat -p' instead of 'python' if Isaac Lab is not installed in Python venv or conda
        python scripts/zero_agent.py --task=<TASK_NAME>
      • Random-action agent

        # use 'FULL_PATH_TO_isaaclab.sh|bat -p' instead of 'python' if Isaac Lab is not installed in Python venv or conda
        python scripts/random_agent.py --task=<TASK_NAME>

Set up IDE (Optional)

To setup the IDE, please follow these instructions:

  • Run VSCode Tasks, by pressing Ctrl+Shift+P, selecting Tasks: Run Task and running the setup_python_env in the drop down menu. When running this task, you will be prompted to add the absolute path to your Isaac Sim installation.

If everything executes correctly, it should create a file .python.env in the .vscode directory. The file contains the python paths to all the extensions provided by Isaac Sim and Omniverse. This helps in indexing all the python modules for intelligent suggestions while writing code.

Setup as Omniverse Extension (Optional)

We provide an example UI extension that will load upon enabling your extension defined in source/isaaclab_tutorial/isaaclab_tutorial/ui_extension_example.py.

To enable your extension, follow these steps:

  1. Add the search path of this project/repository to the extension manager:

    • Navigate to the extension manager using Window -> Extensions.
    • Click on the Hamburger Icon, then go to Settings.
    • In the Extension Search Paths, enter the absolute path to the source directory of this project/repository.
    • If not already present, in the Extension Search Paths, enter the path that leads to Isaac Lab's extension directory directory (IsaacLab/source)
    • Click on the Hamburger Icon, then click Refresh.
  2. Search and enable your extension:

    • Find your extension under the Third Party category.
    • Toggle it to enable your extension.

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

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": [
        "<path-to-ext-repo>/source/isaaclab_tutorial"
    ]
}

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors