Skip to content
Draft
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion docs/source/setup/quickstart_details.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ options (observation modes, camera configs, etc.). They fold into Hydra override
# OVRTX rendering (kit-less, no Kit visualizer)
uv run isaaclab train --rl_library rsl_rl \
--task=Isaac-Reorient-Cube-Shadow-Camera-Benchmark-Direct \
--task=IsaacContrib-Reorient-Cube-Shadow-Camera-Benchmark-Direct \
--num_envs=16 --max_iterations=10 \
physics=newton_mjwarp renderer=ovrtx presets=simple_shading_diffuse_mdl
Expand Down
6 changes: 6 additions & 0 deletions source/isaaclab/changelog.d/task-cleanup-dex-part08.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Fixed
^^^^^

* Fixed :attr:`~isaaclab.envs.ManagerBasedRLEnv.reset_buf` not existing until the first
call to :meth:`~isaaclab.envs.ManagerBasedRLEnv.step`, so manager terms that run during
the initial reset could not read it.
5 changes: 4 additions & 1 deletion source/isaaclab/isaaclab/envs/manager_based_rl_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ def __init__(self, cfg: ManagerBasedRLEnvCfg, render_mode: str | None = None, **
# -- counter for curriculum
self.common_step_counter = 0

# initialize the episode length buffer BEFORE loading the managers to use it in mdp functions.
# initialize the episode length and reset buffers BEFORE loading the managers to use them in
# mdp functions. The reset buffer is only assigned its computed value in :meth:`step`, so terms
# that run during the initial reset would otherwise not find it.
self.episode_length_buf = torch.zeros(cfg.scene.num_envs, device=cfg.sim.device, dtype=torch.long)
self.reset_buf = torch.zeros(cfg.scene.num_envs, device=cfg.sim.device, dtype=torch.bool)

# Forward render_mode and viewer camera to VideoRecorderCfg before super().__init__()
# creates the VideoRecorder, so fallback cameras are only spawned when --video is active
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Added
^^^^^

* Added :obj:`~isaaclab_assets.robots.shadow_hand.SHADOW_ACTUATED_JOINT_NAMES_NEWTON`.
The Newton Shadow Hand asset numbers its finger joints one higher than the
PhysX one, so terms that address joints by name need the Newton ordering
rather than :obj:`~isaaclab_assets.robots.shadow_hand.SHADOW_ACTUATED_JOINT_NAMES`.
35 changes: 32 additions & 3 deletions source/isaaclab_assets/isaaclab_assets/robots/shadow_hand.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,10 @@
)
"""Configuration of the Shadow Hand robot on the Newton (MJWarp) asset.

The Newton USD renumbers the finger joints (+1) relative to :obj:`SHADOW_HAND_CFG`, but the
names in :obj:`SHADOW_ACTUATED_JOINT_NAMES` resolve on both assets, so the two backends share
one actuated-joint list. Gains default to the PhysX values; tasks override them as needed.
The Newton USD renumbers the finger joints (+1) relative to :obj:`SHADOW_HAND_CFG`. Actuator
regexes resolve on both assets, so the two backends share one actuator configuration, but terms
that need the joints in order use :obj:`SHADOW_ACTUATED_JOINT_NAMES_NEWTON` on this asset.
Gains default to the PhysX values; tasks override them as needed.
"""


Expand Down Expand Up @@ -210,3 +211,31 @@

These names resolve on both the PhysX and Newton assets, so every backend shares this list.
"""

SHADOW_ACTUATED_JOINT_NAMES_NEWTON: list[str] = [
"robot0_WRJ1",
"robot0_WRJ0",
"robot0_FFJ4",
"robot0_FFJ3",
"robot0_FFJ2",
"robot0_MFJ4",
"robot0_MFJ3",
"robot0_MFJ2",
"robot0_RFJ4",
"robot0_RFJ3",
"robot0_RFJ2",
"robot0_LFJ5",
"robot0_LFJ4",
"robot0_LFJ3",
"robot0_LFJ2",
"robot0_THJ4",
"robot0_THJ3",
"robot0_THJ2",
"robot0_THJ1",
"robot0_THJ0",
]
"""Shadow Hand actuated joint names on the Newton asset, in the same order.

The Newton USD numbers the finger joints one higher than :obj:`SHADOW_ACTUATED_JOINT_NAMES`,
so action terms that address joints by name need this list rather than the PhysX one.
"""
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
Added
^^^^^

* Added manager-based counterparts for the Shadow cube reorientation task and
its OpenAI FF/LSTM observation variants, alongside the existing Allegro
manager task.
* Added :class:`~isaaclab_tasks.core.reorient.mdp.reorient_timeout`, which
restarts the episode timer on every goal reach so OpenAI-variant episodes
extend across success streaks.
* Added ``enable_domain_randomization`` to the manager-based Allegro and Shadow
environment for turning off its startup randomization terms.
* Added Newton and OvPhysx physics presets to the manager-based reorientation
environments, selectable with ``physics=``.
* Added a Direct-versus-manager value-parity check covering timing, success
tolerance, fall distance, and the consecutive-success cap.

Changed
^^^^^^^

* **Breaking:** Changed the manager-based reorientation tasks to report
``Metrics/success_rate`` as a per-episode success bit, drawn at
``ReorientCommandCfg.success_count_threshold`` like the Direct environments,
instead of a per-attempt ratio. Curves from earlier runs are not comparable.
* **Breaking:** Changed domain randomization to default off on the Allegro and
Shadow manager tasks, so they match their Direct counterparts, which randomize
nothing beyond the reset distributions. Set ``enable_domain_randomization`` on
the configuration to restore it. The OpenAI variants keep it enabled, matching
their Direct counterparts.
* **Breaking:** Changed the manager-based Allegro task to use the same RL agent
configurations as its Direct counterpart, so the two are comparable. The
``rl_games_manager_ppo_cfg.yaml``, ``skrl_manager_ppo_cfg.yaml`` and
``AllegroCubePPORunnerCfg`` entries are removed; use ``rl_games_ppo_cfg.yaml``,
``skrl_ppo_cfg.yaml`` and ``AllegroHandPPORunnerCfg``.

* **Breaking:** Changed the manager-based Allegro reorientation environment to
match the Direct observation, action, reset, and termination contracts. The
observation space changes size, so existing manager checkpoints cannot be
loaded and must be retrained.
* **Breaking:** Changed the Shadow Hand reorientation tasks to apply the same
randomization on every physics backend. PhysX now also randomizes joint gains,
object mass, and gravity, and Newton now also randomizes contact materials.
Policies trained before this change must be retrained.
* **Breaking:** Moved the Shadow Hand camera benchmark task to the contributed
tasks as ``IsaacContrib-Reorient-Cube-Shadow-Camera-Benchmark-Direct``. The
released ``Isaac-Reorient-Cube-Shadow-Camera-Benchmark-Direct`` identifier
still resolves and warns; switch to the new identifier.
* Renamed the per-robot scene constants to name what they hold: ``ROBOT_CFG``
becomes ``SHADOW_HAND_ROBOT_CFG`` or ``ALLEGRO_HAND_ROBOT_CFG``,
``OBJECT_CFG`` becomes ``CUBE_CFG``, and ``ObjectCfg`` becomes ``CubeCfg``.

Removed
^^^^^^^

* Removed ``ReorientObjectEnvCfg`` and the shared reorientation observation,
action, and command configurations. Each manager task now declares its own;
derive from :class:`~isaaclab.envs.ManagerBasedRLEnvCfg` directly.
* Removed ``reorient_common``. Its constants are declared by the tasks that use
them, and the in-hand offset and goal-marker position are now per-robot fields
on the Direct configurations.

Fixed
^^^^^

* Fixed the manager-based reorientation tasks not reporting
``Metrics/success_rate``.
* Fixed manager ``Metrics/success_rate`` counting goal attempts rather than the
per-episode success bit the Direct tasks report.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Added
^^^^^

* Added manager-based counterparts for the Shadow handover and Shadow camera
reorientation tasks, completing the manager coverage of the dexterous task
families.
* Added a Direct-versus-manager value-parity check for the handover task,
alongside the reorientation one.

Changed
^^^^^^^

* Changed the manager-based Shadow camera task to run on PhysX by default. The
RTX render modalities require Fabric cloning, which Newton does not support.
Select Newton with ``physics=newton_mjwarp`` for the state-only observation
groups.
* Changed the handover reward to a plain reward term, moving success and
goal-distance bookkeeping to
:class:`~isaaclab_tasks.core.handover.mdp.commands.HandoverCommand`.
* Changed the reorientation action configuration to name its term through a
module path, so loading a task configuration no longer imports the USD
bindings.

Removed
^^^^^^^

* Removed the ``Isaac-Reorient-Cube-Shadow-Camera-Play`` and
``Isaac-Reorient-Cube-Shadow-Camera-Direct-Play`` tasks. Use the training task
with ``--play`` instead; playback settings now live in
:meth:`~isaaclab.envs.ManagerBasedRLEnvCfg.play_mode`.

Fixed
^^^^^

* Fixed the Shadow camera feature-extractor observation term ignoring its
declared ``feature_extractor_cfg`` parameter.
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

"""Contributed variants of the in-hand reorientation 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

"""Configurations for the contributed reorientation environments."""
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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

"""Shadow Hand rendering-throughput benchmark task."""

import gymnasium as gym
from gymnasium.envs.registration import EnvSpec, registry

from isaaclab_tasks.core.reorient.config.shadow_hand import agents

gym.register(
id="IsaacContrib-Reorient-Cube-Shadow-Camera-Benchmark-Direct",
entry_point="isaaclab_tasks.core.reorient.config.shadow_hand.shadow_hand_direct_camera_env:ShadowHandCameraEnv",
disable_env_checker=True,
kwargs={
"env_cfg_entry_point": f"{__name__}.shadow_hand_camera_benchmark_env_cfg:ShadowHandCameraBenchmarkEnvCfg",
"rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:ShadowHandCameraFFPPORunnerCfg",
"rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_camera_cfg.yaml",
},
)

# Retain the released ID as a deprecated alias by inserting its spec directly.
registry.update(
{
"Isaac-Reorient-Cube-Shadow-Camera-Benchmark-Direct": EnvSpec(
id="Isaac-Reorient-Cube-Shadow-Camera-Benchmark-Direct",
entry_point=(
"isaaclab_tasks.core.reorient.config.shadow_hand.shadow_hand_direct_camera_env:ShadowHandCameraEnv"
),
disable_env_checker=True,
kwargs={
"env_cfg_entry_point": f"{__name__}.shadow_hand_camera_benchmark_env_cfg:ShadowHandCameraBenchmarkEnvCfg",
"rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:ShadowHandCameraFFPPORunnerCfg",
"rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_camera_cfg.yaml",
"deprecated": {"alias": "--task IsaacContrib-Reorient-Cube-Shadow-Camera-Benchmark-Direct"},
},
),
}
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 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

"""Rendering-throughput benchmark variant of the Shadow Hand camera task."""

from isaaclab.utils.configclass import configclass

from isaaclab_tasks.core.reorient.config.shadow_hand.feature_extractor import FeatureExtractorCfg
from isaaclab_tasks.core.reorient.config.shadow_hand.shadow_hand_direct_camera_env_cfg import ShadowHandCameraEnvCfg


@configclass
class ShadowHandCameraBenchmarkEnvCfg(ShadowHandCameraEnvCfg):
"""Benchmark configuration with the feature extractor CNN disabled.

The tiled camera renders frames each step as normal, but the CNN forward pass is
bypassed — zero embeddings are returned instead. This isolates rendering throughput
from CNN inference overhead when profiling.

The renderer backend and camera data types can still be selected via ``presets``::

presets = newton_renderer # benchmark with Newton renderer
presets = ovrtx # benchmark with OVRTX renderer
presets = rgb # benchmark RGB rendering only
presets = depth, newton_renderer # benchmark depth rendering with Newton
"""

feature_extractor: FeatureExtractorCfg = FeatureExtractorCfg(enabled=False)
10 changes: 10 additions & 0 deletions source/isaaclab_tasks/isaaclab_tasks/core/handover/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@
# Register Gym environments.
##

gym.register(
id="Isaac-Shadow-Handover",
entry_point="isaaclab.envs:ManagerBasedRLEnv",
disable_env_checker=True,
kwargs={
"env_cfg_entry_point": f"{__name__}.handover_manager_env_cfg:HandoverManagerEnvCfg",
"rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:HandoverPPORunnerCfg",
},
)

gym.register(
id="Isaac-Shadow-Handover-Direct",
entry_point=f"{__name__}.handover_env:HandoverEnv",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,37 @@
import isaaclab.sim as sim_utils
from isaaclab.markers import VisualizationMarkersCfg

from isaaclab_tasks.utils.hydra import preset

from isaaclab_assets.robots.shadow_hand import (
SHADOW_ACTUATED_JOINT_NAMES as ACTUATED_JOINT_NAMES,
)
from isaaclab_assets.robots.shadow_hand import (
SHADOW_ACTUATED_JOINT_NAMES_NEWTON,
)
from isaaclab_assets.robots.shadow_hand import (
SHADOW_FINGERTIP_BODY_NAMES as FINGERTIP_BODY_NAMES,
)

__all__ = [
"ACTUATED_JOINT_NAMES",
"ACTUATED_JOINT_NAMES_PRESET",
"FINGERTIP_BODY_NAMES",
"GOAL_MARKER_CFG",
"GOAL_POSITION_OFFSET",
"OBJECT_RADIUS",
]


ACTUATED_JOINT_NAMES_PRESET = preset(
physx=ACTUATED_JOINT_NAMES,
newton_mjwarp=SHADOW_ACTUATED_JOINT_NAMES_NEWTON,
ovphysx=ACTUATED_JOINT_NAMES,
default=ACTUATED_JOINT_NAMES,
)
"""Per-backend actuated joint names, resolved by the physics preset key."""


OBJECT_RADIUS: float = 0.0335
"""Hand-over object sphere radius [m], also used for the goal marker."""

Expand Down
Loading
Loading