[Task Clean-up][Manager] Dexterous Part 11/11: Add the Shadow handover manager counterpart#6421
[Task Clean-up][Manager] Dexterous Part 11/11: Add the Shadow handover manager counterpart#6421hujc7 wants to merge 6 commits into
Conversation
Manager-based counterpart for the two-hand Shadow handover task with its own MDP term set (commands, events, observations, rewards, terminations), registered as Isaac-Shadow-Handover with a benchmark row. Completes the family-wide OVPhysX preset acceptance test and the handover configuration tests now that all manager counterparts exist. Validated by full handover manager training on PhysX (success streaks met; Newton column blocked by the upstream asset joint renumbering tracked separately).
Greptile SummaryThis PR adds the manager-based counterpart for the two-hand Shadow Hand handover task (
Confidence Score: 4/5The 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
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]
%%{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]
Reviews (1): Last reviewed commit: "Add the Shadow handover manager counterp..." | Re-trigger Greptile |
| 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() |
There was a problem hiding this comment.
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.
| 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() |
Mirrors the Warp general-function rewrite from the handover enablement PR; the handover configuration tests slim to the manager-side checks now that the Newton-backend tests live with the enablement PR.
Consumes the shared constants module and per-backend joint preset, normalizes log scalar types, forwards replicate_physics, and gates the benchmark row on evidence-calibrated thresholds including the provisional sustained success-rate gate.
The parity-only customs (direct_timeout, object_below_height, hand_joint_pos_normalized, hand_joint_vel) are replaced by their isaaclab.envs.mdp equivalents and deleted, the 24-dimensional object/goal observation block moves to a Warp kernel with a caller-owned buffer and parity tests, and the scalar task parameters come from the shared constants module.
The parity-only customs (direct_timeout, object_below_height, hand_joint_pos_normalized, hand_joint_vel) are replaced by their isaaclab.envs.mdp equivalents and deleted, the 24-dimensional object/goal observation block moves to a Warp kernel with a caller-owned buffer and parity tests, and the scalar task parameters come from the shared constants module.
The parity-only customs (direct_timeout, object_below_height, hand_joint_pos_normalized, hand_joint_vel) are replaced by their isaaclab.envs.mdp equivalents and deleted, the 24-dimensional object/goal observation block moves to a Warp kernel with a caller-owned buffer and parity tests, and the scalar task parameters come from the shared constants module.
Summary
Isaac-Shadow-Handoverwith a benchmark row.Dependencies
Review updates (2026-07-09)
direct_timeout,object_below_height,hand_joint_pos_normalized,hand_joint_vel) with theirisaaclab.envs.mdpequivalents and deleted them.