Skip to content

[Task Clean-up][Manager] Dexterous Part 6/8: Add the handover and camera manager counterparts#6421

Open
hujc7 wants to merge 11 commits into
isaac-sim:developfrom
hujc7:jichuanh/task-cleanup-dex-part11
Open

[Task Clean-up][Manager] Dexterous Part 6/8: Add the handover and camera manager counterparts#6421
hujc7 wants to merge 11 commits into
isaac-sim:developfrom
hujc7:jichuanh/task-cleanup-dex-part11

Conversation

@hujc7

@hujc7 hujc7 commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Review Map

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

Summary

Stacking

Validation

@greptile-apps

greptile-apps Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds the manager-based counterpart for the two-hand Shadow Hand handover task (Isaac-Shadow-Handover), completing Part 11 of the dexterous task clean-up series. It introduces a new MDP term set (commands, events, observations, rewards, terminations), wires them into a HandoverManagerEnvCfg, and lands the family-wide OVPhysX acceptance test and handover configuration tests that depend on all prior parts being merged.

Confidence Score: 4/5

The change adds new files only (plus a two-line extension to init.py); no existing behavior is modified. The new env config correctly delegates scene/physics to the Direct base, and the MDP terms are consistent in frame conventions.

All newly added files follow the established lazy_export + PresetCfg pattern from the reorient task family. Frame conventions (local vs world) are consistent across commands, events, observations, and rewards. The single finding — storing two log values as zero-dim tensors while adjacent keys use .item() — is an inconsistency that could silently break a strict logging backend but does not affect training correctness.

source/isaaclab_tasks/isaaclab_tasks/core/handover/mdp/rewards.py — the dist_reward/dist_goal logging inconsistency noted above.

Important Files Changed

Filename Overview
source/isaaclab_tasks/isaaclab_tasks/core/handover/handover_manager_env_cfg.py New manager-based handover env config; delegates all scene/physics/action settings to the Direct base config via module-level _DIRECT_CFG and PresetCfg presets. Clean structure with no logic bugs found.
source/isaaclab_tasks/isaaclab_tasks/core/handover/mdp/rewards.py HandoverReward class computes sticky episode success and logs diagnostics; dist_reward and dist_goal are stored as zero-dim tensors without .item(), unlike the Metrics/* keys. Reward scaling via /step_dt is intentional and explained in comments.
source/isaaclab_tasks/isaaclab_tasks/core/handover/mdp/commands.py HandoverCommand samples fixed goal position from object default_root_pose plus offset and randomizes X/Y orientation per episode; consistent with Direct env's distribution. Goal position is correctly in local/env frame throughout.
source/isaaclab_tasks/isaaclab_tasks/core/handover/mdp/events.py reset_handover_state mirrors Direct env's reset distribution for object pose/velocity and both hands; uses env._handover_reset_actions side-channel to thread pre-reset actions into observations cleanly.
source/isaaclab_tasks/isaaclab_tasks/core/handover/mdp/observations.py All seven observation terms are frame-consistent (local/env frame for positions, world frame for velocities which are origin-invariant). object_goal returns a 24-dim block matching the Direct env layout.
source/isaaclab_tasks/isaaclab_tasks/core/handover/mdp/terminations.py Two simple termination terms: height-based fall detection and direct_timeout that exactly matches the Direct MARL boundary (>= max_episode_length - 1).
source/isaaclab_tasks/isaaclab_tasks/core/handover/init.py Registers new Isaac-Shadow-Handover manager env and adds rsl_rl_cfg_entry_point to the existing Direct registration.
source/isaaclab_tasks/test/core/test_handover_env_cfg.py New config tests verify asset reuse, pose consistency across backends, and Newton distal-joint override. Tests look correct and cover the key structural invariants.
source/isaaclab_tasks/test/core/test_dexterous_ovphysx_presets.py Family-wide OVPhysX acceptance test covering 15 dexterous variants including the new HandoverManagerEnvCfg; also tests Newton presets for allegro/handover variants.
source/isaaclab_tasks/test/benchmarking/configs.yaml Adds Isaac-Shadow-Handover benchmark row with same thresholds as the existing Direct variant (max_iterations=3000, reward>=1000, episode_length>=150).

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[ManagerBasedRLEnv\nIsaac-Shadow-Handover] --> B[HandoverManagerEnvCfg]

    B --> C[HandoverManagerSceneCfg\nPresetCfg: physx / newton_mjwarp / ovphysx]
    C --> C1[_HandoverManagerSceneCfg\nright_hand / left_hand / object]
    C1 --> C2[_DIRECT_CFG.right_robot_cfg\n_DIRECT_CFG.left_robot_cfg]

    B --> D[ActionsCfg\nEMAJointPositionToLimitsActionCfg\nright_hand + left_hand]
    B --> E[CommandsCfg\nHandoverCommand\nfixed pos + random X/Y orientation]
    B --> F[ObservationsCfg\nPolicyCfg: right 157-dim + left 157-dim]
    B --> G[EventCfg\nreset_handover_state]
    B --> H[RewardsCfg\nHandoverReward\n2x exp reward / step_dt]
    B --> I[TerminationsCfg\nobject_below_height + direct_timeout]

    G -->|env._handover_reset_actions| J[hand_action obs term]
    H -->|sticky success flag| K[Metrics/success_rate at reset]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[ManagerBasedRLEnv\nIsaac-Shadow-Handover] --> B[HandoverManagerEnvCfg]

    B --> C[HandoverManagerSceneCfg\nPresetCfg: physx / newton_mjwarp / ovphysx]
    C --> C1[_HandoverManagerSceneCfg\nright_hand / left_hand / object]
    C1 --> C2[_DIRECT_CFG.right_robot_cfg\n_DIRECT_CFG.left_robot_cfg]

    B --> D[ActionsCfg\nEMAJointPositionToLimitsActionCfg\nright_hand + left_hand]
    B --> E[CommandsCfg\nHandoverCommand\nfixed pos + random X/Y orientation]
    B --> F[ObservationsCfg\nPolicyCfg: right 157-dim + left 157-dim]
    B --> G[EventCfg\nreset_handover_state]
    B --> H[RewardsCfg\nHandoverReward\n2x exp reward / step_dt]
    B --> I[TerminationsCfg\nobject_below_height + direct_timeout]

    G -->|env._handover_reset_actions| J[hand_action obs term]
    H -->|sticky success flag| K[Metrics/success_rate at reset]
Loading

Reviews (1): Last reviewed commit: "Add the Shadow handover manager counterp..." | Re-trigger Greptile

Comment on lines +80 to +82
env.extras.setdefault("log", {})["dist_reward"] = per_agent_reward.mean()
env.extras["log"]["dist_goal"] = goal_distance.mean()
env.extras["log"]["Metrics/goal_distance"] = goal_distance.mean().item()

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.

P2 Mixed tensor/scalar types in extras log dict. dist_reward and dist_goal are stored as zero-dim PyTorch tensors (.mean() without .item()), while the Metrics/* keys on the very next lines use .item() to produce Python floats. A logging backend that serializes extras["log"] to JSON or passes values to a scalar summarizer will silently fail or produce unexpected output for those two keys.

Suggested change
env.extras.setdefault("log", {})["dist_reward"] = per_agent_reward.mean()
env.extras["log"]["dist_goal"] = goal_distance.mean()
env.extras["log"]["Metrics/goal_distance"] = goal_distance.mean().item()
env.extras.setdefault("log", {})["dist_reward"] = per_agent_reward.mean().item()
env.extras["log"]["dist_goal"] = goal_distance.mean().item()
env.extras["log"]["Metrics/goal_distance"] = goal_distance.mean().item()

hujc7 added 2 commits July 16, 2026 17:44
Add a behavioral Metrics/success_rate signal (goal-reach streaks per
episode) and threshold-independent episode orientation-error diagnostics
to the Direct reorientation environments, with the shared helpers in
isaaclab_tasks.core.utils and torch math tests. The task logic is
torch-first per the mainline convention; success gates task health while
reward stays diagnostic. Also fix hand resets that could initialize
joints below their lower position limits.
Add the RSL-RL runner configuration for the Shadow handover Direct task
and success-rate metrics on the torch-first path, fix handover
construction on Newton (renamed distal joints), and land the camera
Direct renderer presets with configuration validation. RSL-RL
observations now read from the public environment-owned obs_buf on all
Direct env bases (reset stores the buffer like step), replacing the
adapter-side private hook.
@hujc7
hujc7 force-pushed the jichuanh/task-cleanup-dex-part11 branch from 8cbac98 to b27cb24 Compare July 17, 2026 00:59
@hujc7 hujc7 changed the title [Task Clean-up][Manager] Dexterous Part 11/11: Add the Shadow handover manager counterpart [Task Clean-up][Manager] Dexterous Part 11: Add the handover and camera manager counterparts Jul 17, 2026
@hujc7 hujc7 changed the title [Task Clean-up][Manager] Dexterous Part 11: Add the handover and camera manager counterparts [Task Clean-up][Manager] Dexterous Part 11/11: Add the Shadow handover manager counterpart Jul 17, 2026
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
@hujc7 hujc7 changed the title [Task Clean-up][Manager] Dexterous Part 11/11: Add the Shadow handover manager counterpart [Task Clean-up][Manager] Dexterous Part 6/8: Add the handover and camera manager counterparts Jul 17, 2026
hujc7 added 2 commits July 18, 2026 03:58
Fold the reviewed lump changes that belong to this part's content:

- Share the handover sim settings through the HandoverTaskCfgBase
  mixin instead of a module-level cfg variable.
- Reuse isaaclab.utils.math.quat_mul for the Newton initial-rotation
  composition instead of a local xyzw product helper.
- Nest the single-consumer tiled-camera helper cfg inside the camera
  task cfg.
- Drop the stale kit-less OpenUSD bullet from the isaaclab changelog
  fragment.

Source commits on the lump branch: 2c22af0, 2c5ea5b,
42675b6, 1f05f85.
Fold the reviewed lump changes that belong to this part's content:

- Share per-family sim settings through task-cfg base mixins.
- Deduplicate backend scene presets via inner-class defaults and nest
  single-consumer helper cfgs in the shadow-hand Direct cfg.
- Compute the orientation error through
  isaaclab.utils.math.quat_error_magnitude and delete the local
  direct_reorient_rotation_distance primitive.
- Rename direct_reorient_reward to reorient_reward: shared symbols
  carry no paradigm prefix.

Source commits on the lump branch: 2c22af0, 792e400,
42675b6, c6140f9, 173e9dc.
@hujc7
hujc7 force-pushed the jichuanh/task-cleanup-dex-part11 branch from b27cb24 to 553cd1c Compare July 18, 2026 11:10
@hujc7
hujc7 requested a review from a team July 18, 2026 11:10
@hujc7
hujc7 force-pushed the jichuanh/task-cleanup-dex-part11 branch 3 times, most recently from 372cc6b to 216eb96 Compare July 19, 2026 08:20
hujc7 added 6 commits July 20, 2026 15:32
Part 3 share of the lump readability round (cdaadac): the Direct
cfg files keep only task values; asset and marker cfgs, name lists,
backend presets, and noise cfgs move to shadow_hand_common and
allegro_hand_common, task geometry to reorient_common, and
reorient_task_base is removed. The Shadow Direct files carry the
workflow marker in their names.
…eanup-dex-part04

# Conflicts:
#	source/isaaclab_tasks/test/core/test_dexterous_task_math.py
Rebuilt from the reviewed lump so the manager counterparts land with
the review rounds folded in: inline section values per file (drift
guarded by the value-parity test incl. sim), identity from the common
modules, the OpenAI variant in its own module, and no sim mixins.

Lump review commits folded: 2c22af0, 792e400, 42675b6,
1f05f85, c6140f9, 173e9dc, 2727616, 1732493,
3659a33, ee272c9, cdaadac.
Part 4 share of the lump readability round (cdaadac): the camera
Direct files carry the workflow marker in their names and read the
camera geometry from reorient_common; handover_task_base is renamed
handover_common and the handover files take the Shadow identity from
shadow_hand_common. Sim settings are declared inline per file.
Rebuilt from the reviewed lump so the handover and camera manager
counterparts land with the review rounds folded in: inline section
values per file, identity from the common modules, camera manager
overriding only the fields that differ, and no sim mixins.

Lump review commits folded: 792e400, 42675b6, 1f05f85,
173e9dc, 2727616, 1732493, 3659a33, ee272c9,
cdaadac.
@hujc7
hujc7 force-pushed the jichuanh/task-cleanup-dex-part11 branch from 216eb96 to e1abb6b Compare July 20, 2026 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant