Skip to content

[Task Clean-up][Contrib] Dexterous Part 8/10: Move the OpenAI Shadow Hand variants to contrib - #6954

Closed
hujc7 wants to merge 3 commits into
isaac-sim:developfrom
hujc7:jichuanh/reorient-openai-contrib-p8
Closed

hujc7 wants to merge 3 commits into
isaac-sim:developfrom
hujc7:jichuanh/reorient-openai-contrib-p8

Conversation

@hujc7

@hujc7 hujc7 commented Aug 7, 2026 •

Copy link
Copy Markdown
Collaborator

Review Map

PR Status Depends on Exact changes
#6411 Part 1/10: Newton cloner/cubric/visualizer fixes — merged
#6412 Part 2/10: OVPhysX articulation + manager runtime — merged
#6413 Part 3/10: Reorient Direct, torch — changes
#6414 Part 4/10: MARL-to-single-agent fix + handover/camera Direct #6413 changes
#6418 Part 5/10: Reorient manager counterparts #6413 changes
#6421 Part 6/10: Handover + camera manager counterparts #6413, #6414, #6418 changes
#6410 Part 7/10: Environment overview docs #6421 changes
📌 #6954 Part 8/10: OpenAI Shadow variants → contrib (draft) #6421 changes
#6415 Part 9/10: Benchmark success-rate utilities #6421 changes
#6582 Part 10/10: Warp variants → experimental (draft; merges last) #6413 changes
#6324 [DO-NOT-MERGE] Lumped validation reference ALL —

Summary

  • Moves the four OpenAI Shadow Hand identifiers into contrib as two tasks; the feed-forward and recurrent policies now share one environment and are chosen with --agent.
  • Keeps the observation architecture in core as presets=openai — a 42-dimensional actor limited to what a physical hand can measure, plus a 187-dimensional privileged critic. One preset token switches both the environment and the RSL-RL agent.
  • Replaces the obs_type string with independent reduced_obs / asymmetric_obs flags, so a task may narrow the actor, add a privileged critic, or both.
  • Net: 7 Shadow tasks instead of 8, with a capability (presets=openai on the manager workflow) added rather than lost.

Task identifiers

Before After
Isaac-Reorient-Cube-Shadow-OpenAI-FF IsaacContrib-Reorient-Cube-Shadow-OpenAI
Isaac-Reorient-Cube-Shadow-OpenAI-LSTM IsaacContrib-Reorient-Cube-Shadow-OpenAI --agent rsl_rl_lstm_cfg_entry_point
Isaac-Reorient-Cube-Shadow-OpenAI-FF-Direct IsaacContrib-Reorient-Cube-Shadow-OpenAI-Direct
Isaac-Reorient-Cube-Shadow-OpenAI-LSTM-Direct IsaacContrib-Reorient-Cube-Shadow-OpenAI-Direct --agent rsl_rl_lstm_cfg_entry_point

On the removal without deprecation aliases

AGENTS.md requires prior deprecation for public API removals. These four identifiers are being removed outright, deliberately: the equivalent tasks exist under IsaacContrib- names in the same release, the changelog fragment carries the full mapping above, and retaining four alias registrations plus an obs_type translation would preserve a naming scheme this series exists to retire. Raised in review — happy to add aliases if maintainers prefer.

Series

Part 8 of 10. Depends on Part 6/10 (#6421), which owns Isaac-Reorient-Cube-Shadow-Camera; this branch is based on it, so the diff contains #6421's commits until it merges. Review from 75eee1e7211 onward.

Validation

  • 98 tests pass (test_reorient_value_parity.py, test_reorient_utils.py, test_hydra.py)
  • All 7 Shadow task entry points resolve; presets=openai verified on the Direct and manager workflows
  • Pre-commit clean; update_environments_rst.py --check regenerated

hujc7 added 3 commits August 7, 2026 03:04
Adds manager-based Allegro and Shadow cube reorientation environments that
mirror their Direct counterparts, sharing the reward, termination, command and
event definitions so the two workflows stay numerically in step. A value-parity
test pins the shared task-defining values.

Moves the shared task helpers into the reorientation task package and renames
the manager Allegro configurations after the robot rather than the object.
Adds the manager-based handover task and the Shadow camera reorientation task,
each mirroring its Direct counterpart's observation, reward and termination
contracts. Extends the value-parity test to the handover pair.

Retargets the handover recorder import to the reorientation helpers, which the
previous part moved out of core/utils.py.
The four OpenAI identifiers reproduced a specific sim-to-real setup -- 20 Hz
control, action and observation noise, and an episode budget spent per goal --
which does not generalize to other reorientation work. They now live in contrib
as two tasks, with the feed-forward and recurrent policies sharing one
environment and selected with --agent.

The observation architecture does generalize, so it stays in the core task as
presets=openai: a 42-dimensional actor restricted to what a physical hand can
measure, paired with a 187-dimensional privileged critic. One preset token
switches both the environment and the RSL-RL agent.

Replaces the obs_type string with the independent reduced_obs and
asymmetric_obs flags.
return SceneEntityCfg(name, joint_names=".*")


def _fingertip_entity(name: str) -> SceneEntityCfg:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

you can set a constant instead of create a funciton

)


def _hand_entity(name: str) -> SceneEntityCfg:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

constant instead of function

# soft limits equal the hard limits here: soft_joint_pos_limits_factor defaults to 1.0
right_joint_pos = ObsTerm(func=mdp.joint_pos_limit_normalized, params={"asset_cfg": _hand_entity("right_hand")})
right_joint_vel = ObsTerm(func=mdp.joint_vel, scale=0.2, params={"asset_cfg": _hand_entity("right_hand")})
right_fingertip_pos = ObsTerm(func=mdp.fingertip_pos, params={"asset_cfg": _fingertip_entity("right_hand")})

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why not use the one function to return finger tip state?

@hujc7
hujc7 force-pushed the jichuanh/reorient-openai-contrib-p8 branch from 75eee1e to b0d2d84 Compare August 7, 2026 10:05
rewards: OpenAIRewardsCfg = OpenAIRewardsCfg()
terminations: OpenAITerminationsCfg = OpenAITerminationsCfg()

enable_domain_randomization: bool = True

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

does this needs to exist?

physics=PhysicsCfg(),
)
# a looser goal, chased repeatedly, with falls punished
fall_penalty = -50.0

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we shouldn't need this kind of direc env style field creation/overrride if we are in manager style.

@hujc7

hujc7 commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator Author

fold into #6418. comment should be addressed there.

@hujc7 hujc7 closed this Aug 8, 2026
hujc7 added a commit that referenced this pull request Aug 11, 2026
…anager counterparts (#6418)

## Review Map

- **Exact changes**: a stacked PR's page shows the cumulative diff of
its dependency chain; the link pins the commit range that is the PR's
own contribution.
- Links pin specific SHAs and can go stale after a branch update — this
table on #6324 is refreshed first.

| PR | Status | Depends on | Exact changes |
|---|---|---|---|
| #6411 Part 1/10: Newton cloner/cubric/visualizer fixes |
![](https://img.shields.io/github/pulls/detail/state/isaac-sim/IsaacLab/6411?label=)
| — | merged |
| #6412 Part 2/10: OVPhysX articulation + manager runtime |
![](https://img.shields.io/github/pulls/detail/state/isaac-sim/IsaacLab/6412?label=)
| — | merged |
| #6413 Part 3/10: Reorient Direct, torch |
![](https://img.shields.io/github/pulls/detail/state/isaac-sim/IsaacLab/6413?label=)
| — |
[changes](https://github.com/isaac-sim/IsaacLab/pull/6413/changes/f4895f0f9ee..d29afc75e71)
|
| #6414 Part 4/10: MARL-to-single-agent fix + handover/camera Direct |
![](https://img.shields.io/github/pulls/detail/state/isaac-sim/IsaacLab/6414?label=)
| #6413 |
[changes](https://github.com/isaac-sim/IsaacLab/pull/6414/changes/d29afc75e71..b10a84948f8)
|
| 📌 #6418 Part 5/10: Reorient manager counterparts |
![](https://img.shields.io/github/pulls/detail/state/isaac-sim/IsaacLab/6418?label=)
| #6413 |
[changes](https://github.com/isaac-sim/IsaacLab/pull/6418/changes/3ea6f7bbf6c..0271783ea17)
|
| #6421 Part 6/10: Handover + camera manager counterparts |
![](https://img.shields.io/github/pulls/detail/state/isaac-sim/IsaacLab/6421?label=)
| #6413, #6414, #6418 |
[changes](https://github.com/isaac-sim/IsaacLab/pull/6421/changes/b31b04eaf71..0cae3d87be4)
|
| #6410 Part 7/10: Environment overview docs |
![](https://img.shields.io/github/pulls/detail/state/isaac-sim/IsaacLab/6410?label=)
| #6421 |
[changes](https://github.com/isaac-sim/IsaacLab/pull/6410/changes/b50ac8906fc..af259c0778d)
|
| #6954 Part 8/10: OpenAI Shadow variants → contrib (draft) |
![](https://img.shields.io/github/pulls/detail/state/isaac-sim/IsaacLab/6954?label=)
| #6421 |
[changes](https://github.com/isaac-sim/IsaacLab/pull/6954/changes/0cae3d87be4..b0d2d8448af)
|
| #6415 Part 9/10: Benchmark success-rate utilities |
![](https://img.shields.io/github/pulls/detail/state/isaac-sim/IsaacLab/6415?label=)
| #6421 |
[changes](https://github.com/isaac-sim/IsaacLab/pull/6415/changes/b50ac8906fc..c7f2f019d8b)
|
| #6582 Part 10/10: Warp variants → experimental (draft; merges last) |
![](https://img.shields.io/github/pulls/detail/state/isaac-sim/IsaacLab/6582?label=)
| #6413 |
[changes](https://github.com/isaac-sim/IsaacLab/pull/6582/changes/d29afc75e71..167c28578b3)
|
| #6324 [DO-NOT-MERGE] Lumped validation reference |
![](https://img.shields.io/github/pulls/detail/state/isaac-sim/IsaacLab/6324?label=)
| ALL | — |

## Summary

Adds manager-based counterparts for the Shadow cube reorientation task
and aligns the existing
Allegro manager task with the Direct contracts.

- **3 manager tasks** mirror their Direct counterparts:
`Isaac-Reorient-Cube-Shadow`,
  `-Shadow-Camera` and `-Allegro`.
- The OpenAI variants move to the contributed tasks **unchanged**. They
encode a paper-specific
  training regime, so they get no manager counterpart.
- `Metrics/success_rate` now means the same thing in both workflows.
- The in-hand cube is one object per hand instead of one per physics
backend.

## 1. Manager tasks match the Direct contracts

Observations, actions, rewards, terminations, reset distributions and
timing were brought to the
Direct values. A value-parity test asserts the decimation / episode
length / simulation step
triple, the orientation success tolerance and the fall distance, so
drift on either side fails CI.

The Allegro observation space changes size, so existing manager
checkpoints must be retrained.
Domain randomization becomes opt-in through `presets=randomized`,
replacing a configuration-file
flag that the command line could not override.

## 2. OpenAI variants move to the contributed tasks

`Isaac-Reorient-Cube-Shadow-OpenAI-{FF,LSTM}-Direct` become
`IsaacContrib-Reorient-Cube-Shadow-OpenAI-{FF,LSTM}-Direct`. Both
identifiers are kept: they share
one environment configuration and differ only in their agent
configuration, so collapsing them
would leave the recurrent policy unreachable — the training entry point
selects an agent
configuration by workflow, not by name.

## 3. One success rate, defined once

`Metrics/success_rate` named two quantities. The manager tasks reported
goals reached over goals
presented; the Direct tasks reported a per-episode success bit drawn at
`success_count_threshold`.
The curves were not comparable despite sharing a name and measuring the
same task.

Both now report the per-attempt rate, and `success_count_threshold` is
removed as unused. The goal
accounting moves into a `SuccessTracker` beside `EpisodeErrorRecorder`,
which also suppresses
success detection for the single step after an automatic reset — where
the goal has been drawn but
no physics has run against it, so a reset pose inside the success
threshold would otherwise bank a
goal the policy never earned.

## 4. One in-hand cube per hand, not per backend

The cube was a `PresetCfg` with a variant per physics backend, so each
hand manipulated a different
object depending on the backend. On Shadow the branches disagreed on
size and spawn height: PhysX
spawned a 60 mm rigid body at `z=0.6`, Newton a 54 mm **articulation
with no joints** at `z=0.535`.
A policy trained on one backend was not solving the same task as one
trained on the other.

Each hand now declares a single `CUBE_CFG`. Shadow keeps the PhysX
values; Allegro keeps its 1.2
scale. The `mass_props` density overrides are dropped: the asset authors
an absolute `physics:mass`
of 0.216 kg, which takes precedence over density, so they never applied
on either backend.

## 5. Configuration hierarchy flattened, classes named by role

Every manager task overrode all seven of the shared base's
sub-configurations, so the base carried
pre-alignment defaults that each task then undid. The environment
configurations now derive from
`ManagerBasedRLEnvCfg` directly. Removed: `ReorientObjectEnvCfg`, the
shared sub-configurations no
task constructed, and `reorient_common`. `isaaclab_tasks.core.utils`
moves to
`isaaclab_tasks.core.reorient.utils`, which the hand-over task already
imports from.

One naming convention now applies throughout, since `SceneCfg`,
`EventCfg` and
`ObservationsCfg` are each defined in dozens of files and gave no clue
which base a task
was specializing. Classes shared across files carry the task prefix; the
`Base` suffix
marks only those a subclass must complete by supplying fields the parent
leaves unset, so
the observation halves are named as parts rather than templates. Classes
nested inside
another configuration drop the prefix. Registered and preset-selectable
configurations
always name their task and hold fields only, with their helpers declared
beside them.

## Validation

Eight arms, 1500 iterations, 8192 environments, `physics=newton_mjwarp`,
one L40 each. All exited
cleanly with no regression in reward.

| Arm | reward before | reward after |
|---|---|---|
| `Isaac-Reorient-Cube-Shadow` | 67.08 | 66.24 |
| `-Shadow` `presets=asymmetric` | 42.08 | 52.95 |
| `-Shadow-Direct` | 3532.95 | 3967.58 |
| `-Allegro` | 25.22 | 34.03 |
| `-Allegro` `presets=randomized` | 16.03 | 39.59 |
| `-Allegro-Direct` | 656.78 | 1003.11 |
| `IsaacContrib-…-OpenAI-FF-Direct` | 2757.56 | 4533.21 |
| `IsaacContrib-…-OpenAI-LSTM-Direct` | — | 2585.54 |

The LSTM arm resolves `ShadowHandAsymLSTMPPORunnerCfg`, confirming the
recurrent policy is reachable
through its own identifier.

### Known failure

`test_rendering_shadow_hand[newton-isaacsim_rtx-rgb]` fails; it passes
on `develop`. Only the `rgb`
modality is affected — depth, normals and all three segmentations pass
on the same backend, so the
cube move is not an obvious explanation. Root cause is not yet
established.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

asset New asset feature or request documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants