Skip to content

Commit

Permalink
Restructures documentation and fixes class types (isaac-sim#98)
Browse files Browse the repository at this point in the history
# Description

This change restructures documentation to add a new Overview section
that combines previous pages around learning workflows, environment
design, and developer guides.

New pages are added for RL library comparison and training performance
benchmarking.

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- This change requires a documentation update

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->
  • Loading branch information
kellyguo11 authored Aug 21, 2024
1 parent 4a3e4d7 commit 4e76296
Show file tree
Hide file tree
Showing 23 changed files with 713 additions and 421 deletions.
57 changes: 37 additions & 20 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,19 @@ Overview
:alt: H1 Humanoid example using Isaac Lab

**Isaac Lab** is a unified and modular framework for robot learning that aims to simplify common workflows
in robotics research (such as RL, learning from demonstrations, and motion planning). It is built upon
in robotics research (such as reinforcement learning, learning from demonstrations, and motion planning). It is built upon
`NVIDIA Isaac Sim`_ to leverage the latest simulation capabilities for photo-realistic scenes, and fast
and efficient simulation. The core objectives of the framework are:
and efficient simulation.

Isaac Lab provides over 26 environments, and we are actively working on adding more environments to the list. Current environments include Classic tasks - Cartpole, Cartpole with camera, Humanoid and Ant, fixed-arm and dexterous manipulation tasks - UR10, Franka, Allegro, Shadow Hand, Legged locomotion tasks - Quadrupeds and Humanoids, Navigation tasks - Quadruped, and Quadcopter. It features over 16 robots:

- Classic - Cartpole, Humanoid, Ant
- Fixed-Arms and Hands - UR10, Franka, Allegro, Shadow Hand
- Quadrupeds – Anybotics Anymal-B, Anymal-C, Anymal-D, Unitree A1, Unitree Go1, Unitree Go2, Boston Dynamics Spot
- Humanoids - Unitree H1, Unitree G1
- Quadcopter - Crazyflie

The core objectives of the framework are:

- **Modularity**: Easily customize and add new environments, robots, and sensors.
- **Agility**: Adapt to the changing needs of the community.
Expand Down Expand Up @@ -60,22 +70,18 @@ Table of Contents
:caption: Getting Started

source/setup/installation/index
source/setup/developer
source/setup/sample
source/setup/template
source/setup/faq

.. toctree::
:maxdepth: 2
:caption: Features
:maxdepth: 3
:caption: Overview
:titlesonly:

source/features/task_workflows
source/features/hydra
source/features/multi_gpu
source/features/tiled_rendering
source/features/environments
source/features/actuators
.. source/features/motion_generators
source/overview/developer-guide/index
source/overview/environment-workflows/index
source/overview/reinforcement-learning/index
source/overview/teleop_imitation
source/overview/sample_scripts

.. toctree::
:maxdepth: 1
Expand All @@ -86,12 +92,6 @@ Table of Contents
source/how-to/index
source/deployment/index

.. toctree::
:maxdepth: 1
:caption: Source API

source/api/index

.. toctree::
:maxdepth: 1
:caption: Migration Guides
Expand All @@ -101,6 +101,23 @@ Table of Contents
source/migration/migrating_from_omniisaacgymenvs
source/migration/migrating_from_orbit

.. toctree::
:maxdepth: 2
:caption: Features

source/features/hydra
source/features/multi_gpu
source/features/tiled_rendering
source/features/environments
source/features/actuators
.. source/features/motion_generators

.. toctree::
:maxdepth: 1
:caption: Source API

source/api/index

.. toctree::
:maxdepth: 1
:caption: References
Expand Down
4 changes: 3 additions & 1 deletion docs/source/features/environments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ for the reach environment:
+----------------+---------------------------+-----------------------------------------------------------------------------+
| |lift-cube| | |lift-cube-link| | Pick a cube and bring it to a sampled target position with the Franka robot |
+----------------+---------------------------+-----------------------------------------------------------------------------+
| |cabi-franka| | |cabi-franka-link| | Grasp the handle of a cabinet's drawer and open it with the Franka robot |
| |cabi-franka| | | |cabi-franka-link| | Grasp the handle of a cabinet's drawer and open it with the Franka robot |
| | | |franka-direct-link| | |
+----------------+---------------------------+-----------------------------------------------------------------------------+
| |cube-allegro| | | |cube-allegro-link| | In-hand reorientation of a cube using Allegro hand |
| | | |allegro-direct-link| | |
Expand All @@ -98,6 +99,7 @@ for the reach environment:
.. |lift-cube-ik-abs-link| replace:: `Isaac-Lift-Cube-Franka-IK-Abs-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/manager_based/manipulation/lift/config/franka/ik_abs_env_cfg.py>`__
.. |lift-cube-ik-rel-link| replace:: `Isaac-Lift-Cube-Franka-IK-Rel-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/manager_based/manipulation/lift/config/franka/ik_rel_env_cfg.py>`__
.. |cabi-franka-link| replace:: `Isaac-Open-Drawer-Franka-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/manager_based/manipulation/cabinet/config/franka/joint_pos_env_cfg.py>`__
.. |franka-direct-link| replace:: `Isaac-Franka-Cabinet-Direct-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/direct/franka_cabinet/franka_cabinet_env.py>`__
.. |cube-allegro-link| replace:: `Isaac-Repose-Cube-Allegro-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/manager_based/manipulation/inhand/config/allegro_hand/allegro_env_cfg.py>`__
.. |allegro-direct-link| replace:: `Isaac-Repose-Cube-Allegro-Direct-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/direct/allegro_hand/allegro_hand_env_cfg.py>`__

Expand Down
5 changes: 3 additions & 2 deletions docs/source/how-to/wrap_rl_env.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Environment wrappers are a way to modify the behavior of an environment without
This can be used to apply functions to modify observations or rewards, record videos, enforce time limits, etc.
A detailed description of the API is available in the :class:`gymnasium.Wrapper` class.

At present, all RL environments inheriting from the :class:`~envs.ManagerBasedRLEnv` class
At present, all RL environments inheriting from the :class:`~envs.ManagerBasedRLEnv` or :class:`~envs.DirectRLEnv` classes
are compatible with :class:`gymnasium.Wrapper`, since the base class implements the :class:`gymnasium.Env` interface.
In order to wrap an environment, you need to first initialize the base environment. After that, you can
wrap it with as many wrappers as you want by calling ``env = wrapper(env, *args, **kwargs)`` repeatedly.
Expand Down Expand Up @@ -127,7 +127,7 @@ Every learning framework has its own API for interacting with environments. For
`Stable-Baselines3`_ library uses the `gym.Env <https://gymnasium.farama.org/api/env/>`_
interface to interact with environments. However, libraries like `RL-Games`_, `RSL-RL`_ or `SKRL`_
use their own API for interfacing with a learning environments. Since there is no one-size-fits-all
solution, we do not base the :class:`~envs.ManagerBasedRLEnv` class on any particular learning framework's
solution, we do not base the :class:`~envs.ManagerBasedRLEnv` and :class:`~envs.DirectRLEnv` classes on any particular learning framework's
environment definition. Instead, we implement wrappers to make it compatible with the learning
framework's environment definition.

Expand Down Expand Up @@ -155,6 +155,7 @@ Adding new wrappers

All new wrappers should be added to the :mod:`omni.isaac.lab_tasks.utils.wrappers` module.
They should check that the underlying environment is an instance of :class:`omni.isaac.lab.envs.ManagerBasedRLEnv`
or :class:`~envs.DirectRLEnv`
before applying the wrapper. This can be done by using the :func:`unwrapped` property.

We include a set of wrappers in this module that can be used as a reference to implement your own wrappers.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,112 +1,3 @@
Developer's Guide
=================

For development, we suggest using `Microsoft Visual Studio Code
(VSCode) <https://code.visualstudio.com/>`__. This is also suggested by
NVIDIA Omniverse and there exists tutorials on how to `debug Omniverse
extensions <https://www.youtube.com/watch?v=Vr1bLtF1f4U&ab_channel=NVIDIAOmniverse>`__
using VSCode.


Setting up Visual Studio Code
-----------------------------

The following is only applicable for Isaac Sim installed via the Omniverse Launcher.
The ``Isaac Lab`` repository includes the VSCode settings to easily allow setting
up your development environment. These are included in the ``.vscode`` directory
and include the following files:

.. code-block:: bash
.vscode
├── tools
│   ├── launch.template.json
│   ├── settings.template.json
│   └── setup_vscode.py
├── extensions.json
├── launch.json # <- this is generated by setup_vscode.py
├── settings.json # <- this is generated by setup_vscode.py
└── tasks.json
To setup the IDE, please follow these instructions:

1. Open the ``Isaac Lab`` directory on Visual Studio Code IDE
2. Run VSCode `Tasks <https://code.visualstudio.com/docs/editor/tasks>`__, by
pressing ``Ctrl+Shift+P``, selecting ``Tasks: Run Task`` and running the
``setup_python_env`` in the drop down menu.

.. image:: ../_static/vscode_tasks.png
:width: 600px
:align: center
:alt: VSCode Tasks

If everything executes correctly, it should create the following files:

* ``.vscode/launch.json``: Contains the launch configurations for debugging python code.
* ``.vscode/settings.json``: Contains the settings for the python interpreter and the python environment.

For more information on VSCode support for Omniverse, please refer to the
following links:

* `Isaac Sim VSCode support <https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/manual_standalone_python.html#isaac-sim-python-vscode>`__
* `Debugging with VSCode <https://docs.omniverse.nvidia.com/isaacsim/latest/advanced_tutorials/tutorial_advanced_python_debugging.html>`__


Configuring the python interpreter
----------------------------------

In the provided configuration, we set the default python interpreter to use the
python executable provided by Omniverse. This is specified in the
``.vscode/settings.json`` file:

.. code-block:: json
{
"python.defaultInterpreterPath": "${workspaceFolder}/_isaac_sim/python.sh",
}
If you want to use a different python interpreter (for instance, from your conda environment),
you need to change the python interpreter used by selecting and activating the python interpreter
of your choice in the bottom left corner of VSCode, or opening the command palette (``Ctrl+Shift+P``)
and selecting ``Python: Select Interpreter``.

For more information on how to set python interpreter for VSCode, please
refer to the `VSCode documentation <https://code.visualstudio.com/docs/python/environments#_working-with-python-interpreters>`_.

Repository organization
-----------------------

The ``Isaac Lab`` repository is structured as follows:

.. code-block:: bash
IsaacLab
├── .vscode
├── .flake8
├── LICENSE
├── isaaclab.sh
├── pyproject.toml
├── README.md
├── docs
├── source
│   ├── extensions
│   │   ├── omni.isaac.lab
│   │   ├── omni.isaac.lab_assets
│   │   └── omni.isaac.lab_tasks
│   ├── standalone
│   │   ├── demos
│   │   ├── environments
│   │   ├── tools
│   │   ├── tutorials
│   │   └── workflows
└── VERSION
The ``source`` directory contains the source code for all ``Isaac Lab`` *extensions*
and *standalone applications*. The two are the different development workflows
supported in `Isaac Sim <https://docs.omniverse.nvidia.com/isaacsim/latest/introductory_tutorials/tutorial_intro_workflows.html>`__.
These are described in the following sections.

Extensions
~~~~~~~~~~

Expand Down
16 changes: 16 additions & 0 deletions docs/source/overview/developer-guide/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Developer's Guide
=================

For development, we suggest using `Microsoft Visual Studio Code
(VSCode) <https://code.visualstudio.com/>`__. This is also suggested by
NVIDIA Omniverse and there exists tutorials on how to `debug Omniverse
extensions <https://www.youtube.com/watch?v=Vr1bLtF1f4U&ab_channel=NVIDIAOmniverse>`__
using VSCode.

.. toctree::
:maxdepth: 1

vs_code
repo_structure
extensions
template
32 changes: 32 additions & 0 deletions docs/source/overview/developer-guide/repo_structure.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Repository organization
-----------------------

The ``Isaac Lab`` repository is structured as follows:

.. code-block:: bash
IsaacLab
├── .vscode
├── .flake8
├── LICENSE
├── isaaclab.sh
├── pyproject.toml
├── README.md
├── docs
├── source
│   ├── extensions
│   │   ├── omni.isaac.lab
│   │   ├── omni.isaac.lab_assets
│   │   └── omni.isaac.lab_tasks
│   ├── standalone
│   │   ├── demos
│   │   ├── environments
│   │   ├── tools
│   │   ├── tutorials
│   │   └── workflows
└── VERSION
The ``source`` directory contains the source code for all ``Isaac Lab`` *extensions*
and *standalone applications*. The two are the different development workflows
supported in `Isaac Sim <https://docs.omniverse.nvidia.com/isaacsim/latest/introductory_tutorials/tutorial_intro_workflows.html>`__.
These are described in the following sections.
File renamed without changes.
65 changes: 65 additions & 0 deletions docs/source/overview/developer-guide/vs_code.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
Setting up Visual Studio Code
-----------------------------

The following is only applicable for Isaac Sim installed via the Omniverse Launcher.
The ``Isaac Lab`` repository includes the VSCode settings to easily allow setting
up your development environment. These are included in the ``.vscode`` directory
and include the following files:

.. code-block:: bash
.vscode
├── tools
│   ├── launch.template.json
│   ├── settings.template.json
│   └── setup_vscode.py
├── extensions.json
├── launch.json # <- this is generated by setup_vscode.py
├── settings.json # <- this is generated by setup_vscode.py
└── tasks.json
To setup the IDE, please follow these instructions:

1. Open the ``Isaac Lab`` directory on Visual Studio Code IDE
2. Run VSCode `Tasks <https://code.visualstudio.com/docs/editor/tasks>`__, by
pressing ``Ctrl+Shift+P``, selecting ``Tasks: Run Task`` and running the
``setup_python_env`` in the drop down menu.

.. image:: ../../_static/vscode_tasks.png
:width: 600px
:align: center
:alt: VSCode Tasks

If everything executes correctly, it should create the following files:

* ``.vscode/launch.json``: Contains the launch configurations for debugging python code.
* ``.vscode/settings.json``: Contains the settings for the python interpreter and the python environment.

For more information on VSCode support for Omniverse, please refer to the
following links:

* `Isaac Sim VSCode support <https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/manual_standalone_python.html#isaac-sim-python-vscode>`__
* `Debugging with VSCode <https://docs.omniverse.nvidia.com/isaacsim/latest/advanced_tutorials/tutorial_advanced_python_debugging.html>`__


Configuring the python interpreter
----------------------------------

In the provided configuration, we set the default python interpreter to use the
python executable provided by Omniverse. This is specified in the
``.vscode/settings.json`` file:

.. code-block:: json
{
"python.defaultInterpreterPath": "${workspaceFolder}/_isaac_sim/python.sh",
}
If you want to use a different python interpreter (for instance, from your conda environment),
you need to change the python interpreter used by selecting and activating the python interpreter
of your choice in the bottom left corner of VSCode, or opening the command palette (``Ctrl+Shift+P``)
and selecting ``Python: Select Interpreter``.

For more information on how to set python interpreter for VSCode, please
refer to the `VSCode documentation <https://code.visualstudio.com/docs/python/environments#_working-with-python-interpreters>`_.
Loading

0 comments on commit 4e76296

Please sign in to comment.