Skip to content

Commit 9f231fe

Browse files
committed
Merge remote-tracking branch 'remotes/origin/develop' into xul/determinism
2 parents d143ef3 + dd5a21a commit 9f231fe

49 files changed

Lines changed: 3266 additions & 37 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
466 KB
Loading

docs/source/experimental-features/bleeding-edge.rst

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,144 @@ Directly integrating such features before they are complete and without feedback
99

1010
To address this, some major features will be released as Experimental Feature Branches.
1111
This way, the community can experiment with and contribute to the feature before it's fully integrated, reducing the likelihood of being derailed by unexpected and new errors.
12+
13+
RL Post-Training for VLA Models
14+
---------------------------------
15+
16+
`RLinf <https://github.com/RLinf/RLinf.git>`_ is a flexible and scalable open-source RL infrastructure designed for
17+
Embodied and Agentic AI. This integration enables **reinforcement learning fine-tuning of Vision-Language-Action
18+
(VLA) models** (e.g., GR00T, OpenVLA) on Isaac Lab simulation tasks.
19+
20+
The typical workflow follows three stages:
21+
22+
1. **Data collection** — Collect demonstration data from the Isaac Lab environment (e.g., via teleoperation or scripted policy).
23+
2. **Base model training** — Train a VLA base model (e.g., GR00T) on the collected demonstrations using supervised learning.
24+
3. **RL fine-tuning** — Fine-tune the pretrained VLA model on the Isaac Lab task using RLinf with PPO / Actor-Critic / SAC.
25+
26+
Overview
27+
~~~~~~~~
28+
29+
The RLinf integration allows Isaac Lab users to:
30+
31+
- Fine-tune pretrained VLA models on Isaac Lab tasks using PPO / Actor-Critic / SAC
32+
- Leverage RLinf's FSDP-based distributed training across multiple GPUs/nodes
33+
- Define observation/action mappings from Isaac Lab to GR00T format via a single YAML config
34+
- Register Isaac Lab tasks into RLinf without modifying RLinf source code
35+
36+
Architecture
37+
~~~~~~~~~~~~
38+
39+
.. code-block:: text
40+
41+
┌────────────────────────────────────────────────────────────────┐
42+
│ RLinf Runner │
43+
│ (EmbodiedRunner / EvalRunner) │
44+
├────────────────┬──────────────────────┬────────────────────────┤
45+
│ Actor Worker │ Rollout Worker │ Env Worker │
46+
│ (FSDP) │ (HF Inference) │ (IsaacLab Sim) │
47+
│ │ │ │
48+
│ Policy │ Multi-step rollout │ IsaacLabGenericEnv │
49+
│ Update │ with VLA model │ ├─ _make_env_function │
50+
│ │ │ ├─ _wrap_obs │
51+
│ │ │ └─ _wrap_action │
52+
└────────────────┴──────────────────────┴────────────────────────┘
53+
54+
**Data flow:**
55+
56+
1. ``EnvWorker`` runs Isaac Lab simulation and converts observations to RLinf format
57+
2. ``RolloutWorker`` runs VLA model inference (e.g., GR00T) to produce actions
58+
3. Actions are converted back to Isaac Lab format and stepped in the environment
59+
4. ``ActorWorker`` updates the VLA model with PPO/actor-critic loss via FSDP
60+
61+
Prerequisites
62+
~~~~~~~~~~~~~
63+
64+
- **Isaac Lab** installed and configured
65+
- **Isaac-GR00T** repo (for VLA inference and data transforms)
66+
- A **pretrained VLA checkpoint** in HuggingFace format
67+
- Multi-GPU setup recommended (FSDP requires at least 1 GPU)
68+
69+
Installation
70+
~~~~~~~~~~~~
71+
72+
From the Isaac Lab root directory:
73+
74+
.. code-block:: bash
75+
76+
# Install isaaclab_contrib with the RLinf extra
77+
pip install -e "source/isaaclab_contrib[rlinf]" --ignore-requires-python
78+
79+
# Install Isaac-GR00T (pinned version)
80+
git clone https://github.com/NVIDIA/Isaac-GR00T.git
81+
cd Isaac-GR00T
82+
git checkout 4af2b622892f7dcb5aae5a3fb70bcb02dc217b96
83+
pip install -e .[base] --no-deps
84+
cd ../
85+
86+
Quick Start
87+
~~~~~~~~~~~
88+
89+
**Training** — RL fine-tuning of a pretrained VLA model:
90+
91+
.. code-block:: bash
92+
93+
python scripts/reinforcement_learning/rlinf/train.py \
94+
--task Isaac-Assemble-Trocar-G129-Dex3-v0 \
95+
--config_path source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/assemble_trocar/config \
96+
--config_name isaaclab_ppo_gr00t_assemble_trocar
97+
98+
**Evaluation** — Evaluate a trained checkpoint with video recording:
99+
100+
.. code-block:: bash
101+
102+
python scripts/reinforcement_learning/rlinf/play.py \
103+
--task Isaac-Assemble-Trocar-G129-Dex3-Eval-v0 \
104+
--model_path /path/to/checkpoint \
105+
--config_path source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/assemble_trocar/config \
106+
--config_name isaaclab_ppo_gr00t_assemble_trocar \
107+
--video
108+
109+
Configuration
110+
~~~~~~~~~~~~~
111+
112+
All configuration lives in a **single YAML file** loaded by `Hydra <https://hydra.cc/>`_.
113+
The key configuration block is the ``env.train.isaaclab`` section, which defines how Isaac Lab observations
114+
are converted to GR00T format:
115+
116+
.. code-block:: yaml
117+
118+
isaaclab: &isaaclab_config
119+
task_description: "assemble trocar from tray"
120+
121+
# IsaacLab → RLinf observation mapping
122+
main_images: "front_camera"
123+
extra_view_images:
124+
- "left_wrist_camera"
125+
- "right_wrist_camera"
126+
states:
127+
- key: "robot_joint_state"
128+
slice: [15, 29]
129+
- key: "robot_dex3_joint_state"
130+
131+
# GR00T → IsaacLab action conversion
132+
action_mapping:
133+
prefix_pad: 15
134+
suffix_pad: 0
135+
136+
Key Files
137+
~~~~~~~~~
138+
139+
.. code-block:: text
140+
141+
scripts/reinforcement_learning/rlinf/
142+
├── README.md # Detailed documentation
143+
├── train.py # Training entry point
144+
├── play.py # Evaluation entry point
145+
└── cli_args.py # Shared CLI argument definitions
146+
147+
source/isaaclab_contrib/isaaclab_contrib/rl/rlinf/
148+
├── __init__.py
149+
└── extension.py # Task registration, obs/action conversion
150+
151+
For detailed configuration options, CLI arguments, and how to add new tasks,
152+
see ``scripts/reinforcement_learning/rlinf/README.md``.

docs/source/features/isaac_teleop.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,14 @@ Key ``IsaacTeleopCfg`` fields:
685685
* ``xr_cfg`` -- :class:`~isaaclab_teleop.XrCfg` for anchor configuration (see below).
686686
* ``plugins`` -- list of Isaac Teleop plugin configurations (e.g. Manus).
687687
* ``sim_device`` -- torch device string (default ``"cuda:0"``).
688+
* ``retargeting_execution`` -- IsaacTeleop retargeting execution settings.
689+
Defaults to ``RetargetingExecutionConfig(mode="pipelined")`` with
690+
``DeadlinePacingConfig(safety_margin_s=0.025)`` so retargeting can run on
691+
the IsaacTeleop worker instead of blocking the simulation loop.
692+
The 25 ms safety margin staggers IsaacTeleop's Python work behind Isaac
693+
Lab's step Python, giving native work such as rendering time to overlap
694+
instead of having both Python stacks contend for the GIL at the start of
695+
the step.
688696

689697
.. warning::
690698

docs/source/overview/developer-guide/development.rst

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,21 @@ Custom Extension Dependency Management
8181
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8282

8383
Certain extensions may have dependencies which require the installation of additional packages before the extension
84-
can be used. While Python dependencies are handled by the `setuptools <https://setuptools.pypa.io/en/latest/>`__
85-
package and specified in the ``setup.py`` file, non-Python dependencies such as `ROS <https://www.ros.org/>`__
86-
packages or `apt <https://en.wikipedia.org/wiki/APT_(software)>`__ packages are not handled by setuptools.
87-
Handling these kinds of dependencies requires an additional procedure.
84+
can be used. Python dependencies are handled by the `setuptools <https://setuptools.pypa.io/en/latest/>`__
85+
package and specified in the ``setup.py`` file. Non-Python dependencies such as
86+
`ROS <https://www.ros.org/>`__ packages or `apt <https://en.wikipedia.org/wiki/APT_(software)>`__
87+
packages are not handled by setuptools. Handling these kinds of dependencies requires an additional procedure.
8888

89-
There are two types of dependencies that can be specified in the ``extension.toml`` file
89+
There are three types of dependencies that can be specified in the ``extension.toml`` file
9090
under the ``isaac_lab_settings`` section:
9191

9292
1. **apt_deps**: A list of apt packages that need to be installed. These are installed using the
9393
`apt <https://ubuntu.com/server/docs/package-management>`__ package manager.
9494
2. **ros_ws**: The path to the ROS workspace that contains the ROS packages. These are installed using
9595
the `rosdep <https://docs.ros.org/en/humble/Tutorials/Intermediate/Rosdep.html>`__ dependency manager.
96+
3. **pip_upgrade_dependencies**: A list of ``install_requires`` dependency names that should be explicitly
97+
upgraded after installing the extension with ``./isaaclab.sh --install``. List package names only. Version
98+
ranges, extras, and platform markers are read from the installed extension metadata generated from ``setup.py``.
9699

97100
As an example, the following ``extension.toml`` file specifies the dependencies for the extension:
98101

@@ -106,8 +109,11 @@ As an example, the following ``extension.toml`` file specifies the dependencies
106109
# note: if this path is relative, it is relative to the extension directory's root
107110
ros_ws = "/home/user/catkin_ws"
108111
109-
These dependencies are installed using the ``install_deps.py`` script provided in the ``tools`` directory.
110-
To install all dependencies for all extensions, run the following command:
112+
# Python dependency names to upgrade after installing this extension
113+
pip_upgrade_dependencies = ["example_package"]
114+
115+
The ``apt_deps`` and ``ros_ws`` dependencies are installed using the ``install_deps.py`` script provided in the
116+
``tools`` directory. To install all apt and ROS dependencies for all extensions, run the following command:
111117

112118
.. code-block:: bash
113119
@@ -121,6 +127,9 @@ To install all dependencies for all extensions, run the following command:
121127
and ``Dockerfile.ros2``. This ensures that all the 'apt' and 'rosdep' dependencies are installed
122128
before building the extensions respectively.
123129

130+
The ``pip_upgrade_dependencies`` entries are handled by ``./isaaclab.sh --install`` after the extension's editable
131+
pip install completes.
132+
124133

125134
Standalone applications
126135
~~~~~~~~~~~~~~~~~~~~~~~

docs/source/overview/environments.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ for the lift-cube environment:
204204
+-------------------------+------------------------------+-----------------------------------------------------------------------------+------------------------------+
205205
| |cabi_openarm_uni| | |cabi_openarm_uni-link| | Grasp the handle of a cabinet's drawer and open it with the OpenArm robot | |
206206
+-------------------------+------------------------------+-----------------------------------------------------------------------------+------------------------------+
207+
| |g1_assemble_trocar| | |g1_assemble_trocar-link| | Assemble trocar with a Unitree G1 humanoid robot with Dex3 hands | |
208+
+-------------------------+------------------------------+-----------------------------------------------------------------------------+------------------------------+
207209

208210
.. |reach-franka| image:: ../_static/tasks/manipulation/franka_reach.jpg
209211
.. |reach-ur10| image:: ../_static/tasks/manipulation/ur10_reach.jpg
@@ -228,6 +230,7 @@ for the lift-cube environment:
228230
.. |reach_openarm_uni| image:: ../_static/tasks/manipulation/openarm_uni_reach.jpg
229231
.. |lift_openarm_uni| image:: ../_static/tasks/manipulation/openarm_uni_lift.jpg
230232
.. |cabi_openarm_uni| image:: ../_static/tasks/manipulation/openarm_uni_open_drawer.jpg
233+
.. |g1_assemble_trocar| image:: ../_static/tasks/manipulation/g1_assemble_trocar.jpg
231234

232235
.. |reach-franka-link| replace:: `Isaac-Reach-Franka-v0 <../../../source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/reach/config/franka/joint_pos_env_cfg.py>`__
233236
.. |reach-ur10-link| replace:: `Isaac-Reach-UR10-v0 <../../../source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/reach/config/ur_10/joint_pos_env_cfg.py>`__
@@ -261,6 +264,7 @@ for the lift-cube environment:
261264
.. |reach_openarm_uni-link| replace:: `Isaac-Reach-OpenArm-v0 <../../../source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/reach/config/openarm/unimanual/joint_pos_env_cfg.py>`__
262265
.. |lift_openarm_uni-link| replace:: `Isaac-Lift-Cube-OpenArm-v0 <../../../source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/lift/config/openarm/joint_pos_env_cfg.py>`__
263266
.. |cabi_openarm_uni-link| replace:: `Isaac-Open-Drawer-OpenArm-v0 <../../../source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/cabinet/config/openarm/joint_pos_env_cfg.py>`__
267+
.. |g1_assemble_trocar-link| replace:: `Isaac-Assemble-Trocar-G129-Dex3-v0 <../../../source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/assemble_trocar/g129_dex3_env_cfg.py>`__
264268

265269

266270
Contact-rich Manipulation
@@ -769,6 +773,11 @@ inferencing, including reading from an already trained checkpoint and disabling
769773
- Manager Based
770774
- **rsl_rl** (PPO), **rl_games** (PPO), **skrl** (PPO), **sb3** (PPO)
771775
- ``newton_mjwarp``, ``physx``
776+
* - Isaac-Assemble-Trocar-G129-Dex3-v0
777+
- Isaac-Assemble-Trocar-G129-Dex3-Eval-v0
778+
- Manager Based
779+
- **rlinf** (PPO)
780+
-
772781
* - Isaac-Cart-Double-Pendulum-Direct-v0
773782
-
774783
- Direct

scripts/reinforcement_learning/rlinf/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ python train.py
8181
python train.py --config_name isaaclab_ppo_gr00t_assemble_trocar
8282

8383
# Training with task override
84-
python train.py --task Isaac-Assemble-Trocar-G129-Dex3-RLinf-v0
84+
python train.py --task Isaac-Assemble-Trocar-G129-Dex3-v0
8585

8686
# Training with custom settings
8787
python train.py --num_envs 64 --max_epochs 1000
@@ -94,13 +94,13 @@ python train.py --list_tasks
9494

9595
```bash
9696
# Evaluate a trained checkpoint
97-
python play.py --model_path /path/to/checkpoint
97+
python play.py --task Isaac-Assemble-Trocar-G129-Dex3-Eval-v0 --model_path /path/to/checkpoint
9898

9999
# Evaluate with video recording
100-
python play.py --model_path /path/to/checkpoint --video
100+
python play.py --task Isaac-Assemble-Trocar-G129-Dex3-Eval-v0 --model_path /path/to/checkpoint --video
101101

102102
# Evaluate with specific number of environments
103-
python play.py --model_path /path/to/checkpoint --num_envs 8
103+
python play.py --task Isaac-Assemble-Trocar-G129-Dex3-Eval-v0 --model_path /path/to/checkpoint --num_envs 8
104104
```
105105

106106
## Configuration
@@ -132,7 +132,7 @@ env:
132132
total_num_envs: 4
133133
max_episode_steps: 256
134134
init_params:
135-
id: "Isaac-Assemble-Trocar-G129-Dex3-RLinf-v0"
135+
id: "Isaac-Assemble-Trocar-G129-Dex3-v0"
136136
isaaclab: &isaaclab_config # IsaacLab ↔ RLinf mapping (see below)
137137
...
138138
eval:
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Fixed
2+
^^^^^
3+
4+
* Fixed extension installation to honor ``pip_upgrade_dependencies`` declared
5+
in ``config/extension.toml``.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Added
2+
^^^^^
3+
4+
* Added :meth:`~isaaclab.scene.InteractiveScene.initialize_renderers` to
5+
pre-create renderer backends for all scene sensors with a
6+
``renderer_cfg`` against the shared
7+
:class:`~isaaclab.renderers.render_context.RenderContext`. The method is
8+
idempotent and is now invoked from
9+
:class:`~isaaclab.envs.DirectRLEnv`,
10+
:class:`~isaaclab.envs.DirectMARLEnv`,
11+
:class:`~isaaclab.envs.ManagerBasedEnv`, and
12+
:class:`~isaaclab.envs.LeappDeploymentEnv` after scene construction so
13+
that renderer backend creation order is deterministic and front-loaded
14+
before the first :meth:`~isaaclab.sim.SimulationContext.reset`.
15+
* Added :meth:`~isaaclab.renderers.base_renderer.BaseRenderer.initialize`
16+
post-physics lifecycle hook (default no-op) that runs once per backend
17+
after :meth:`~isaaclab.sim.SimulationContext.reset` builds physics
18+
models. ``__init__`` now defines the pre-physics phase (eagerly invoked
19+
by :meth:`~isaaclab.scene.InteractiveScene.initialize_renderers`) and
20+
``initialize`` defines the post-physics phase, letting backends whose
21+
setup needs scene data (e.g. a built Newton model) defer that work
22+
cleanly. Driven by
23+
:meth:`~isaaclab.renderers.render_context.RenderContext.ensure_initialize`,
24+
registered on
25+
:class:`~isaaclab.physics.physics_manager.PhysicsEvent` ``PHYSICS_READY``
26+
by :class:`~isaaclab.sim.SimulationContext` at ``order=5`` so it fires
27+
before sensor/asset callbacks (``order=10``). This decouples renderer
28+
post-physics setup from camera initialization. Backends created lazily
29+
after PHYSICS_READY are eagerly initialized at
30+
:meth:`~isaaclab.renderers.render_context.RenderContext.get_renderer`
31+
time.

0 commit comments

Comments
 (0)