This repository fork serves as a template for building projects or extensions based on Isaac Lab, specifically for navigation projects. It allows you to develop in an isolated environment, outside of the core Isaac Lab repository.
The code skeleton here is very lightweight, because all shared navigation components live in isaac-nav-suite, and this template just assembles them in an example env_cfg
file in a way that works out the box, and demonstrates how to set up your directory structure. NOTE: at present, the necessary navigation components are not yet checked into the main branch of isaac-nav-suite, so to get a working project out the box, you should check out the dev/kappi_tas/migration branch.
Setup Tips:
- Once you fork this repo, you should add it as a git submodule to IsaacLab-Internal
- Remember to run
git submodule update --init --recursive
in IsaacLab-Internal, to automatically get the right version of isaac-nav-suite pulled down (it is a submodule in this template) - Also remember to symlink the
isaac-nav-suite
modules and your extension module inIsaacLab-Internal/source/extensions
, like so:
The rest of this README is the same as the general extension template README.
Key Features:
Isolation
Work outside the core Isaac Lab repository, ensuring that your development efforts remain self-contained.Flexibility
This template is set up to allow your code to be run as an extension in Omniverse.
Keywords: extension, template, isaaclab
- Throughout the repository, the name
graph_nav
only serves as an example and we provide a script to rename all the references to it automatically:
# Rename all occurrences of graph_nav (in files/directories) to your_fancy_extension_name
python scripts/rename_template.py your_fancy_extension_name
-
Install Isaac Lab, see the installation guide.
-
Using a python interpreter that has Isaac Lab installed, install the library
cd exts/graph_nav
python -m pip install -e .
- Verify that the extension is correctly installed by running the following command:
python scripts/rsl_rl/train.py --task=Template-Isaac-Velocity-Rough-Anymal-D-v0
To setup the IDE, please follow these instructions:
- Run VSCode Tasks, by pressing
Ctrl+Shift+P
, selectingTasks: Run Task
and running thesetup_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.
We provide an example UI extension that will load upon enabling your extension defined in exts/graph_nav/graph_nav/ui_extension_example.py
. For more information on UI extensions, enable and check out the source code of the omni.isaac.ui_template
extension and refer to the introduction on Isaac Sim Workflows 1.2.3. GUI.
To enable your extension, follow these steps:
-
Add the search path of your 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 toIsaacLabExtensionTemplate/exts
- If not already present, in the
Extension Search Paths
, enter the path that leads to Isaac Lab's extension directory directory (IsaacLab/source/extensions
) - Click on the Hamburger Icon (☰), then click
Refresh
.
- Navigate to the extension manager using
-
Search and enable your extension:
- Find your extension under the
Third Party
category. - Toggle it to enable your extension.
- Find your extension under the
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
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>/exts/graph_nav"
]
}
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
...