Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Deploy Policies with LEAPP
==========================
Exporting Policies with LEAPP
=============================

.. currentmodule:: isaaclab

Expand All @@ -11,32 +11,28 @@ observation preprocessing, action postprocessing, or recurrent-state handling by

The Isaac Lab LEAPP exporter traces the data flowing between the policy and the simulation,
capturing the operations applied along the way. It also embeds semantic metadata for the exported
policy inputs and outputs. Isaac Lab can consume these exports through :class:`~envs.LeappDeploymentEnv`.
policy inputs and outputs. Isaac Lab can consume these exports through :class:`~envs.LeappDeploymentEnv`
for deployment in simulation. You can also deploy LEAPP-exported policies directly on real robots through ROS using
`Isaac ROS Deploy <https://nvidia-isaac-ros.github.io/repositories_and_packages/isaac_ros_deploy/index.html>`__
or build your own deployment orchestration by parsing the YAML.

Supported Workflows
-------------------
.. figure:: https://download.isaacsim.omniverse.nvidia.com/isaaclab/images/ur10_sim_vs_real.gif

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Agent review: Reminder to confirm the GIF is accessible at this URL once the upload/sync has completed. An automated URL check currently returns HTTP 404, which may simply mean the asset is still awaiting upload or sync. Please recheck that the image loads after that completes.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still waiting for @sheikh-nv to publish the gif.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved

:width: 100%
:align: center
:alt: Side-by-side UR10 reaching motions in Isaac Lab on the left and on a physical robot on the right.

**Manager-based RL environments:** The standard export and deployment workflow supports manager-based RL environments
(``ManagerBasedRLEnv``) trained with ``rsl_rl``, ``rl_games``, ``skrl``, or
``sb3``. It exports the policy from a manager-based environment and
deploys it through :class:`~envs.LeappDeploymentEnv`.
A LEAPP-exported ``Isaac-Reach-UR10`` policy deployed on a physical robot.

**Physics backend:** The manager-based exporter relies on the environment's manager interfaces and does
not select a physics backend itself. This includes **Newton** for tasks that expose a Newton
preset. The LEAPP integration test creates an RSL-RL ``Isaac-Humanoid`` checkpoint and exports it
with **Isaac Sim PhysX** (``presets=isaacsim_physx``) and **Newton MJWarp**
(``presets=newton_mjwarp``). When its optional runtime is installed, the same test also covers
**OV PhysX** (``presets=ovphysx``).

You do not need to specify a preset when using the task's default backend. To select a backend,
append its ``presets=<PRESET_NAME>`` argument to both the training and export commands. Use the
same preset for both commands so the export recreates the environment configuration used by the
checkpoint.
Supported Workflows
-------------------

**Direct RL environments:** ``DirectRLEnv`` environments can be exported with the RSL-RL workflow
after you add LEAPP annotations; see the advanced
:doc:`Direct workflow export guide <exporting_direct_workflow_policies_with_leapp>`.
They are not supported by :class:`~envs.LeappDeploymentEnv`.
- **Manager-based RL environments:** Export policies trained with ``rsl_rl``, ``rl_games``,
``skrl``, or ``sb3`` and run them in Isaac Lab with :class:`~envs.LeappDeploymentEnv`.
- **Direct RL environments:** Export RSL-RL policies after adding LEAPP annotations; see the
:doc:`Direct workflow export guide <exporting_direct_workflow_policies_with_leapp>`.
These policies are not supported by :class:`~envs.LeappDeploymentEnv`.
- **Physics backends:** Export with Isaac Sim PhysX, Newton MJWarp, or OV PhysX, as supported
by your task. Use the same backend and configuration as training.

.. toctree::
:hidden:
Expand Down Expand Up @@ -100,10 +96,8 @@ checkpoint (or at a custom path). The directory contains:
state or last action.
- **A graph visualization** — a ``.png`` diagram of the pipeline (can be disabled).

The important outcome for Isaac deployment workflows is that the exported artifact preserves the
same dataflow that was used during training and inference inside Isaac Lab. That means downstream
consumers can run the policy without reconstructing observation ordering, command wiring, actuator
targets, or policy feedback loops themselves.
The exported artifact encapsulates the policy and all observation preprocessing and action
postprocessing performed in Isaac Lab, so deployment frameworks do not need to replicate that logic.

For a detailed description of LEAPP's generated artifacts and APIs, refer to the
`LEAPP documentation <https://nvidia-isaac.github.io/leapp/>`_.
Expand Down Expand Up @@ -244,8 +238,7 @@ backend-specific and launcher arguments (see :func:`~isaaclab.app.add_launcher_a
exporters, but a published artifact is not available for every task and backend combination.
If no matching artifact has been published, the exporter reports that it is unavailable and
exits. Train the task locally and omit ``--checkpoint`` for automatic discovery, or pass an
explicit checkpoint path. See :ref:`pretrained-checkpoints` for the publication scope and the
command that lists the targeted task matrix.
explicit checkpoint path. See :ref:`pretrained-checkpoints` for checkpoint availability.


How It Works (High Level)
Expand Down Expand Up @@ -276,7 +269,7 @@ configuration are needed.
- **Critical traced operations should avoid unsupported third-party libraries.** PyTorch
operations are the best-supported path. NumPy conversions inside the traced node can be
captured when they do not cross the graph boundary, but external library calls may not be
traceable. Warp operations will be supported in the future by this export path.
traceable. This export path does not currently support Warp operations.


Verifying an Export
Expand Down Expand Up @@ -305,16 +298,6 @@ For details on ONNX, JIT, and PT2 export formats, see the
`LEAPP export guide <https://nvidia-isaac.github.io/leapp/guides/export.html>`__.


Recurrent Policies

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning · Scope Complexity — Recurrent policy documentation removed

This section was the only statement that actor-side LSTM state is auto-detected, registered in feedback_flow, stored in .safetensors, and that other recurrent architectures are unsupported. The intro still claims recurrent-state handling. Restore it.

^^^^^^^^^^^^^^^^^^

LSTM recurrent policies are supported automatically. The exporters detect actor-side LSTM
state for RSL-RL, RL-Games, skrl, and Stable-Baselines3 policies, register it as LEAPP feedback
state, and ensure it appears in the ``feedback_flow`` section of the output YAML. The initial
hidden state values are saved in the ``.safetensors`` file. Other recurrent architectures are
not currently supported by these exporters.


To run an exported policy in Isaac Lab, see the
:doc:`deployment guide <deploying_exported_policies_with_leapp>`.

Expand Down
Loading