Skip to content
Open
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 \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's make sure this change is also reflected in the docs.

@fatimaanes @yts-nv @r-schmitt for viz on renaming of the task

--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,74 @@
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 no
longer resolves; use the contributed identifier instead.
* **Breaking:** Changed the in-hand cube to a rigid body on the Newton backend,
where it was previously declared as an articulation with no joints or
actuators. Code that resolved the object through
:class:`~isaaclab.assets.Articulation` must use
:class:`~isaaclab.assets.RigidObject`.
* Removed the ``clone_in_fabric`` settings from the reorientation scenes. The
flag no longer reaches the replicator, so the value had no effect.
* 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,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)
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@
from isaaclab_ovphysx.physics import OvPhysxCfg
from isaaclab_physx.physics import PhysxCfg

import isaaclab.envs.mdp as mdp
import isaaclab.sim as sim_utils
import isaaclab.utils.math as math_utils
from isaaclab.assets import ArticulationCfg, RigidObjectCfg
from isaaclab.envs import DirectMARLEnvCfg
from isaaclab.managers import EventTermCfg as EventTerm
from isaaclab.managers import SceneEntityCfg
from isaaclab.markers import VisualizationMarkersCfg
from isaaclab.physics import PhysxAutoCfg
from isaaclab.scene import InteractiveSceneCfg
Expand All @@ -33,105 +30,6 @@
from isaaclab_assets.robots.shadow_hand import SHADOW_HAND_CFG, SHADOW_HAND_NEWTON_CFG


@configclass
class EventCfg:
"""Configuration for randomization (PhysX path).

Note: this config is currently not wired into ``HandoverEnvCfg.events`` -
it is kept as a reference for future event-randomization work. The event
terms here use PhysX-only APIs (rigid-body materials, fixed tendons), so
they would need a Newton variant before being enabled in the env.
"""

# -- robot
robot_physics_material = EventTerm(
func=mdp.randomize_rigid_body_material,
mode="reset",
min_step_count_between_reset=720,
params={
"asset_cfg": SceneEntityCfg("right_hand"),
"static_friction_range": (0.7, 1.3),
"dynamic_friction_range": (1.0, 1.0),
"restitution_range": (1.0, 1.0),
"num_buckets": 250,
},
)
robot_joint_stiffness_and_damping = EventTerm(
func=mdp.randomize_actuator_gains,
min_step_count_between_reset=720,
mode="reset",
params={
"asset_cfg": SceneEntityCfg("right_hand", joint_names=".*"),
"stiffness_distribution_params": (0.75, 1.5),
"damping_distribution_params": (0.3, 3.0),
"operation": "scale",
"distribution": "log_uniform",
},
)
robot_joint_pos_limits = EventTerm(
func=mdp.randomize_joint_parameters,
min_step_count_between_reset=720,
mode="reset",
params={
"asset_cfg": SceneEntityCfg("right_hand", joint_names=".*"),
"lower_limit_distribution_params": (0.00, 0.01),
"upper_limit_distribution_params": (0.00, 0.01),
"operation": "add",
"distribution": "gaussian",
},
)
robot_tendon_properties = EventTerm(
func=mdp.randomize_fixed_tendon_parameters,
min_step_count_between_reset=720,
mode="reset",
params={
"asset_cfg": SceneEntityCfg("right_hand", fixed_tendon_names=".*"),
"stiffness_distribution_params": (0.75, 1.5),
"damping_distribution_params": (0.3, 3.0),
"operation": "scale",
"distribution": "log_uniform",
},
)

# -- object
object_physics_material = EventTerm(
func=mdp.randomize_rigid_body_material,
min_step_count_between_reset=720,
mode="reset",
params={
"asset_cfg": SceneEntityCfg("object"),
"static_friction_range": (0.7, 1.3),
"dynamic_friction_range": (1.0, 1.0),
"restitution_range": (1.0, 1.0),
"num_buckets": 250,
},
)
object_scale_mass = EventTerm(
func=mdp.randomize_rigid_body_mass,
min_step_count_between_reset=720,
mode="reset",
params={
"asset_cfg": SceneEntityCfg("object"),
"mass_distribution_params": (0.5, 1.5),
"operation": "scale",
"distribution": "uniform",
},
)

# -- scene
reset_gravity = EventTerm(
func=mdp.randomize_physics_scene_gravity,
mode="interval",
is_global_time=True,
interval_range_s=(36.0, 36.0), # time_s = num_steps * (decimation * dt)
params={
"gravity_distribution_params": ([0.0, 0.0, 0.0], [0.0, 0.0, 0.4]),
"operation": "add",
"distribution": "gaussian",
},
)


def _shadow_hand_cfg(
prim_path: str,
init_pos: tuple[float, float, float],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
This package consolidates the direct-workflow and manager-based-workflow in-hand
manipulation tasks, where a dexterous hand reorients an object to match a goal
orientation. The shared direct base environment lives in
:mod:`~isaaclab_tasks.core.reorient.reorient_direct_env` and the shared manager-based
base configuration in :mod:`~isaaclab_tasks.core.reorient.reorient_manager_env_cfg`.
Robot-specific tasks are organized under the ``config`` subpackage
(``config/allegro_hand`` and ``config/shadow_hand``).
:mod:`~isaaclab_tasks.core.reorient.reorient_direct_env`; the manager-based
configurations live with their robot-specific tasks under the ``config``
subpackage (``config/allegro_hand`` and ``config/shadow_hand``).
These environments are based on the `dexterous cube manipulation`_ environments
provided in IsaacGymEnvs repository from NVIDIA. However, they contain certain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
disable_env_checker=True,
kwargs={
"env_cfg_entry_point": f"{__name__}.allegro_hand_manager_env_cfg:AllegroCubeEnvCfg",
"rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:AllegroCubePPORunnerCfg",
"rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_manager_ppo_cfg.yaml",
"skrl_cfg_entry_point": f"{agents.__name__}:skrl_manager_ppo_cfg.yaml",
"rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:AllegroHandPPORunnerCfg",
"rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_cfg.yaml",
"skrl_cfg_entry_point": f"{agents.__name__}:skrl_ppo_cfg.yaml",
},
)

Expand All @@ -35,8 +35,8 @@
disable_env_checker=True,
kwargs={
"env_cfg_entry_point": f"{__name__}.allegro_hand_direct_env_cfg:AllegroHandEnvCfg",
"rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_direct_ppo_cfg.yaml",
"rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_cfg.yaml",
"rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:AllegroHandPPORunnerCfg",
"skrl_cfg_entry_point": f"{agents.__name__}:skrl_direct_ppo_cfg.yaml",
"skrl_cfg_entry_point": f"{agents.__name__}:skrl_ppo_cfg.yaml",
},
)
Loading
Loading