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
14 changes: 13 additions & 1 deletion docs/source/overview/environments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1152,11 +1152,15 @@ including disabling runtime perturbations used for training.
* - Isaac-Reorient-Cube-Allegro
- Manager Based
- **rl_games** (PPO), **rsl_rl** (PPO), **skrl** (PPO)
-
- **physics=** ``isaacsim_physx``, ``newton_mjwarp``, ``ovphysx``
* - Isaac-Reorient-Cube-Allegro-Direct
- Direct
- **rl_games** (PPO), **rsl_rl** (PPO), **skrl** (PPO)
- **physics=** ``isaacsim_physx``, ``newton_mjwarp``, ``ovphysx``
* - Isaac-Reorient-Cube-Shadow
- Manager Based
- **rl_games** (PPO), **rsl_rl** (PPO), **skrl** (PPO)
- **physics=** ``isaacsim_physx``, ``newton_kamino``, ``newton_mjwarp``, ``ovphysx``
* - Isaac-Reorient-Cube-Shadow-Camera-Direct
- Direct
- **rl_games** (PPO), **rsl_rl** (PPO)
Expand All @@ -1167,10 +1171,18 @@ including disabling runtime perturbations used for training.
- Direct
- **rl_games** (PPO), **rsl_rl** (PPO), **skrl** (PPO)
- **physics=** ``isaacsim_physx``, ``newton_kamino``, ``newton_mjwarp``, ``ovphysx``
* - Isaac-Reorient-Cube-Shadow-OpenAI-FF
- Manager Based
- **rl_games** (PPO), **rsl_rl** (PPO), **skrl** (PPO)
- **physics=** ``isaacsim_physx``, ``newton_kamino``, ``newton_mjwarp``, ``ovphysx``
* - Isaac-Reorient-Cube-Shadow-OpenAI-FF-Direct
- Direct
- **rl_games** (PPO), **rsl_rl** (PPO), **skrl** (PPO)
- **physics=** ``isaacsim_physx``, ``newton_kamino``, ``newton_mjwarp``, ``ovphysx``
* - Isaac-Reorient-Cube-Shadow-OpenAI-LSTM
- Manager Based
- **rl_games** (PPO), **rsl_rl** (PPO)
- **physics=** ``isaacsim_physx``, ``newton_kamino``, ``newton_mjwarp``, ``ovphysx``
* - Isaac-Reorient-Cube-Shadow-OpenAI-LSTM-Direct
- Direct
- **rl_games** (PPO), **rsl_rl** (PPO)
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.
1 change: 1 addition & 0 deletions source/isaaclab/isaaclab/envs/manager_based_rl_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def __init__(self, cfg: ManagerBasedRLEnvCfg, render_mode: str | None = None, **

# initialize the episode length buffer BEFORE loading the managers to use it in mdp functions.
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)

# initialize the base class to setup the scene.
super().__init__(cfg=cfg)
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,68 @@
Added
^^^^^

* Added manager-based counterparts for the Shadow cube reorientation task and its
OpenAI FF/LSTM 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 Allegro and Shadow manager
environments.
* Added Newton and OvPhysX presets to the manager-based reorientation environments,
selectable with ``physics=``.
* Added a Direct-versus-manager value-parity test covering timing, success tolerance,
fall distance, and the consecutive-success cap.

Changed
^^^^^^^

* **Breaking:** Changed ``Metrics/success_rate`` on the manager-based reorientation
tasks to a per-episode success bit drawn at
``ReorientCommandCfg.success_count_threshold``, matching 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 and on for the OpenAI variants, matching each task's Direct
counterpart. Set ``enable_domain_randomization`` to restore it.
* **Breaking:** Changed the manager-based Allegro environment to match the Direct
observation, action, reset, and termination contracts, and to use the same agent
configurations. The observation space changes size, so existing manager checkpoints
must be retrained. ``rl_games_manager_ppo_cfg.yaml``, ``skrl_manager_ppo_cfg.yaml``
and ``AllegroCubePPORunnerCfg`` are gone; use ``rl_games_ppo_cfg.yaml``,
``skrl_ppo_cfg.yaml`` and ``AllegroHandPPORunnerCfg``.
* **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 no longer
resolves; use the contributed one.
* **Breaking:** Replaced the per-backend in-hand cube preset with one configuration
per hand. Newton spawned a 54 mm articulation at ``z=0.535``; both backends now
share the PhysX rigid body, a 60 mm cube at ``z=0.6``. Newton checkpoints must be
retrained, and code resolving the object through
:class:`~isaaclab.assets.Articulation` must use :class:`~isaaclab.assets.RigidObject`.
* Renamed the per-robot scene constants to name what they hold: ``ROBOT_CFG`` becomes
``SHADOW_HAND_ROBOT_CFG`` or ``ALLEGRO_HAND_ROBOT_CFG``, and ``OBJECT_CFG`` becomes
``CUBE_CFG``.
* Renamed the manager-based Allegro configurations after the robot rather than the object,
matching the Shadow counterparts: ``AllegroCubeEnvCfg`` and ``AllegroCubeSceneCfg`` become
``AllegroHandManagerEnvCfg`` and ``AllegroHandManagerSceneCfg``. The
``Isaac-Reorient-Cube-Allegro`` task identifier is unchanged.

Removed
^^^^^^^

* Removed ``ReorientObjectEnvCfg`` and the shared reorientation observation, action,
and command configurations. Each manager task 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 per-robot fields on the Direct
configurations.
* Removed the handover ``EventCfg``, which was never wired into
``HandoverEnvCfg.events``.
* Removed ``isaaclab_tasks.core.utils``. Its helpers moved to
``isaaclab_tasks.core.reorient.utils``, which the hand-over task imports.
* Removed the ``clone_in_fabric`` settings from the reorientation scenes. The flag no
longer reaches the replicator, so the value had no effect.

Fixed
^^^^^

* Fixed the manager-based reorientation tasks not reporting ``Metrics/success_rate``.
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 the Kit PhysX backend by
default, since only the Isaac RTX tiled camera renders the default modalities.
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,21 @@
# 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 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",
},
)
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,38 @@
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,
isaacsim_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
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
from isaaclab_tasks.core.handover.handover_common import GOAL_POSITION_OFFSET
from isaaclab_tasks.core.handover.handover_env_cfg import HandoverEnvCfg
from isaaclab_tasks.core.handover.mdp.rewards import evaluate_handover_success, handover_reward
from isaaclab_tasks.core.utils import EpisodeErrorRecorder, randomize_rotation, sample_joint_positions_within_limits
from isaaclab_tasks.core.reorient.utils import (
EpisodeErrorRecorder,
randomize_rotation,
sample_joint_positions_within_limits,
)


class HandoverEnv(DirectMARLEnv):
Expand Down Expand Up @@ -228,8 +232,7 @@ def _get_dones(self) -> tuple[dict[str, torch.Tensor], dict[str, torch.Tensor]]:
def _reset_idx(self, env_ids: Sequence[int] | torch.Tensor | None):
if env_ids is None:
env_ids = self.right_hand._ALL_INDICES
# Flush per-episode success (sticky binary: object ever reached the goal within threshold).
# 0-dim device tensor, for the same reason
# Flush the sticky per-episode success bit.
self.extras.setdefault("log", {})["Metrics/success_rate"] = self._episode_succeeded[env_ids].float().mean()
for statistic, value in self._goal_distance.reset(env_ids).items():
self.extras["log"][f"Diagnostics/episode_min_goal_distance_{statistic}"] = value
Expand Down
Loading
Loading