Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
0155773
cable insertion training
curiep Apr 29, 2026
da666c7
Fix cable-insertion grasp by aligning fingertips with plug mesh
curiep May 1, 2026
f6a6b55
Align cable-insertion ROS inference cfg with Hubble Lab Rizon mount
curiep May 1, 2026
3c84676
Add USD inspection and flattening tools for plug/socket assets
curiep May 1, 2026
31d4fe6
Register rsl_rl agent on gear-assembly PLAY tasks
curiep May 1, 2026
bff098c
Fixes as per Iretis codebase as reference.
shauryadNv May 1, 2026
5145ab2
Fixed plug grasp issues.
shauryadNv May 5, 2026
d004117
Fixed sim rendering settings.
shauryadNv May 5, 2026
df3d1b2
Env fixes as per working version like moving to task space, param val…
shauryadNv May 6, 2026
b6297f7
Reduced plug randomization.
shauryadNv May 6, 2026
c6f60ba
Adding scripts, env and assets for displayport asset checking.
shauryadNv May 29, 2026
ecb8378
Env for displayport cable insertion and required fixes in asset loading.
shauryadNv Jun 8, 2026
972fa1e
Minor fixes.
shauryadNv Jun 8, 2026
c8f2d7c
Viewer fix.
shauryadNv Jun 8, 2026
d0a7eac
Add simready USD assets for DisplayPort plug and socket
shauryadNv Jun 8, 2026
8ae2f98
Changed from wall mount to table-top mount.
shauryadNv Jun 9, 2026
3eeeedb
Added fixed assets and removed custom load-time fixes.
shauryadNv Jun 11, 2026
b401862
Fixed socket asset by re-enabling missing parts.
shauryadNv Jun 11, 2026
3cb1c80
New fixed assets and reduced contact offset for better behavior.
shauryadNv Jun 11, 2026
79e355e
Updated training env to use new assets.
shauryadNv Jun 11, 2026
c52ea1c
Adding SDF assets and using that in training env.
shauryadNv Jun 17, 2026
f8826d9
Debug scripts.
shauryadNv Jun 22, 2026
0f08392
Fixed plug SDF asset and env setup and added robot insertion test.
shauryadNv Jun 23, 2026
6b0d4bb
Fixed plug and socket SDF assets.
shauryadNv Jun 23, 2026
7873866
Fixed socket sdf asset (removed body4/inner walls) and updated env.
shauryadNv Jun 24, 2026
6ca8a96
Fixed env setup.
shauryadNv Jun 24, 2026
8597c09
Increased socket pose randomization.
shauryadNv Jun 24, 2026
0b50c99
Socket rotation randomization (2 deg).
shauryadNv Jun 24, 2026
2d88535
Reverted to prev env setup and removed rot randomization in socket.
shauryadNv Jun 24, 2026
8e0db5e
Adding socket rot randomization and moving to new socket setup.
shauryadNv Jun 25, 2026
291ad77
Increased socket z randomization to 2 cm.
shauryadNv Jun 25, 2026
a25a527
Removed socket rot rand.
shauryadNv Jun 25, 2026
7f59b60
Decreased socket z rand to 1cm.
shauryadNv Jun 25, 2026
a09281b
Fixed task space env setup to vertical mount.
shauryadNv Jun 29, 2026
1e41830
Fixed task space env to use TCP pose instead of flange.
shauryadNv Jun 29, 2026
24ee8dd
Adding socket rot randomization in taskspace env.
shauryadNv Jun 30, 2026
3c30047
Increased socket z randomization to 2 cm in taskspace.
shauryadNv Jun 30, 2026
499280c
Removed socket rot rand from taskspace.
shauryadNv Jun 30, 2026
ad60264
Enabled curriculum training for task space.
shauryadNv Jun 30, 2026
453fd1c
Added no joint vel variant for joint space policy.
shauryadNv Jun 30, 2026
00074f5
2cm for z and 2 deg rot for socket randomization.
shauryadNv Jun 30, 2026
ad6acf8
Removed socket rot rand from taskspace.
shauryadNv Jul 1, 2026
c5029c0
Added success rate logging.
shauryadNv Jul 1, 2026
915da0c
Fixed taskspace movement issue.
shauryadNv Jul 2, 2026
3e1720e
Removed socket rot rand from taskspace.
shauryadNv Jul 2, 2026
066e604
Disabled curriculum training.
shauryadNv Jul 2, 2026
79a15eb
Sysid based changes.
shauryadNv Jul 2, 2026
d3e7b2c
Adding socket rot randomization in joint space env.
shauryadNv Jul 2, 2026
7583544
Fixed sysid integration issues.
shauryadNv Jul 2, 2026
2fe92e6
Removed socket rot rand from jointspace.
shauryadNv Jul 2, 2026
ba2d759
Added curriculum support for joint space setup.
shauryadNv Jul 2, 2026
a4ce8cd
Added rotation rand in socket for joint space.
shauryadNv Jul 2, 2026
1774b73
Disabled sysid changes in jointspace.
shauryadNv Jul 2, 2026
66af434
Removed socket rot rand from jointspace.
shauryadNv Jul 2, 2026
3dade3d
Added rot rand and disabled curriculum training.
shauryadNv Jul 6, 2026
4ca15d2
Fixed curriculum training scheduling.
shauryadNv Jul 6, 2026
ef132f2
Relocate DisplayPort cable_insertion under contrib/deploy after upstr…
shauryadNv Jul 7, 2026
6da4b45
Prune DP cable insertion branch to training/inference essentials.
shauryadNv Jul 7, 2026
2765083
Formatting fixes.
shauryadNv Jul 7, 2026
afab7dd
Cleaned up comments, changes as per latest working policy setup.
shauryadNv Jul 16, 2026
bcde7e8
Formatting fixes.
shauryadNv Jul 16, 2026
5b28b68
Added documentation for dp cable insertion training.
shauryadNv Jul 17, 2026
0ff8a35
Minor bug fix.
shauryadNv Jul 20, 2026
96393d9
Add DisplayPort LEAPP export for refimage52
ashwinvkNV Jul 25, 2026
7c5bcd4
Canonicalize LEAPP Twist command element names
ashwinvkNV Jul 27, 2026
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

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/source/policy_deployment/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Below, you'll find detailed examples of various policies for training and deploy

01_io_descriptors/io_descriptors_101
02_gear_assembly/gear_assembly_policy
06_displayport_insertion/displayport_insertion_policy
03_compass_with_NuRec/compass_navigation_policy_with_NuRec
04_reach/reach_policy
05_leapp/exporting_policies_with_leapp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from isaaclab.assets import Articulation
from isaaclab.managers import CommandTerm
from isaaclab.markers import VisualizationMarkers
from isaaclab.utils.leapp.leapp_semantics import TWIST3_ELEMENT_NAMES

if TYPE_CHECKING:
from isaaclab.envs import ManagerBasedEnv
Expand Down Expand Up @@ -95,7 +96,7 @@ def __init__(self, cfg: UniformVelocityCommandCfg, env: ManagerBasedEnv):
# adds (optional) cmd kind and element names for leapp export
# during export, semantic data about this command will be used to annotate the command input
self.cfg.cmd_kind = self.cfg.cmd_kind or "command/body/velocity"
self.cfg.element_names = self.cfg.element_names or ["lin_vel_x", "lin_vel_y", "ang_vel_z"]
self.cfg.element_names = self.cfg.element_names or TWIST3_ELEMENT_NAMES

def __str__(self) -> str:
"""Return a string representation of the command generator."""
Expand Down
6 changes: 6 additions & 0 deletions source/isaaclab/isaaclab/utils/leapp/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ __all__ = [
"POSE6_ELEMENT_NAMES",
"POSE7_ELEMENT_NAMES",
"QUAT_XYZW_ELEMENT_NAMES",
"TWIST3_ELEMENT_NAMES",
"TWIST6_ELEMENT_NAMES",
"WRENCH6_ELEMENT_NAMES",
"XYZ_ELEMENT_NAMES",
"body_names_resolver",
Expand All @@ -22,6 +24,7 @@ __all__ = [
"build_command_connection",
"build_state_connection",
"build_write_connection",
"canonicalize_command_element_names",
"joint_names_resolver",
"leapp_tensor_semantics",
"patch_env_for_export",
Expand All @@ -38,6 +41,8 @@ from .leapp_semantics import (
POSE6_ELEMENT_NAMES,
POSE7_ELEMENT_NAMES,
QUAT_XYZW_ELEMENT_NAMES,
TWIST3_ELEMENT_NAMES,
TWIST6_ELEMENT_NAMES,
WRENCH6_ELEMENT_NAMES,
XYZ_ELEMENT_NAMES,
LeappTensorSemantics,
Expand All @@ -47,6 +52,7 @@ from .leapp_semantics import (
body_quat_resolver,
body_wrench_resolver,
body_xyz_resolver,
canonicalize_command_element_names,
joint_names_resolver,
leapp_tensor_semantics,
resolve_leapp_element_names,
Expand Down
12 changes: 9 additions & 3 deletions source/isaaclab/isaaclab/utils/leapp/export_annotator.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
from isaaclab.assets.articulation.base_articulation import BaseArticulation
from isaaclab.managers import ManagerTermBase

from .leapp_semantics import select_element_names
from .leapp_semantics import canonicalize_command_element_names, select_element_names
from .proxy import _ArticulationWriteProxy, _DataProxy, _EnvProxy, _ManagerTermProxy
from .utils import (
TracedProxyArray,
Expand Down Expand Up @@ -540,11 +540,17 @@ def wrapped(env, command_name=None, **kwargs):
command_cfg = None
with suppress(AttributeError, KeyError):
command_cfg = env.command_manager.get_term(leapp_input_name).cfg
kind = getattr(command_cfg, "cmd_kind", None)
element_names = canonicalize_command_element_names(
kind,
getattr(command_cfg, "element_names", None),
result,
)
sem = TensorSemantics(
name=leapp_input_name,
ref=result,
kind=getattr(command_cfg, "cmd_kind", None),
element_names=getattr(command_cfg, "element_names", None),
kind=kind,
element_names=element_names,
extra=build_command_connection(leapp_input_name),
)
return annotate.input_tensors(task_name, sem)
Expand Down
77 changes: 77 additions & 0 deletions source/isaaclab/isaaclab/utils/leapp/leapp_semantics.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,23 @@ class LeappTensorSemantics:
POSE7_ELEMENT_NAMES: list[str] = ["x", "y", "z", "qx", "qy", "qz", "qw"]
POSE6_ELEMENT_NAMES: list[str] = ["x", "y", "z", "angular_x", "angular_y", "angular_z"]
WRENCH6_ELEMENT_NAMES: list[str] = ["fx", "fy", "fz", "tx", "ty", "tz"]
TWIST3_ELEMENT_NAMES: list[str] = ["lin_vel_x", "lin_vel_y", "ang_vel_z"]
TWIST6_ELEMENT_NAMES: list[str] = [
"lin_vel_x",
"lin_vel_y",
"lin_vel_z",
"ang_vel_x",
"ang_vel_y",
"ang_vel_z",
]

_COMMAND_BODY_VELOCITY_KIND = "command/body/velocity"
_TWIST_ELEMENT_NAME_ALIASES = {
("lin_x", "lin_y", "ang_z"): TWIST3_ELEMENT_NAMES,
("lin_x", "lin_y", "lin_z", "ang_x", "ang_y", "ang_z"): TWIST6_ELEMENT_NAMES,
("linear_x", "linear_y", "angular_z"): TWIST3_ELEMENT_NAMES,
("linear_x", "linear_y", "linear_z", "angular_x", "angular_y", "angular_z"): TWIST6_ELEMENT_NAMES,
}


def select_element_names(names: list[str] | None, indices: Any = None) -> list[str] | None:
Expand All @@ -67,6 +84,66 @@ def select_element_names(names: list[str] | None, indices: Any = None) -> list[s
return None


def canonicalize_command_element_names(
kind: Any,
element_names: list[str] | list[list[str]] | None,
ref: Any | None = None,
) -> list[str] | list[list[str]] | None:
"""Return Deploy-compatible element names for command tensors.

Isaac ROS Deploy's Twist/TwistStamped converters publish body velocity
elements as ``lin_vel_*`` and ``ang_vel_*``. Older export configs used
shorter names such as ``lin_x`` / ``ang_x``. Canonicalize only the
command-body-velocity case so tensor ordering stays unchanged while the
exported metadata matches the runtime converter ``TensorSpec``.
"""
if getattr(kind, "value", kind) != _COMMAND_BODY_VELOCITY_KIND:
return element_names

width = None
with suppress(AttributeError, IndexError, TypeError):
width = int(ref.shape[-1])
if width is not None and width not in (3, 6):
raise ValueError(f"LEAPP command/body/velocity input must be 3D or 6D, but tensor width is {width}.")

if element_names is None:
if width == 3:
return TWIST3_ELEMENT_NAMES
if width == 6:
return TWIST6_ELEMENT_NAMES
return None

# Command tensors are flat. Nested names cannot match the current Deploy
# Twist converter TensorSpec.
if any(isinstance(name, (list, tuple)) for name in element_names):
raise ValueError("LEAPP command/body/velocity element names must be a flat list.")

names_tuple = tuple(element_names)
canonical_names = _TWIST_ELEMENT_NAME_ALIASES.get(names_tuple, list(element_names))
if len(canonical_names) == 3:
expected_names = TWIST3_ELEMENT_NAMES
elif len(canonical_names) == 6:
expected_names = TWIST6_ELEMENT_NAMES
else:
raise ValueError(
"LEAPP command/body/velocity input must have 3 or 6 element names, "
f"but got {len(canonical_names)}."
)

if width is not None and len(canonical_names) != width:
raise ValueError(
f"LEAPP command/body/velocity input has {len(canonical_names)} element names, "
f"but tensor width is {width}."
)
if canonical_names != expected_names:
raise ValueError(
"LEAPP command/body/velocity element names must match Isaac ROS Deploy Twist converter names. "
f"Got {list(element_names)}; expected {expected_names}."
)

return list(canonical_names)


def leapp_tensor_semantics(
*,
kind: Any = None,
Expand Down
56 changes: 55 additions & 1 deletion source/isaaclab_rl/test/export/test_leapp_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from isaaclab.utils import math as math_utils
from isaaclab.utils.leapp import utils as leapp_utils
from isaaclab.utils.leapp.export_annotator import ExportPatcher
from isaaclab.utils.leapp.leapp_semantics import InputKindEnum
from isaaclab.utils.leapp.leapp_semantics import InputKindEnum, TWIST6_ELEMENT_NAMES
from isaaclab.utils.leapp.proxy import _DataProxy, _EnvProxy


Expand Down Expand Up @@ -102,3 +102,57 @@ def test_projected_gravity_observation_exports_root_quat_w_input(monkeypatch: py
assert semantics.name == "robot_root_quat_w"
assert semantics.kind == InputKindEnum.BODY_ROTATION
assert semantics.extra == {"isaaclab_connection": "state:robot:root_quat_w"}


def test_generated_body_velocity_command_exports_deploy_twist_names(monkeypatch: pytest.MonkeyPatch):
"""Test legacy body-velocity command names are exported with Deploy Twist names."""
annotated_inputs = _capture_leapp_inputs(monkeypatch)
command_tensor = torch.zeros(2, 6, dtype=torch.float32)

def generated_commands(env, command_name=None, **kwargs):
return command_tensor

command_cfg = SimpleNamespace(
cmd_kind="command/body/velocity",
element_names=["lin_x", "lin_y", "lin_z", "ang_x", "ang_y", "ang_z"],
)
command_manager = SimpleNamespace(get_term=lambda name: SimpleNamespace(cfg=command_cfg))
env = SimpleNamespace(command_manager=command_manager)
term_cfg = SimpleNamespace(params={"command_name": "target_twist"})

patcher = ExportPatcher(export_method="onnx-dynamo")
patcher.task_name = "Isaac-Test-Task"

result = patcher._wrap_generated_commands(generated_commands, term_cfg)(env)

assert result is command_tensor
assert len(annotated_inputs) == 1
task_name, semantics = annotated_inputs[0]
assert task_name == "Isaac-Test-Task"
assert semantics.name == "target_twist"
assert semantics.kind == "command/body/velocity"
assert semantics.element_names == [TWIST6_ELEMENT_NAMES]
assert semantics.extra == {"isaaclab_connection": "command:target_twist"}


def test_generated_body_velocity_command_rejects_non_deploy_twist_names(monkeypatch: pytest.MonkeyPatch):
"""Test unknown body-velocity command names fail before exporting unusable YAML."""
_capture_leapp_inputs(monkeypatch)
command_tensor = torch.zeros(2, 6, dtype=torch.float32)

def generated_commands(env, command_name=None, **kwargs):
return command_tensor

command_cfg = SimpleNamespace(
cmd_kind="command/body/velocity",
element_names=["vx", "vy", "vz", "wx", "wy", "wz"],
)
command_manager = SimpleNamespace(get_term=lambda name: SimpleNamespace(cfg=command_cfg))
env = SimpleNamespace(command_manager=command_manager)
term_cfg = SimpleNamespace(params={"command_name": "target_twist"})

patcher = ExportPatcher(export_method="onnx-dynamo")
patcher.task_name = "Isaac-Test-Task"

with pytest.raises(ValueError, match="command/body/velocity element names"):
patcher._wrap_generated_commands(generated_commands, term_cfg)(env)
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

The deploy module includes:
- Reach environments for end-effector pose tracking
- Gear assembly environments for multi-gear insertion tasks
- Cable insertion environments for DisplayPort plug insertion tasks

"""
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause

"""DisplayPort cable insertion environments."""
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause

"""Configurations for arm-based cable insertion environments."""
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause

import gymnasium as gym

from . import agents

_INSERTION_ENV_ENTRY = (
"isaaclab_tasks.contrib.deploy.cable_insertion.insertion_env:DisplayportInsertionEnv"
)

##
# Register Gym environments.
##

# Flexiv Rizon 4s - Joint space
gym.register(
id="Isaac-Deploy-DisplayportInsertion-Rizon4s-Grav-v0",
entry_point=_INSERTION_ENV_ENTRY,
disable_env_checker=True,
kwargs={
"env_cfg_entry_point": f"{__name__}.joint_pos_env_cfg:Rizon4sGravDisplayportInsertionEnvCfg",
"rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:Rizon4sGravDisplayportInsertionRNNPPORunnerCfg",
},
)

# Flexiv Rizon 4s - Joint space Play
gym.register(
id="Isaac-Deploy-DisplayportInsertion-Rizon4s-Grav-Play-v0",
entry_point=_INSERTION_ENV_ENTRY,
disable_env_checker=True,
kwargs={
"env_cfg_entry_point": f"{__name__}.joint_pos_env_cfg:Rizon4sGravDisplayportInsertionEnvCfg_PLAY",
"rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:Rizon4sGravDisplayportInsertionRNNPPORunnerCfg",
},
)

# Flexiv Rizon 4s - Joint space without joint velocity
gym.register(
id="Isaac-Deploy-DisplayportInsertion-Rizon4s-Grav-NoJointVel-v0",
entry_point=_INSERTION_ENV_ENTRY,
disable_env_checker=True,
kwargs={
"env_cfg_entry_point": f"{__name__}.joint_pos_env_cfg:Rizon4sGravDisplayportInsertionNoJointVelEnvCfg",
"rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:Rizon4sGravDisplayportInsertionRNNPPORunnerCfg",
},
)

# Flexiv Rizon 4s - Joint space without joint velocity Play
gym.register(
id="Isaac-Deploy-DisplayportInsertion-Rizon4s-Grav-NoJointVel-Play-v0",
entry_point=_INSERTION_ENV_ENTRY,
disable_env_checker=True,
kwargs={
"env_cfg_entry_point": f"{__name__}.joint_pos_env_cfg:Rizon4sGravDisplayportInsertionNoJointVelEnvCfg_PLAY",
"rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:Rizon4sGravDisplayportInsertionRNNPPORunnerCfg",
},
)

# Flexiv Rizon 4s - Joint space ROS Inference without joint velocity
gym.register(
id="Isaac-Deploy-DisplayportInsertion-Rizon4s-Grav-NoJointVel-ROS-Inference-v0",
entry_point=_INSERTION_ENV_ENTRY,
disable_env_checker=True,
kwargs={
"env_cfg_entry_point": (
f"{__name__}.ros_inference_env_cfg:Rizon4sGravDisplayportInsertionNoJointVelROSInferenceEnvCfg"
),
"rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:Rizon4sGravDisplayportInsertionRNNPPORunnerCfg",
},
)

# Flexiv Rizon 4s - Joint space ROS Inference
gym.register(
id="Isaac-Deploy-DisplayportInsertion-Rizon4s-Grav-ROS-Inference-v0",
entry_point=_INSERTION_ENV_ENTRY,
disable_env_checker=True,
kwargs={
"env_cfg_entry_point": f"{__name__}.ros_inference_env_cfg:Rizon4sGravDisplayportInsertionROSInferenceEnvCfg",
"rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:Rizon4sGravDisplayportInsertionRNNPPORunnerCfg",
},
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause

"""Package containing agent configurations for RL with Rizon 4s for DisplayPort insertion."""
Loading
Loading