Skip to content

Centralize shared physics preset ownership - #7301

Merged
ooctipus merged 4 commits into
isaac-sim:developfrom
ooctipus:codex/kuka-preset-ownership
Aug 23, 2026
Merged

Centralize shared physics preset ownership#7301
ooctipus merged 4 commits into
isaac-sim:developfrom
ooctipus:codex/kuka-preset-ownership

Conversation

@ooctipus

@ooctipus ooctipus commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Description

Centralize backend physics presets at task-family composition roots so robot-specific files own only genuinely robot-specific scalar configuration. Standardize Newton MJWarp velocity environments on two physics substeps at the shared family boundary.

  • Move the Kuka Allegro OvPhysX capacity settings into the shared lift PhysicsCfg and remove KukaAllegroPhysicsCfg.
  • Move the SO-101 articulation contact ordering setting into the shared stack PhysicsCfg and remove SO101StackPhysicsCfg.
  • Make RoughPhysicsCfg own the shared PhysX, MJWarp, and Kamino alternatives once.
  • Set the shared velocity MJWarp configuration to num_substeps=2 and remove every robot-specific substep assignment.
  • Remove the nine flat-locomotion PhysicsCfg(RoughPhysicsCfg) wrappers. Their environment configs now mutate only robot-specific MJWarp values on the inherited RoughPhysicsCfg instance.
  • Preserve shared Newton contact, collision-pipeline, and shape settings instead of replacing the whole shared alternative in robot-specific files.
  • Add an isaaclab_tasks major changelog fragment for the shared two-substep behavior change.

No additional dependencies are required.

Type of change

  • Refactor: centralize physics-preset ownership.
  • Breaking behavior change: Newton MJWarp velocity environments now use two physics substeps.

Validation

  • Existing focused lift, stack, velocity, and camera preset tests: 15 passed before the substep follow-up.
  • Focused velocity Newton config test after the substep follow-up: 1 passed.
  • Registered task preset-selection check: passed across the task registry.
  • Runtime configuration compatibility checks: 31 passed.
  • Structural audit confirms there is no PhysicsCfg(SomeOtherPhysicsCfg) inheritance under isaaclab_tasks.
  • Structural audit confirms no core/contrib robot-specific velocity config assigns .num_substeps.
  • Direct config audit confirms all ten affected concrete core/contrib velocity configs resolve MJWarp with two substeps.
  • uv run --frozen isaaclab -f: Ruff, formatting, and applicable source checks passed; the repository-wide changelog gate still reports pre-existing missing or modified fragments in untouched packages.
  • Additional preset CLI run: 26 passed; one could not complete because Isaac Sim requested interactive NVIDIA EULA acceptance, which was not accepted automatically.

Screenshots

Not applicable.

Checklist

  • Physics preset ownership is centralized without a compatibility layer.
  • The shared two-substep behavior change is recorded explicitly.
  • Existing tests cover preset construction and selection.
  • No test files were added or changed.
  • An isaaclab_tasks major changelog fragment is included.
  • No additional documentation changes are needed.

@ooctipus
ooctipus requested a review from a team August 22, 2026 22:14
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Aug 22, 2026
@greptile-apps

greptile-apps Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR centralizes stack, lift, and locomotion physics presets while retaining robot-specific Newton configurations.

  • Moves SO-101 contact ordering into the shared stack preset.
  • Moves Kuka Allegro OvPhysX capacities into the shared lift preset.
  • Reuses RoughPhysicsCfg across nine flat locomotion configurations.
  • Adds an isaaclab_tasks changelog skip fragment.

Confidence Score: 4/5

The shared stack contact-ordering change should be scoped back to SO-101 or explicitly validated for every affected stack robot before merging.

Enabling solve_articulation_contact_last in StackEnvCfg changes the effective PhysX solve order for existing non-SO-101 stack tasks that previously used the default false value.

Files Needing Attention: source/isaaclab_tasks/isaaclab_tasks/contrib/stack/stack_env_cfg.py

Important Files Changed

Filename Overview
source/isaaclab_tasks/isaaclab_tasks/contrib/stack/stack_env_cfg.py Broadens an SO-101-specific PhysX contact-ordering setting to all stack tasks, changing non-SO-101 dynamics.
source/isaaclab_tasks/isaaclab_tasks/contrib/stack/config/so101/stack_joint_pos_env_cfg.py Removes the robot-specific physics wrapper and relies on the shared stack preset; SO-101's effective setting is preserved.
source/isaaclab_tasks/isaaclab_tasks/core/lift/lift_env_cfg.py Adds the Kuka-sized OvPhysX configuration to the shared lift preset, extending it to other shared-preset lift tasks.
source/isaaclab_tasks/isaaclab_tasks/core/lift/config/kuka_allegro/kuka_allegro_env_cfg.py Removes the redundant Kuka physics subclass while preserving Kuka's preset values through the shared lift configuration.
source/isaaclab_tasks/isaaclab_tasks/core/velocity/velocity_env_cfg.py Broadens RoughPhysicsCfg's documented ownership so flat locomotion presets can inherit its common backend settings.
source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/anymal_d/flat_env_cfg.py Inherits shared PhysX presets while retaining Anymal D's explicit Newton solvers and robot-specific default.

Reviews (1): Last reviewed commit: "Centralize shared physics presets" | Re-trigger Greptile

gpu_total_aggregate_pairs_capacity=2**21,
friction_correlation_distance=0.00625,
# Let object contacts stall position-driven grippers before they tunnel through a grasp.
solve_articulation_contact_last=True,

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.

P1 Shared contact ordering changes dynamics

When a non-SO-101 stack task uses the default Isaac Sim PhysX preset, StackEnvCfg.__post_init__ now enables solve_articulation_contact_last, changing the articulation/contact solve order from its previous default and therefore changing grasp and contact dynamics for existing Franka, Galbot, and UR10 tasks.

Knowledge Base Used: isaaclab_tasks: Task Registration and Organization

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@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 locomotion preset reuse preserves the robot-specific Newton overrides, but the stack and lift centralization broadens two formerly robot-specific PhysX settings to entire task families. These scope changes conflict with the stated behavior-preserving cleanup and need either narrower ownership or explicit treatment as user-visible changes.

  • Design and architecture: Reusing RoughPhysicsCfg for the nine flat locomotion configurations follows the existing preset layering while retaining robot-specific Newton settings. However, moving solve_articulation_contact_last=True from the SO-101 preset into the shared stack PhysicsCfg changes contact ordering for every stack environment, not just SO-101.
  • API: The resolved backend preset behavior changes for existing consumers: all stack environments now receive the SO-101 contact-ordering setting, and all lift/reorient environments now receive the Kuka-derived OV PhysX capacity configuration. If these family-wide changes are intentional, they should be documented with appropriate release metadata rather than represented as a no-user-facing-change .skip entry.
  • Implementation: The velocity inheritance changes preserve the prior shared PhysX values and local Newton solver configurations. In contrast, wiring the OV preset into the shared lift PhysxAutoCfg broadens its allocation settings beyond Kuka Allegro, while adding the contact-ordering flag to shared stack physics broadens an SO-101-specific dynamics workaround. Keep those settings scoped to their original composition configs or explicitly acknowledge and validate the wider behavior and resource effects.

Minor fixes needed. Posted 2 actionable findings inline.

Automated review; human maintainers own approval decisions.

gpu_total_aggregate_pairs_capacity=2**21,
friction_correlation_distance=0.00625,
# Let object contacts stall position-driven grippers before they tunnel through a grasp.
solve_articulation_contact_last=True,

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.

🟡 Warning · Design Architecture — SO-101 contact ordering becomes stack-family default

solve_articulation_contact_last=True previously applied only when SO101CubeStackEnvCfg.__post_init__ installed SO101StackPhysicsCfg. On the family PhysicsCfg it changes PhysX contact-solve ordering for every environment deriving from StackEnvCfg, altering grasp dynamics and demonstration replay for robots that never opted in. Keep the flag in an SO-101-specific preset, or accept the family-wide change and record it as user-visible instead of a .skip fragment.

gpu_max_rigid_patch_count=4 * 5 * 2**15,
gpu_found_lost_pairs_capacity=2**26,
)
ovphysx = OvPhysxCfg(

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.

🔵 Suggestion · Api — Lift OV preset widened beyond Kuka Allegro

The shared lift PhysicsCfg previously built PhysxAutoCfg with no ovphysx preset, so non-Kuka lift/reorient tasks used OV defaults. Wiring these capacities (including gpu_found_lost_pairs_capacity=2**26) into physx changes OV backend allocation for the whole lift family. Either scope them to the Kuka composition config or document the intentional family-wide resource change rather than shipping a .skip fragment.

@@ -64,6 +70,7 @@ class RoughPhysicsCfg(PresetCfg):
debug_mode=False,

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.

Some comments for newton_mjwarp defaults I noticed:

njmax is really high.
num_substeps=1 should maybe be 2?
friction type pyramidal might be alot better than cone.

Also we can probably set defaults that don't need to be overrides, it makes sense that each robot has different value but I would expect the main difference is only njmax

@ooctipus ooctipus Aug 23, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 55815de. All Newton MJWarp velocity environments now use two physics substeps. RoughPhysicsCfg owns num_substeps=2 once, and every core/contrib robot-specific .num_substeps assignment has been removed. Spot has an independent velocity physics composition, so its MJWarp value is also set to 2. The shared config already uses cone="pyramidal"; robot-specific constraint capacities remain separate for now.


# physics
newton_mjwarp = self.sim.physics.newton_mjwarp
newton_mjwarp.solver_cfg.njmax = 95

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.

I would have expected njmax 192, and nconmax 48. nconmax 10 is very low.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

95/10 are the existing Isaac Lab G1-flat values; this refactor copies them onto the inherited shared preset rather than introducing new tuning. I also checked current MJLab main: its G1-flat config uses njmax=300 and nconmax=None, while G1 rough sets nconmax=70. Since 192/48 is neither the prior Isaac Lab behavior nor the current MJLab value, I am preserving parity here. I agree nconmax=10 is worth a separate capacity/stability benchmark and tuning PR.

@ooctipus
ooctipus merged commit f86b4e1 into isaac-sim:develop Aug 23, 2026
44 of 45 checks passed
StafaH pushed a commit that referenced this pull request Aug 24, 2026
…7312)

# Description

Backports #7301 to `release/3.0.0` by cherry-picking the canonical
merged commit `f86b4e1ad66e637e7770a727e181ffe150a2077b`.

This centralizes backend physics presets at the task-family composition
roots:

- Kuka Allegro reuses the shared lift physics configuration.
- SO-101 reuses the shared stack physics configuration.
- Flat velocity environments mutate robot-specific MJWarp values
directly instead of defining preset subclasses.
- Newton MJWarp velocity environments use two shared physics substeps,
with no robot-specific substep overrides.
- The corresponding Anymal-D Newton visualizer goldens and changelog
fragments are included.

The cherry-pick applied without conflicts, and all 21 affected files are
byte-for-byte identical to the merged #7301 versions.

## Validation

- `uv run --extra test --frozen python -m pytest -q
source/isaaclab_tasks/test/core/test_velocity_newton_cfg.py
source/isaaclab_tasks/test/core/test_lift_kuka_ovphysx_presets.py
source/isaaclab_tasks/test/core/test_lift_env_cfg.py` — 8 passed.
- Direct construction audit — all 10 affected Newton velocity configs
use `num_substeps=2`; SO-101 and Kuka inherit the intended shared
physics values.
- Structural audit — no `PhysicsCfg(RoughPhysicsCfg)`,
`KukaAllegroPhysicsCfg`, or `SO101StackPhysicsCfg` remains in task code;
robot-specific velocity configs do not assign `.num_substeps`.
- `uv run --frozen isaaclab -f` — all hooks passed, including changelog
and Git LFS checks.
ooctipus added a commit that referenced this pull request Aug 24, 2026
## Summary

- make resolve_task_config and parse_env_cfg the task configuration
composition boundary, with explicit programmatic overrides
- remove late preset fallback handling from environments, simulation,
launch scanning, camera validation, benchmarks, and RL summaries
- require runtime consumers to receive concrete physics, renderer, and
camera configurations
- route scripts, tools, integrations, and relevant tests through
registered task composition

This is a separate follow-up to #7301; it does not mix the earlier
preset ownership cleanup into this PR.

## Validation

- 129 Hydra and Shadow Hand camera tests passed
- 31 benchmark capture and RL entrypoint tests passed
- 23 experimental frontend tests passed, 1 skipped
- 5 custom-coupling tests passed
- representative composition audit confirmed six task trees contain no
remaining PresetCfg nodes
- Python compile checks passed for all changed runtime and script paths
- ruff and ruff-format passed

The full format command passes every hook except the changelog
comparison, which uses the stale local origin/develop ref and flags six
pre-existing upstream fragments that this branch does not modify. This
PR includes all required package fragments.
ooctipus added a commit to ooctipus/IsaacLab that referenced this pull request Aug 24, 2026
## Summary

- make resolve_task_config and parse_env_cfg the task configuration
composition boundary, with explicit programmatic overrides
- remove late preset fallback handling from environments, simulation,
launch scanning, camera validation, benchmarks, and RL summaries
- require runtime consumers to receive concrete physics, renderer, and
camera configurations
- route scripts, tools, integrations, and relevant tests through
registered task composition

This is a separate follow-up to isaac-sim#7301; it does not mix the earlier
preset ownership cleanup into this PR.

## Validation

- 129 Hydra and Shadow Hand camera tests passed
- 31 benchmark capture and RL entrypoint tests passed
- 23 experimental frontend tests passed, 1 skipped
- 5 custom-coupling tests passed
- representative composition audit confirmed six task trees contain no
remaining PresetCfg nodes
- Python compile checks passed for all changed runtime and script paths
- ruff and ruff-format passed

The full format command passes every hook except the changelog
comparison, which uses the stale local origin/develop ref and flags six
pre-existing upstream fragments that this branch does not modify. This
PR includes all required package fragments.

(cherry picked from commit 393fc37)
ooctipus added a commit that referenced this pull request Aug 24, 2026
…#7303 (#7313)

# Description

Backports six merged PRs to `release/3.0.0` as separate
provenance-preserving cherry-picks:

| Source PR | Source commit | Backport commit | Scope |
| --- | --- | --- | --- |
| #7272 | `0081477fea2` | `c9fc1997476` | Fix scene-wide gravity
distributions for PhysX and OvPhysX. |
| #7121 | `9f65e3d4fd2` | `cce8acd84e1` | Fix backend-factory fallback
before simulator initialization. |
| #7183 | `3fcc9c6b824` | `99d58d3d3c4` | Streamline the getting-started
documentation. |
| #7306 | `6aad90be0ae` | `9a786cc028a` | Optimize Newton test runtime.
|
| #7305 | `1c9ba908cf1` | `a2dc8ce948e` | Disable Warp autodiff in the
test suite. |
| #7303 | `393fc37d2b0` | `249a5cb97d8` | Remove post-Hydra preset
resolution. |

#7272 forwards the validated `uniform`, `log_uniform`, or `gaussian`
distribution through both scene-wide backend paths. Newton behavior is
unchanged.

#7121 makes factory resolution fall back to Newton when no
`SimulationContext` exists while retaining the visualizer contract of
reporting no active backend before context creation.

#7183 is documentation-only. #7306 and #7305 change test infrastructure
only; they do not change runtime behavior.

#7303 makes `resolve_task_config` and `parse_env_cfg` the
task-composition boundary. Runtime consumers now require concrete
physics, renderer, and camera configurations and no longer attempt late
preset fallback after Hydra composition.

The branch was synchronized with the current `release/3.0.0` tip
containing #7301 before #7303 was applied. All six source cherry-picks
applied without conflicts. A file-by-file existence, mode, and blob
audit confirmed that every #7303 path matches its merged source commit
exactly.

## Validation

### #7272

- Regression verification against the unpatched `release/3.0.0` tip —
both PhysX and OvPhysX cases failed as expected.
- `uv run --extra test --frozen python -m pytest -q
source/isaaclab/test/envs/test_gravity_randomization.py
source/isaaclab/test/envs/test_mdp_event_selectors.py` — 7 passed.
- `uv run --extra test --extra ovphysx --frozen python -m pytest -q
source/isaaclab_ov/test/physics/test_ovphysx_gravity.py` — 1 passed.

### #7121

- Regression verification before the #7121 cherry-pick reproduced the
original `NoneType.physics_manager` failure.
- `uv run --extra test --frozen python -m pytest -q
source/isaaclab/test/utils/test_backend_utils.py
source/isaaclab/test/visualizers/test_visualizer.py` — 18 passed.

### #7183

- `uv run --frozen --extra test python -m pytest --noconftest -q
tools/test/test_environ_docs.py` — 26 passed.

### #7306

- All 9 affected paths match the merged source PR exactly.
- The full simulator-backed Newton suite is left to backport CI because
this local worktree does not include the full Isaac Sim runtime.

### #7305

- Loaded the root `conftest.py` successfully with Warp unavailable.
- Loaded it with Warp installed and confirmed `wp.config.enable_backward
is False`.

### #7303

- Hydra and Shadow Hand camera suites — 129 passed.
- Benchmark capture and RL entrypoint suites — 31 passed.
- Experimental frontend and custom-coupling suites — 74 passed, 1
skipped.
- Ruff and Ruff-format passed for every changed Python path.
- Source/backport audit — 54 paths checked, 0 mismatches.
- The Isaac Sim-backed integration case is left to CI because this local
worktree is kitless.

### Repository gates

- `git diff --check upstream/release/3.0.0...HEAD` — passed.

---------

Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
Co-authored-by: Antoine RICHARD <antoiner@nvidia.com>
Co-authored-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
Co-authored-by: Mustafa H <34825877+StafaH@users.noreply.github.com>
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.

3 participants