Skip to content

Commit c452cf4

Browse files
committed
migrated all leapp related things to isaaclab cli command
1 parent 5698bac commit c452cf4

25 files changed

Lines changed: 399 additions & 400 deletions

docs/source/policy_deployment/05_leapp/deploying_exported_policies_with_leapp.rst

Lines changed: 28 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ simulation without the training infrastructure. This is the Isaac Lab deployment
66
LEAPP-exported policies and is useful for validating that the packaged policy still behaves
77
correctly when driven through the deployment stack instead of the training stack.
88

9-
Run the deployment script with the task name and the exported LEAPP ``.yaml`` file. Use the
9+
Run the deployment command with the task name and the exported LEAPP ``.yaml`` file. Use the
1010
same backend extra and backend selector that you used for training and export, and pass a
1111
``--viz`` option when you want a viewport:
1212

@@ -23,49 +23,43 @@ same backend extra and backend selector that you used for training and export, a
2323
.. code-block:: bash
2424
2525
# Newton backend (kitless)
26-
uv run --extra leapp python \
27-
scripts/reinforcement_learning/leapp/deploy.py \
26+
uv run --extra leapp isaaclab deploy_leapp \
2827
--task <TASK_NAME> \
29-
--leapp_model <PATH_TO_EXPORTED_LEAPP_YAML> \
28+
--pipeline <PATH_TO_EXPORTED_LEAPP_YAML> \
3029
--viz newton_gl physics=newton_mjwarp
3130
3231
# OV PhysX backend
33-
uv run --extra ovphysx,leapp python \
34-
scripts/reinforcement_learning/leapp/deploy.py \
32+
uv run --extra ovphysx,leapp isaaclab deploy_leapp \
3533
--task <TASK_NAME> \
36-
--leapp_model <PATH_TO_EXPORTED_LEAPP_YAML> \
34+
--pipeline <PATH_TO_EXPORTED_LEAPP_YAML> \
3735
--viz kit physics=ovphysx
3836
3937
# Isaac Sim PhysX backend
40-
OMNI_KIT_ACCEPT_EULA=Y ACCEPT_EULA=Y uv run --extra isaacsim,leapp python \
41-
scripts/reinforcement_learning/leapp/deploy.py \
38+
OMNI_KIT_ACCEPT_EULA=Y ACCEPT_EULA=Y uv run --extra isaacsim,leapp isaaclab deploy_leapp \
4239
--task <TASK_NAME> \
43-
--leapp_model <PATH_TO_EXPORTED_LEAPP_YAML> \
40+
--pipeline <PATH_TO_EXPORTED_LEAPP_YAML> \
4441
--viz kit physics=isaacsim_physx
4542
4643
.. tab-item:: isaaclab.sh / isaaclab.bat
4744

4845
.. code-block:: bash
4946
5047
# Newton backend (kitless)
51-
./isaaclab.sh -p \
52-
scripts/reinforcement_learning/leapp/deploy.py \
48+
./isaaclab.sh deploy_leapp \
5349
--task <TASK_NAME> \
54-
--leapp_model <PATH_TO_EXPORTED_LEAPP_YAML> \
50+
--pipeline <PATH_TO_EXPORTED_LEAPP_YAML> \
5551
--viz newton_gl physics=newton_mjwarp
5652
5753
# OV PhysX backend
58-
./isaaclab.sh -p \
59-
scripts/reinforcement_learning/leapp/deploy.py \
54+
./isaaclab.sh deploy_leapp \
6055
--task <TASK_NAME> \
61-
--leapp_model <PATH_TO_EXPORTED_LEAPP_YAML> \
56+
--pipeline <PATH_TO_EXPORTED_LEAPP_YAML> \
6257
--viz kit physics=ovphysx
6358
6459
# Isaac Sim PhysX backend
65-
OMNI_KIT_ACCEPT_EULA=Y ACCEPT_EULA=Y ./isaaclab.sh -p \
66-
scripts/reinforcement_learning/leapp/deploy.py \
60+
OMNI_KIT_ACCEPT_EULA=Y ACCEPT_EULA=Y ./isaaclab.sh deploy_leapp \
6761
--task <TASK_NAME> \
68-
--leapp_model <PATH_TO_EXPORTED_LEAPP_YAML> \
62+
--pipeline <PATH_TO_EXPORTED_LEAPP_YAML> \
6963
--viz kit physics=isaacsim_physx
7064
7165
.. tab-item:: :icon:`fa-brands fa-windows` Windows
@@ -78,47 +72,47 @@ same backend extra and backend selector that you used for training and export, a
7872
.. code-block:: batch
7973
8074
:: Newton backend (kitless)
81-
uv run --extra leapp python scripts\reinforcement_learning\leapp\deploy.py ^
75+
uv run --extra leapp isaaclab deploy_leapp ^
8276
--task <TASK_NAME> ^
83-
--leapp_model <PATH_TO_EXPORTED_LEAPP_YAML> ^
77+
--pipeline <PATH_TO_EXPORTED_LEAPP_YAML> ^
8478
--viz newton_gl physics=newton_mjwarp
8579
8680
:: OV PhysX backend
87-
uv run --extra ovphysx,leapp python scripts\reinforcement_learning\leapp\deploy.py ^
81+
uv run --extra ovphysx,leapp isaaclab deploy_leapp ^
8882
--task <TASK_NAME> ^
89-
--leapp_model <PATH_TO_EXPORTED_LEAPP_YAML> ^
83+
--pipeline <PATH_TO_EXPORTED_LEAPP_YAML> ^
9084
--viz kit physics=ovphysx
9185
9286
:: Isaac Sim PhysX backend
9387
set OMNI_KIT_ACCEPT_EULA=Y
9488
set ACCEPT_EULA=Y
95-
uv run --extra isaacsim,leapp python scripts\reinforcement_learning\leapp\deploy.py ^
89+
uv run --extra isaacsim,leapp isaaclab deploy_leapp ^
9690
--task <TASK_NAME> ^
97-
--leapp_model <PATH_TO_EXPORTED_LEAPP_YAML> ^
91+
--pipeline <PATH_TO_EXPORTED_LEAPP_YAML> ^
9892
--viz kit physics=isaacsim_physx
9993
10094
.. tab-item:: isaaclab.sh / isaaclab.bat
10195

10296
.. code-block:: batch
10397
10498
:: Newton backend (kitless)
105-
isaaclab.bat -p scripts\reinforcement_learning\leapp\deploy.py ^
99+
isaaclab.bat deploy_leapp ^
106100
--task <TASK_NAME> ^
107-
--leapp_model <PATH_TO_EXPORTED_LEAPP_YAML> ^
101+
--pipeline <PATH_TO_EXPORTED_LEAPP_YAML> ^
108102
--viz newton_gl physics=newton_mjwarp
109103
110104
:: OV PhysX backend
111-
isaaclab.bat -p scripts\reinforcement_learning\leapp\deploy.py ^
105+
isaaclab.bat deploy_leapp ^
112106
--task <TASK_NAME> ^
113-
--leapp_model <PATH_TO_EXPORTED_LEAPP_YAML> ^
107+
--pipeline <PATH_TO_EXPORTED_LEAPP_YAML> ^
114108
--viz kit physics=ovphysx
115109
116110
:: Isaac Sim PhysX backend
117111
set OMNI_KIT_ACCEPT_EULA=Y
118112
set ACCEPT_EULA=Y
119-
isaaclab.bat -p scripts\reinforcement_learning\leapp\deploy.py ^
113+
isaaclab.bat deploy_leapp ^
120114
--task <TASK_NAME> ^
121-
--leapp_model <PATH_TO_EXPORTED_LEAPP_YAML> ^
115+
--pipeline <PATH_TO_EXPORTED_LEAPP_YAML> ^
122116
--viz kit physics=isaacsim_physx
123117
124118
@@ -135,7 +129,7 @@ entities.
135129
Match the Training and Export Configuration
136130
-------------------------------------------
137131

138-
The deployment script rebuilds the task configuration from ``--task``. It cannot infer the
132+
The deployment command rebuilds the task configuration from ``--task``. It cannot infer the
139133
training configuration from the checkpoint or LEAPP YAML, so you must provide the same
140134
configuration selections used for training and export. The task name, LEAPP YAML, and
141135
checkpoint must describe the same policy.
@@ -156,10 +150,9 @@ For example, append the preset after the deployment options:
156150

157151
.. code-block:: bash
158152
159-
uv run --extra leapp python \
160-
scripts/reinforcement_learning/leapp/deploy.py \
153+
uv run --extra leapp isaaclab deploy_leapp \
161154
--task Isaac-Humanoid \
162-
--leapp_model <PATH_TO_EXPORTED_LEAPP_YAML> \
155+
--pipeline <PATH_TO_EXPORTED_LEAPP_YAML> \
163156
--viz newton_gl \
164157
presets=newton_mjwarp
165158

docs/source/policy_deployment/05_leapp/exporting_direct_workflow_policies_with_leapp.rst

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ environment code. During export, LEAPP traces the annotated tensors and builds a
1919
intermediate representation of the full policy pipeline. These annotations remain
2020
dormant during normal environment execution and only add a small amount of
2121
overhead until export time. They are activated by
22-
``scripts/reinforcement_learning/leapp/rsl_rl/export.py`` when you run the export flow.
22+
``isaaclab export --rl_library rsl_rl`` when you run the export flow.
2323

2424
This tutorial uses ``scripts/tutorials/06_deploy/anymal_c_env.py`` as a concrete
2525
example of adding LEAPP annotations to a Direct workflow environment. Apply the same
@@ -71,11 +71,10 @@ For example, on Isaac Sim PhysX:
7171

7272
.. code-block:: bash
7373
74-
# Newton: uv run --extra leapp python ... physics=newton_mjwarp
75-
# OV PhysX: uv run --extra ovphysx,leapp python ... physics=ovphysx
74+
# Newton: uv run --extra leapp isaaclab export --rl_library rsl_rl ... physics=newton_mjwarp
75+
# OV PhysX: uv run --extra ovphysx,leapp isaaclab export --rl_library rsl_rl ... physics=ovphysx
7676
# Isaac Sim:
77-
OMNI_KIT_ACCEPT_EULA=Y ACCEPT_EULA=Y uv run --extra isaacsim,leapp python \
78-
scripts/reinforcement_learning/leapp/rsl_rl/export.py \
77+
OMNI_KIT_ACCEPT_EULA=Y ACCEPT_EULA=Y uv run --extra isaacsim,leapp isaaclab export --rl_library rsl_rl \
7978
--task <TASK_NAME> \
8079
--checkpoint <PATH_TO_CHECKPOINT> \
8180
--export_save_path <EXPORT_PATH> \
@@ -85,7 +84,7 @@ For example, on Isaac Sim PhysX:
8584

8685
.. code-block:: bash
8786
88-
./isaaclab.sh -p scripts/reinforcement_learning/leapp/rsl_rl/export.py \
87+
./isaaclab.sh export --rl_library rsl_rl \
8988
--task <TASK_NAME> \
9089
--checkpoint <PATH_TO_CHECKPOINT> \
9190
--export_save_path <EXPORT_PATH> \
@@ -100,12 +99,12 @@ For example, on Isaac Sim PhysX:
10099

101100
.. code-block:: batch
102101
103-
:: Newton: uv run --extra leapp python ... physics=newton_mjwarp
104-
:: OV PhysX: uv run --extra ovphysx,leapp python ... physics=ovphysx
102+
:: Newton: uv run --extra leapp isaaclab export --rl_library rsl_rl ... physics=newton_mjwarp
103+
:: OV PhysX: uv run --extra ovphysx,leapp isaaclab export --rl_library rsl_rl ... physics=ovphysx
105104
:: Isaac Sim:
106105
set OMNI_KIT_ACCEPT_EULA=Y
107106
set ACCEPT_EULA=Y
108-
uv run --extra isaacsim,leapp python scripts\reinforcement_learning\leapp\rsl_rl\export.py ^
107+
uv run --extra isaacsim,leapp isaaclab export --rl_library rsl_rl ^
109108
--task <TASK_NAME> ^
110109
--checkpoint <PATH_TO_CHECKPOINT> ^
111110
--export_save_path <EXPORT_PATH> ^
@@ -115,7 +114,7 @@ For example, on Isaac Sim PhysX:
115114

116115
.. code-block:: batch
117116
118-
isaaclab.bat -p scripts\reinforcement_learning\leapp\rsl_rl\export.py ^
117+
isaaclab.bat export --rl_library rsl_rl ^
119118
--task <TASK_NAME> ^
120119
--checkpoint <PATH_TO_CHECKPOINT> ^
121120
--export_save_path <EXPORT_PATH> ^
@@ -140,7 +139,7 @@ exported artifacts. If you omit it, the export is written next to the checkpoint
140139

141140
This tutorial covers exporting direct rl policies only. direct rl
142141
policies are not currently supported by
143-
``scripts/reinforcement_learning/leapp/deploy.py``.
142+
``isaaclab deploy_leapp``.
144143

145144
For more information on the export arguments, see the
146145
:doc:`standard LEAPP deployment workflow <exporting_policies_with_leapp>`.
@@ -185,8 +184,8 @@ collects the tensors that are passed to the policy.
185184
``annotate.input_tensors()`` wraps a tensor so LEAPP can trace all downstream
186185
operations that depend on it. The function takes two important arguments:
187186

188-
- ``self.spec.id`` identifies the node that owns the tensor. When you use
189-
``export.py``, this ID matches the exported policy node.
187+
- ``self.spec.id`` identifies the node that owns the tensor. When you run
188+
``isaaclab export``, this ID matches the exported policy node.
190189
- The second argument is a dictionary that maps a unique tensor name to the
191190
tensor itself. LEAPP uses these names in the exported metadata and for
192191
debugging.

0 commit comments

Comments
 (0)