[DO-NOT-MERGE][Task Clean-up] Dexterous: lumped validation branch (series reference)#6324
Open
hujc7 wants to merge 128 commits into
Open
[DO-NOT-MERGE][Task Clean-up] Dexterous: lumped validation branch (series reference)#6324hujc7 wants to merge 128 commits into
hujc7 wants to merge 128 commits into
Conversation
Restore the Shadow Hand orientations and current passive distal joints used by Newton handover training. Add RGB-depth and normals camera presets and normalize signed normals for Newton-rendered observations.
Avoid binding an incompatible USD or Carbonite build before Kit initializes by moving backend imports to their use sites. Extend the environment import guard to cover Gym entry points.
Adopt the standard Shadow Hand asset for Newton tasks and remove the asset-specific root, tendon, and passive-joint workarounds. Add the missing Newton and OVPhysX presets, migrate scoped schema uses, and keep source installs valid by declaring and ordering the PhysX dependency.
…-env-convergence-codex
hujc7
force-pushed
the
jichuanh/dexterous-env-convergence-codex
branch
from
July 2, 2026 10:08
23c2ef8 to
99025bd
Compare
Leave stage-context synchronization pending after a temporary Isaac Sim import failure so a later successful import can share the thread-local stage. Add a kitless regression test for the fail-then-retry sequence.
Normalize actuator joint selections to the common slice-or-tensor contract so manager event randomization can consume them. Keep concrete joint IDs for OVPhysX torque application.
Expose converted observations and forward episode-length state so recurrent and feed-forward RSL-RL runners can train converted multi-agent environments.
Register recurrent Shadow Hand and single-agent Handover runners so every owned dexterous training variant has an RSL-RL path.
Map both actor and critic to the converted policy observation explicitly so the new runner does not rely on deprecated fallback discovery.
Drop deferred-import, global asset dependency, and unused camera modality changes that validation showed were not required. Keep the task-local asset, backend, and RSL-RL fixes.
Provide a Manager workflow matching the existing multi-agent adapter's observation, action, reward, reset, and termination contracts. Register explicit benchmark criteria and keep Newton object properties solver-neutral.
Add the mandatory Manager counterpart for the state-based Shadow Hand reorientation task while preserving the Direct task's action, observation, reward, reset, goal, and termination contracts. Register matching benchmark criteria and backend presets.
Use the standard lazy-export initializer so importing the Handover Manager configuration does not preload USD modules before SimulationApp starts. Add a subprocess regression check for the pre-Kit import contract.
Avoid reading the RL reset buffer before ManagerBasedRLEnv creates it during initial environment reset. Preserve the one-step autoreset suppression only when that buffer exists.
Preserve Direct's same-step terminal-action observation with a reset snapshot instead of a custom runtime action class. This keeps Manager configuration imports free of USD modules before SimulationApp starts and covers the pre-Kit contract.
Select the reset-action snapshot while episode length is zero so initial, terminal, and explicit user resets all match Direct's same-step action observation until the next transition.
Keep both hands' terminal raw actions in Manager reset observations so the single-agent observation contract continues to match Direct during initial, manual, and same-step autoresets.
Drop an unnecessary Allegro OVPhysX alias and update the Handover Newton documentation now that both workflows have converged with the shared settings.
Provide Manager counterparts for the OpenAI feed-forward, recurrent, and camera reorientation variants. Preserve Direct observation, noise, action, reward, reset, and termination contracts while exposing every physics and rendering preset.
Use the same environment and agent contracts so the two workflows are directly comparable. Existing Manager checkpoints must be retrained against the new observation and reward contract.
Validate all supported physics and renderer preset pairs, exclude playback and benchmark registrations from training collection, and complete the public camera feature term documentation.
…-env-convergence-codex
Add explicit Menagerie asset configurations and select them for PhysX and Newton while retaining compatible legacy assets for OVPhysX. Preserve the task action contracts across joint namespaces and tighten benchmark validation.
…-env-convergence-codex
hujc7
added a commit
that referenced
this pull request
Jul 17, 2026
…nager runtime (#6412) ## Summary - Fixes OVPhysX actuator joint indices to follow the common actuator indexing contract. - Fixes OVPhysX initialization alongside Kit by reusing Kit's registered PhysX schema provider. - Fixes the OVPhysX manager to support both the declared public runtime API and the current runtime API. - Regression tests included. Validated by full dexterous training runs on the OVPhysX backend; split out of the lumped validation branch #6324 (Part 2 of 11). ## Dependencies - None. ## Series review map Full integrated diff + training/validation evidence: the lumped validation PR #6324 (DO-NOT-MERGE). | Part | PR | |---|---| | Docs: regenerate the environment overview table | #6410 | | Part 1/11: Newton runtime fixes (cloner rows, cubric fallback, viz teardown) | #6411 | | **Part 2/11: OVPhysX runtime fixes (this PR)** | #6412 | | Part 3/11: success-rate metrics for the Direct reorientation tasks | #6413 | | Part 4/11: RSL-RL training for the handover Direct task | #6414 | | Part 5/11: success-rate support in the benchmark utilities | #6415 | | Part 6/11: renderer presets for the Direct camera task | #6416 | | Part 7/11: OVPhysX presets for the dexterous tasks | #6417 | | Part 8/11: Allegro manager counterpart | #6418 | | Part 9/11: Shadow + OpenAI manager counterparts | #6419 | | Part 10/11: Shadow camera manager counterpart | #6420 | | Part 11/11: Shadow handover manager counterpart | #6421 | --- ### Exact changes in this PR - OVPhysX backend changes + tests: 1f7a433
Replace the module-level SHADOW/OPENAI/ALLEGRO/HANDOVER _SIM_CFG variables with four small task-cfg base classes that both the Direct and the manager configurations inherit (multiple inheritance with the framework env-cfg bases). The simulation parameters for each family are now authored exactly once and consumed through inheritance, removing the per-class sim assignments and the hand-copied simulation block in the OpenAI manager's __post_init__ — the one spot that had silently duplicated (and could drift from) the shared values. Verified: all fifteen env cfgs construct with byte-identical simulation parameters, and the value-parity, torch-math, and core-utils suites pass (30/30).
hujc7
requested review from
AntoineRichard,
StafaH,
daniela-hase,
marcodiiga,
matthewtrepte,
ooctipus and
pascal-roth
as code owners
July 17, 2026 23:32
…us-env-convergence-codex
The OVPhysX runtime fixes merged to develop via their part PR with its own fragment; the lump's duplicate fragment would double the changelog entry.
Replace the local _quat_mul_xyzw tuple helper with isaaclab.utils.math.quat_mul, which already uses the (x, y, z, w) component order. The composition runs in float64 and was verified bit-identical to the previous helper (and to the wp.quatd math it originally replaced).
The per-backend scene preset entries repeated identical num_envs, env_spacing, and replicate_physics values, differing only in clone_in_fabric (Fabric cloning is unsupported on Newton). Move the invariant values onto each family's shared scene class as defaults so the presets declare only their backend delta. Verified byte-identical across all twenty preset variants.
Move the five helper classes that are meaningful only inside one preset class into that class as nested classes, per the repository's nested-class convention: the handover, Allegro, Shadow Direct, and Shadow OpenAI manager scene cfgs and the tiled-camera variant base. _ShadowHandManagerSceneCfg stays module-level (base of two subclasses, one in another file) as does _ShadowHandCameraManagerSceneCfg (consumed by both the train and the Play presets). Nested configclasses must carry their own @configclass decorator — without it, an outer-decorated preset reprocesses the preset instances and the nested class's unannotated defaults resolve to MISSING. All twenty scene preset variants and the camera preset verified value-identical.
- Fix the Allegro PLAY configuration leaving the default preset at 8192 environments: set_num_envs now covers the default alternative (the configclass deep-copies it independently of physx). - Add deprecation directives and one-shot runtime warnings to the three legacy reorient reward terms, matching the deprecated terminations. - Extend the value-parity test to the reset-noise scalars and the successes-based timeout threshold (0 on the Direct side corresponds to the plain time_out term on the manager side). - Document that resets now sample uniformly across the full joint range (previously biased toward the lower half) alongside the clamp fix. - Drop the stale OpenUSD installation bullet from the isaaclab fragment; that change is not part of this diff. - Build zero reset velocities with torch.zeros_like instead of clone-then-zero in both reset events.
evaluate_reorient_success now computes the orientation error through isaaclab.utils.math.quat_error_magnitude instead of a local formula: the shared utility is torch.jit-scriptable (verified by compiling a scripted caller from a source file) and decision-identical at the task tolerances — zero success-threshold flips over 20k random pairs, with differences up to 9e-4 rad only near pi where the shared atan2-based form is the more accurate one. The local direct_reorient_rotation_distance is deleted. Rename direct_reorient_reward to reorient_reward: shared symbols carry no paradigm prefix. The DirectReorientReward and DirectReorientTimeout manager terms keep the prefix deliberately — there "Direct" names the Direct-compatible contract they implement.
The manager-based terms wrap the shared evaluators rather than the Direct-workflow implementation, so the Direct prefix read as a paradigm crossing at the use sites. Rename DirectReorientReward to ReorientReward and DirectReorientTimeout to ReorientTimeout, matching HandoverReward, and state the Direct-parity contract in the class docstrings instead. Both classes are new on this branch, so no deprecation is required.
The Part 1 PR evolved through its own review (cloner and visualizer fixes) and had the Newton pin stripped out to the dedicated pin PR; mirror both into the lump so the series union and the lump stay byte-identical. The Newton pin and MuJoCo overrides now live only in the pin PR.
hujc7
requested review from
aserifi,
david-cao-mueller,
huidongc and
rubengrandia
as code owners
July 18, 2026 11:10
The legacy manager-based reorientation configuration ReorientObjectEnvCfg and the terms only it consumed (success_bonus, track_pos_l2, track_orientation_inv_l2, max_consecutive_success, object_away_from_goal) are replaced by the Direct-parity manager configurations and terms (ReorientReward, ReorientTimeout). Task-level symbols are not part of the core public API, so they are removed outright instead of shipping a deprecation cycle; the gym task IDs already point at the new configurations.
Its only consumer was the removed legacy ReorientObjectEnvCfg; neither the Direct env nor the parity manager configurations use an object-to-robot distance criterion.
The reorient manager cfgs repeated the same command, reward, and termination declarations per robot with one or two differing scalars. Move the defaults into two term factories and the invariant termination section in reorient_task_base; each variant now declares a small plain section class stating only its deltas (Allegro tolerance 0.2, OpenAI tolerance 0.4 with fall penalty and noisy-EMA action source). The camera manager cfg inherits the sections instead of re-declaring them.
Add reorient_joint_action and reorient_reset_event factories next to the existing command/reward factories: the action term differed only by the joint-name constant and the reset-event values were identical across all four copies (state, Allegro, and both OpenAI preset variants). Align the Allegro scene preset on the alias idiom used by the Shadow scene and loop set_num_envs over the backend alternatives.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review Map
Not split out (superseded on develop or out of series scope): the environment overview regen (#6410 covers develop) and a develop-obsoleted install-order test.
Summary
Metrics/success_rate), and PhysX/Newton/OVPhysX presets for the assigned dexterous tasks (Allegro + Shadow reorientation, OpenAI FF/LSTM, camera, handover).Direct vs manager training reference (qualifying campaign, seed 42)
Cell format:
reward|eplen|success_rate|{trained}iter(finalTrain/mean_reward,Train/mean_episode_length,Metrics/success_rate).Iteration budgets: 500 (Allegro), 3000 (all other rows). Every cell's source run consumed its full budget — verified cell-by-cell against the runs' event files (all three metrics of each cell match one run's final-iteration scalars). Cells read reward | episode length | success rate | iterations actually trained.
¹ Post-fix handover-Newton rows (Part 4's Newton fixes), full-budget qualifying runs on the warp-first environment code.
² Same success-rate definition as the other reorientation rows. Camera learning takes off late (reward ~400 plateau until a sharp transition; PhysX evidence crosses reward 1000 near iter ~1000, Newton near iter ~2300 — see ³); these rows' policies remained pre-takeoff at the recorded budget, so success at the 0.1 rad tolerance reads 0.00 and reward is the tracked pre-takeoff signal. The criterion itself is unchanged and proven reachable.
³ Full-budget qualifying run on the current branch head (seed 42, rgb_depth preset, Newton renderer, 1225 envs, rl_games workflow with its asymmetric actor-critic recipe): crossed reward 1000 at iter ~2300, tail-50 reward 1307, success rate 0.83 with ≥0.3 sustained for 43 consecutive iterations. Note the workflow difference: the other camera cells (and the rest of the table) are rsl_rl runs; the camera task has so far reached takeoff only under the rl_games recipe (also PhysX evidence: reward 1018, success 0.91 by iter ~1025), while the rsl_rl camera recipe remains pre-takeoff at full budget — a training-recipe sensitivity to be reconciled, not a physics/backend gap. Superseded on the torch tree: the torch-rework rsl_rl camera run reaches takeoff (reward > 1000, sr peak 1.0) by ~1500 iterations — the rsl_rl/rl_games recipe sensitivity no longer reproduces after the rework.
Reward scales differ per family; the Direct-vs-manager pair per row is the comparison that matters.
Torch re-validation (post-rework). Verified runs on the torch tree; the table below remains the warp-era campaign record.
Phase-2 requirement fulfillment
🟢 Met 🟡 Partial / queued 🔴 Gap ⚪ Not applicable
118 N/A cells are excluded. Success-related acceptance criteria (P2-C3–C7 and dependent P2-D1–D2) are deferred pending definition; no provisional threshold is treated as a requirement. Reward and episode length remain diagnostic only. Previously validated evidence is retained wherever the code path is unchanged by this diff (the OVPhysX path always used the production assets); only artifacts tied to the removed asset are queued for re-run. Sim-to-sim and sim-to-real are later waves and excluded. Current PR head:
5d7ddbbee82.Allegro cube reorientation — 🟢 49 · 🟡 15 · 88%
Isaac-Reorient-Cube-Allegro-DirectIsaac-Reorient-Cube-AllegroIsaac-Reorient-Cube-Allegro-PlayP2-S1· Assigned registration accounted forP2-S2· Manager-based training environmentP2-S3· Direct/Manager contracts comparableP2-S4· Rendering identified by Camera nameP2-S5· Play/Eval implementation consolidatedP2-B1· New asset evaluated; fallback justifiedP2-B2· PhysX / Newton / OV presets resolveP2-B3· PhysX constructs and trainsP2-B3· Newton constructs and trainsP2-B3· OVPhysX constructs and trainsP2-B4· Supported renderer matrix worksP2-B5· Camera framing and ground are usableP2-C1· RSL-RL configuration providedP2-C2· Success rate logged efficientlyP2-C3· Success criterion defined and configuredP2-C4· Success met within iteration/time budgetP2-C5· Multi-seed sanity checkP2-C6· Policy replay meets success criterionP2-C7· Two-reviewer behavior validationP2-C8· Reward and episode length tracked (non-gating)P2-Q1· Task-code hygieneP2-Q2· Independent package dependenciesP2-Q3· Variants and selections documentedP2-Q4· Open-issue auditP2-Q5· Automated contract checksP2-D1· Current-asset qualifying checkpointP2-D2· Replay/video and publication artifactsP2-D3· Runtime performance recordedP2-D4· Dashboard metrics recordedP2-D5· Recurring benchmark schema compatibleShadow state cube reorientation — 🟢 36 · 🟡 14 · 86%
Isaac-Reorient-Cube-Shadow-DirectIsaac-Reorient-Cube-ShadowP2-S1· Assigned registration accounted forP2-S2· Manager-based training environmentP2-S3· Direct/Manager contracts comparableP2-S4· Rendering identified by Camera nameP2-S5· Play/Eval implementation consolidatedP2-B1· New asset evaluated; fallback justifiedP2-B2· PhysX / Newton / OV presets resolveP2-B3· PhysX constructs and trainsP2-B3· Newton constructs and trainsP2-B3· OVPhysX constructs and trainsP2-B4· Supported renderer matrix worksP2-B5· Camera framing and ground are usableP2-C1· RSL-RL configuration providedP2-C2· Success rate logged efficientlyP2-C3· Success criterion defined and configuredP2-C4· Success met within iteration/time budgetP2-C5· Multi-seed sanity checkP2-C6· Policy replay meets success criterionP2-C7· Two-reviewer behavior validationP2-C8· Reward and episode length tracked (non-gating)P2-Q1· Task-code hygieneP2-Q2· Independent package dependenciesP2-Q3· Variants and selections documentedP2-Q4· Open-issue auditP2-Q5· Automated contract checksP2-D1· Current-asset qualifying checkpointP2-D2· Replay/video and publication artifactsP2-D3· Runtime performance recordedP2-D4· Dashboard metrics recordedP2-D5· Recurring benchmark schema compatibleShadow OpenAI FF cube reorientation — 🟢 36 · 🟡 14 · 86%
Isaac-Reorient-Cube-Shadow-OpenAI-FF-DirectIsaac-Reorient-Cube-Shadow-OpenAI-FFP2-S1· Assigned registration accounted forP2-S2· Manager-based training environmentP2-S3· Direct/Manager contracts comparableP2-S4· Rendering identified by Camera nameP2-S5· Play/Eval implementation consolidatedP2-B1· New asset evaluated; fallback justifiedP2-B2· PhysX / Newton / OV presets resolveP2-B3· PhysX constructs and trainsP2-B3· Newton constructs and trainsP2-B3· OVPhysX constructs and trainsP2-B4· Supported renderer matrix worksP2-B5· Camera framing and ground are usableP2-C1· RSL-RL configuration providedP2-C2· Success rate logged efficientlyP2-C3· Success criterion defined and configuredP2-C4· Success met within iteration/time budgetP2-C5· Multi-seed sanity checkP2-C6· Policy replay meets success criterionP2-C7· Two-reviewer behavior validationP2-C8· Reward and episode length tracked (non-gating)P2-Q1· Task-code hygieneP2-Q2· Independent package dependenciesP2-Q3· Variants and selections documentedP2-Q4· Open-issue auditP2-Q5· Automated contract checksP2-D1· Current-asset qualifying checkpointP2-D2· Replay/video and publication artifactsP2-D3· Runtime performance recordedP2-D4· Dashboard metrics recordedP2-D5· Recurring benchmark schema compatibleShadow OpenAI LSTM cube reorientation — 🟢 36 · 🟡 14 · 86%
Isaac-Reorient-Cube-Shadow-OpenAI-LSTM-DirectIsaac-Reorient-Cube-Shadow-OpenAI-LSTMP2-S1· Assigned registration accounted forP2-S2· Manager-based training environmentP2-S3· Direct/Manager contracts comparableP2-S4· Rendering identified by Camera nameP2-S5· Play/Eval implementation consolidatedP2-B1· New asset evaluated; fallback justifiedP2-B2· PhysX / Newton / OV presets resolveP2-B3· PhysX constructs and trainsP2-B3· Newton constructs and trainsP2-B3· OVPhysX constructs and trainsP2-B4· Supported renderer matrix worksP2-B5· Camera framing and ground are usableP2-C1· RSL-RL configuration providedP2-C2· Success rate logged efficientlyP2-C3· Success criterion defined and configuredP2-C4· Success met within iteration/time budgetP2-C5· Multi-seed sanity checkP2-C6· Policy replay meets success criterionP2-C7· Two-reviewer behavior validationP2-C8· Reward and episode length tracked (non-gating)P2-Q1· Task-code hygieneP2-Q2· Independent package dependenciesP2-Q3· Variants and selections documentedP2-Q4· Open-issue auditP2-Q5· Automated contract checksP2-D1· Current-asset qualifying checkpointP2-D2· Replay/video and publication artifactsP2-D3· Runtime performance recordedP2-D4· Dashboard metrics recordedP2-D5· Recurring benchmark schema compatibleShadow Camera cube reorientation — 🟢 100 · 🟡 28 · 89%
Isaac-Reorient-Cube-Shadow-Camera-DirectIsaac-Reorient-Cube-Shadow-CameraIsaac-Reorient-Cube-Shadow-Camera-Direct-PlayIsaac-Reorient-Cube-Shadow-Camera-PlayIsaac-Reorient-Cube-Shadow-Camera-Benchmark-DirectIsaac-Reorient-Cube-Shadow-Camera-BenchmarkP2-S1· Assigned registration accounted forP2-S2· Manager-based training environmentP2-S3· Direct/Manager contracts comparableP2-S4· Rendering identified by Camera nameP2-S5· Play/Eval implementation consolidatedP2-B1· New asset evaluated; fallback justifiedP2-B2· PhysX / Newton / OV presets resolveP2-B3· PhysX constructs and trainsP2-B3· Newton constructs and trainsP2-B3· OVPhysX constructs and trainsP2-B4· Supported renderer matrix worksP2-B5· Camera framing and ground are usableP2-C1· RSL-RL configuration providedP2-C2· Success rate logged efficientlyP2-C3· Success criterion defined and configuredP2-C4· Success met within iteration/time budgetP2-C5· Multi-seed sanity checkP2-C6· Policy replay meets success criterionP2-C7· Two-reviewer behavior validationP2-C8· Reward and episode length tracked (non-gating)P2-Q1· Task-code hygieneP2-Q2· Independent package dependenciesP2-Q3· Variants and selections documentedP2-Q4· Open-issue auditP2-Q5· Automated contract checksP2-D1· Current-asset qualifying checkpointP2-D2· Replay/video and publication artifactsP2-D3· Runtime performance recordedP2-D4· Dashboard metrics recordedP2-D5· Recurring benchmark schema compatibleShadow handover — 🟢 34 · 🟡 16 · 84%
Isaac-Shadow-Handover-DirectIsaac-Shadow-HandoverP2-S1· Assigned registration accounted forP2-S2· Manager-based training environmentP2-S3· Direct/Manager contracts comparableP2-S4· Rendering identified by Camera nameP2-S5· Play/Eval implementation consolidatedP2-B1· New asset evaluated; fallback justifiedP2-B2· PhysX / Newton / OV presets resolveP2-B3· PhysX constructs and trainsP2-B3· Newton constructs and trainsP2-B3· OVPhysX constructs and trainsP2-B4· Supported renderer matrix worksP2-B5· Camera framing and ground are usableP2-C1· RSL-RL configuration providedP2-C2· Success rate logged efficientlyP2-C3· Success criterion defined and configuredP2-C4· Success met within iteration/time budgetP2-C5· Multi-seed sanity checkP2-C6· Policy replay meets success criterionP2-C7· Two-reviewer behavior validationP2-C8· Reward and episode length tracked (non-gating)P2-Q1· Task-code hygieneP2-Q2· Independent package dependenciesP2-Q3· Variants and selections documentedP2-Q4· Open-issue auditP2-Q5· Automated contract checksP2-D1· Current-asset qualifying checkpointP2-D2· Replay/video and publication artifactsP2-D3· Runtime performance recordedP2-D4· Dashboard metrics recordedP2-D5· Recurring benchmark schema compatible