Skip to content

[Tasks] Fix composite physics preset selection - #7167

Open
StafaH wants to merge 3 commits into
isaac-sim:developfrom
StafaH:fix/tasks-typed-cabinet-physics-preset
Open

[Tasks] Fix composite physics preset selection#7167
StafaH wants to merge 3 commits into
isaac-sim:developfrom
StafaH:fix/tasks-typed-cabinet-physics-preset

Conversation

@StafaH

@StafaH StafaH commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Description

Fix typed physics=NAME selection for presets whose alternatives bundle a complete SimulationCfg.

The cabinet tasks use complete simulation presets because switching physics backends also changes the simulation timestep. Preset discovery and runtime validation previously classified alternatives only by their direct type, so these valid bundles appeared only under presets= and physics=newton_mjwarp was rejected.

This change:

  • centralizes typed preset classification in PresetTarget.matches();
  • classifies a SimulationCfg alternative as physics when its physics field is a PhysicsCfg;
  • uses the same classification for help discovery and runtime validation;
  • documents complete simulation physics presets; and
  • adds the required isaaclab_tasks changelog fragment.

A repository-wide audit found this pattern only in the shared cabinet configuration. The fix covers these four registrations:

  • Isaac-Open-Drawer-Franka
  • Isaac-Open-Drawer-Franka-Direct
  • IsaacContrib-Open-Drawer-Franka-IK-Abs
  • IsaacContrib-Open-Drawer-Franka-IK-Rel

No dependencies were added.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

Validation

  • uv run isaaclab train --task Isaac-Open-Drawer-Franka-Direct --rl_library rsl_rl --max_iterations 5 physics=newton_mjwarp
    • completed 5 iterations with 4,096 environments;
    • reported Physics: newton_mjwarp, no renderer, and no visualizer.
  • Resolved all five physics choices for all four affected registrations and verified the existing backend-specific timestep and decimation values.
  • uv run --frozen python -m pytest source/isaaclab_tasks/test/core/test_preset_cli.py source/isaaclab_tasks/test/core/test_hydra.py -q
    • 112 passed.
  • uv run isaaclab -f
    • passed.
  • uv run python tools/changelog/cli.py check develop --include-worktree
    • passed.
  • uv run --isolated --extra test -- make -C docs current-docs
    • blocked on current upstream develop while importing isaaclab_physx/assets/rigid_object_collection/kernels.py: TypeError: unsupported operand type(s) for |: 'type' and 'Tensor' at the existing wp.array | torch.Tensor annotation. The failure occurs before reading the edited page.

Per request, this PR does not add or modify tests.

Screenshots

Not applicable.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with uv run isaaclab -f
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings (full docs validation is blocked by the unrelated upstream error documented above)
  • I have added tests that prove my fix is effective or that my feature works (no tests added per request; covered by existing suites and the exact CLI regression)
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package
  • I have added my name to CONTRIBUTORS.md

@StafaH
StafaH requested a review from a team August 19, 2026 07:12
@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Aug 19, 2026
@greptile-apps

greptile-apps Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR fixes typed physics selection for presets that package a complete simulation configuration.

  • Centralizes typed preset classification in PresetTarget.matches().
  • Recognizes SimulationCfg alternatives containing a PhysicsCfg as physics presets in both help discovery and runtime validation.
  • Documents complete simulation physics presets and adds the required changelog and contributor updates.

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified.

The new matching logic consistently classifies the existing complete simulation alternatives as physics presets across help discovery and runtime validation without changing unrelated preset resolution.

Important Files Changed

Filename Overview
source/isaaclab_tasks/isaaclab_tasks/utils/preset_target.py Adds centralized target matching and correctly recognizes complete simulation configurations containing physics configurations.
source/isaaclab_tasks/isaaclab_tasks/utils/hydra.py Uses centralized matching when recording typed preset hits during resolution.
source/isaaclab_tasks/isaaclab_tasks/utils/preset_cli.py Uses the same matching contract for help-time preset classification.
docs/source/concepts/backends_and_presets.rst Documents that physics presets may replace the complete simulation configuration when backend-specific settings extend beyond physics fields.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[Preset alternative] --> B{PresetTarget.matches}
    B -->|PhysicsCfg| C[PHYSICS]
    B -->|SimulationCfg containing PhysicsCfg| C
    B -->|RendererCfg| D[RENDERER]
    B -->|No typed match| E[DOMAIN presets]
    C --> F[Help discovery and runtime validation]
    D --> F
    E --> F
Loading

Reviews (1): Last reviewed commit: "Fix typed composite physics presets" | Re-trigger Greptile

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

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.

Isaac Lab Review Bot

The change centralizes typed preset classification in PresetTarget.matches() and consistently applies it to help discovery and runtime validation. Complete SimulationCfg alternatives containing a PhysicsCfg are now recognized by physics=NAME, with corresponding documentation and changelog coverage.

  • Design and architecture: The shared predicate prevents help-time bucketing and runtime validation from diverging. Classifying any complete SimulationCfg carrying a concrete PhysicsCfg as a physics preset is broader than direct subclass matching, but it directly supports the cabinet preset structure and is a reasonable documented tradeoff.
  • API: Existing direct PhysicsCfg, RendererCfg, and domain preset behavior remains intact. The change only widens the accepted physics= surface to include qualifying complete simulation configurations; DOMAIN remains excluded from typed matching and access to cfg.physics is guarded by the SimulationCfg check.
  • Implementation: Both producer and consumer paths use PresetTarget.matches(): help bucketing classifies alternatives through it, while Hydra validation records the same typed target. Documentation and the package changelog describe the new behavior. A minor residual inconsistency remains in the unchanged __new__ parameter documentation, which still describes routing solely via isinstance, but it does not warrant blocking this fix.

No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.

Automated review; human maintainers own approval decisions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants