[Task Clean-up][Manager] Dexterous Part 6/8: Add the handover and camera manager counterparts#6421
[Task Clean-up][Manager] Dexterous Part 6/8: Add the handover and camera manager counterparts#6421hujc7 wants to merge 11 commits into
Conversation
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() |
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.
8cbac98 to
b27cb24
Compare
…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
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.
b27cb24 to
553cd1c
Compare
372cc6b to
216eb96
Compare
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.
216eb96 to
e1abb6b
Compare
Review Map
Summary
Stacking
Validation