Skip to content

[Workflow] Default classic core tasks to Newton - #7066

Merged
ooctipus merged 21 commits into
isaac-sim:developfrom
StafaH:mh/default-newton-classic
Aug 15, 2026
Merged

[Workflow] Default classic core tasks to Newton#7066
ooctipus merged 21 commits into
isaac-sim:developfrom
StafaH:mh/default-newton-classic

Conversation

@StafaH

@StafaH StafaH commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Splits the Cartpole and shared-renderer defaults from #6980.\n\n- Defaults Cartpole to Newton MJWarp.\n- Defaults MultiBackendRendererCfg to the Newton renderer while retaining explicit Isaac RTX selection.\n- Consolidates core environment smoke tests into one three-backend matrix (newton_mjwarp, physx, isaacsim_physx).\n- Removes obsolete Play/MJWarp-discovery test utility logic and the redundant Newton test module.\n\nValidation: uv run python -m pytest source/isaaclab_tasks/test/core/test_preset_kit_decision.py source/isaaclab_tasks/test/core/test_runtime_compatibility.py -q (51 passed).\n\nSupersedes the classic-controls portion of #6980.

@greptile-apps

greptile-apps Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR changes Cartpole's default physics and rendering backends to Newton and consolidates core environment smoke coverage around three backend selections.

  • Defaults direct and manager-based Cartpole configurations to Newton MJWarp.
  • Defaults Cartpole camera rendering to the Newton renderer while preserving explicit alternatives.
  • Replaces the separate Newton smoke module with a config-derived backend matrix and updates related tests and golden artifacts.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
source/isaaclab_tasks/test/core/test_environments.py Consolidates core environment smoke coverage into task/backend parameters derived from registered configurations.
source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_direct_env_cfg.py Changes the direct Cartpole physics default from Isaac Sim PhysX to Newton MJWarp.
source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_manager_env_cfg.py Changes the manager-based Cartpole physics default to Newton MJWarp.
source/isaaclab_tasks/test/env_test_utils.py Simplifies environment discovery and supports explicit physics selection in consolidated smoke tests.

Reviews (2): Last reviewed commit: "Revert "Split environment smoke tests by..." | Re-trigger Greptile

# Local imports should be imported last
from env_test_utils import _run_environments, setup_environment # isort: skip

@pytest.mark.parametrize("physics_preset_name", ["newton_mjwarp", "physx", "isaacsim_physx"])

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 Unsupported presets break smoke matrix

When the Fourbar Pole task is collected, this matrix passes newton_mjwarp, physx, and isaacsim_physx to a configuration that declares only default and newton_kamino; preset resolution raises ValueError, causing the consolidated CI smoke suite to fail.

Knowledge Base Used: isaaclab_tasks: Task Registration and Organization

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 6c98c4f: core smoke parameters are now generated only for explicitly declared PhysicsCfg presets, so Fourbar is not mislabeled as running unsupported backends.

@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 consistently defaults both Cartpole configurations and the shared renderer preset to Newton while retaining explicit Isaac Sim PhysX and RTX selections. The consolidated smoke-test matrix and workflow update account for removal of the separate Newton test module.

  • Design and architecture: The physics and renderer default changes align across direct and manager-based Cartpole configurations. Backend selection remains explicit through newton_mjwarp, physx, isaacsim_physx, rtx, and isaacsim_rtx, preserving the intended compatibility paths.
  • API: The changed preset fields retain concrete types, and explicit Isaac RTX selection remains available as a distinct IsaacRtxRendererCfg. Updated test-utility callers no longer use the removed discovery arguments, and the breaking default change includes a changelog fragment with migration guidance.
  • Implementation: Preset-resolution and runtime-compatibility tests trace the new kitless Newton/OVRTX default as well as explicit Kit-backed selections. The three-backend core smoke-test matrix replaces the removed Newton-specific module, and cleanup now collects Warp-backed objects before simulation teardown. The candidate concern is limited to contradictory test names and docstrings; it does not demonstrate a production behavior or contract failure requiring pre-merge action.

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.

@configclass
class MultiBackendRendererCfg(PresetCfg):
default: IsaacRtxRendererCfg = IsaacRtxRendererCfg()
default: NewtonWarpRendererCfg = NewtonWarpRendererCfg()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This changes the renderer default for every task that uses MultiBackendRendererCfg, not only the Cartpole family. The failures show that several existing consumers cannot use that default:

  • Mimic and contrib GR1T2 PickPlace now instantiate NewtonWarpRenderer and fail with ValueError: Failed to load texture: ...GR1T2_albedo.<UDIM>.png, so dataset generation never starts.
  • The XR-camera and Shadow Hand preset tests resolve default to NewtonWarpRendererCfg instead of their required IsaacRtxRendererCfg.
  • Registered-task rendering loses the Kit RenderProduct, and Newton returns no output for the MDL shading data types those tasks request.

Please keep the shared default unchanged and introduce a Cartpole-specific renderer preset/default, or migrate and explicitly pin every affected consumer while providing the missing Newton renderer support. The current shared change is a runtime regression outside the PR title scope.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 6c98c4f: MultiBackendRendererCfg retains its Isaac RTX default. Newton renderer defaults are now scoped to the Cartpole camera configurations, preserving contrib, Mimic, XR, and Shadow Hand behavior.

from env_test_utils import _run_environments, setup_environment # isort: skip


@pytest.mark.parametrize("physics_preset_name", ["newton_mjwarp", "physx", "isaacsim_physx"])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This matrix does not guarantee the backend named in the test ID. Global preset resolution falls back to default when a task does not expose the requested name. The CI log demonstrates this directly: all three newton_mjwarp, physx, and isaacsim_physx Fourbar cases pass even though Fourbar only declares default/newton_kamino; the labels are therefore not evidence that those backends ran.

Please generate only supported (task, physics preset) pairs, or use a strict physics selector that errors when unavailable. Also restore include_play=False unless every Play variant is intentional: this change collected 252 cases here and 42 stage-in-memory cases, substantially increasing runtime and repeated teardown pressure.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 6c98c4f: the matrix now includes only task/backend pairs whose raw config explicitly exposes the requested physics preset. Play filtering remains removed because the current registry has no Play task variants.

Changed
^^^^^^^

* **Breaking:** Changed the Cartpole task family and the default renderer preset

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This entry explicitly marks both default changes as breaking, but I could not find a prior deprecation for either the Cartpole backend default or the shared renderer default. Please reconcile this with the repository policy that breaking changes require a deprecation first, or document why these default changes are exempt.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is an intentional 3.0 breaking default change. The fragment now accurately scopes it to Cartpole and provides the explicit-preset migration path; we are not adding deprecation artifacts for this release.

@AntoineRichard

Copy link
Copy Markdown
Collaborator

I traced all seven red jobs at 543ee34:

  1. The shared renderer-default change causes deterministic cross-task regressions. isaaclab_mimic and the contrib PickPlace smoke test both fail while Newton loads the GR1T2 UDIM texture; the XR/Shadow preset assertions resolve Newton instead of Isaac RTX; and the two RL summary expectations still describe the former concrete defaults.
  2. The default-rendering baselines were not migrated. test_rendering_registered_tasks has seven failures: the Cartpole stage no longer has the Kit RenderProduct/PhysX prims, RGB differs by 94.01%, albedo by 2.47%, and the Newton renderer produces zero outputs for the three MDL shading variants. Shadow Hand also loses its Kit RenderProduct. The visualizer job separately reports a stable 6.33% pixel difference for newton-cartpole-kit-tiled; that helper leaves the renderer implicit, so the shared default change affects a test labeled Kit.
  3. Two task files terminate natively. test_environments_with_stage_in_memory.py exits 139 while starting Isaac-Lift-Soft-Franka-Camera; test_environments.py exits 139 during Isaac-Lift-Cloth-Franka-Camera with newton_mjwarp. Neither produces a Python traceback or JUnit report. These should be isolated after the renderer scope is corrected.

The assertion/image/texture failures are deterministic and will not be fixed by a rerun. I would first make the Newton renderer default Cartpole-specific (or complete the migration of every shared consumer), then update or explicitly pin the Cartpole/Kit golden tests and rerun the two crash-only cases.

@StafaH
StafaH requested a review from matthewtrepte as a code owner August 13, 2026 20:18
@StafaH

StafaH commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the deterministic regressions in 6c98c4f and 1e76a29: the generic renderer default is restored to Isaac RTX, while Newton is the default renderer only for Cartpole camera configs; Cartpole visualizer goldens explicitly pin Isaac RTX; and the smoke matrix filters to supported PhysicsCfg presets. The existing teardown release/GC fix remains in place for the native cleanup crashes. The default switch is intentional for 3.0 and documented without deprecation artifacts.

@StafaH StafaH closed this Aug 14, 2026
@StafaH StafaH reopened this Aug 14, 2026
…classic

# Conflicts:
#	.github/workflows/build.yaml
#	source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py
#	source/isaaclab_tasks/test/contrib/test_contrib_environments_smoke.py
#	source/isaaclab_tasks/test/contrib/test_pickplace_stack_environments.py
#	source/isaaclab_tasks/test/contrib/test_teleop_environments.py
#	source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py
#	source/isaaclab_tasks/test/core/test_environments_isaacsim_physx.py
#	source/isaaclab_tasks/test/core/test_environments_newton.py
#	source/isaaclab_tasks/test/core/test_environments_ovphysx.py
#	source/isaaclab_tasks/test/core/test_environments_with_stage_in_memory.py
#	source/isaaclab_tasks/test/core/test_preset_kit_decision.py
#	source/isaaclab_tasks/test/core/test_record_video.py
#	source/isaaclab_tasks/test/env_test_utils.py
@ooctipus
ooctipus merged commit 0caae64 into isaac-sim:develop Aug 15, 2026
73 of 77 checks passed
@ooctipus
ooctipus deleted the mh/default-newton-classic branch August 15, 2026 11:07
kellyguo11 pushed a commit that referenced this pull request Sep 3, 2026
… physics backend (#7334)

# Description

`--deterministic` configured PyTorch and the Isaac RTX renderer but
never reached the physics solver, so training on Newton backends was not
reproducible even with the flag passed. Two defaults moved out from
under the flag between 3.0beta2 and GA:

| Default | v3.0.0-beta2 | GA |
|---|---|---|
| `CartpolePhysicsCfg.default` | `PhysxCfg()` | `NewtonCfg` MJWarp,
`deterministic_mode="not_guaranteed"` |
| `MultiBackendRendererCfg.default` | `IsaacRtxRendererCfg()` |
`NewtonWarpRendererCfg()` |

The physics switch landed in `0caae64dc7c` (#7066), absent from all
three `v3.0.0-beta*` tags. At beta2 the flag worked because PhysX is
run-to-run deterministic for rigid bodies **and** Isaac RTX was the
default renderer; both premises were removed without re-wiring the flag.

`--deterministic` now sets `PhysicsCfg.deterministic` on the resolved
physics config, in `apply_env_overrides()` — the existing CLI-to-cfg
seam, after `scan()` resolves the backend and before the solver is
built. That field is the backend-agnostic request; each physics manager
translates it when the simulation starts:

- **Newton** derives `deterministic_mode="run_to_run"`, applies the
MJWarp `disable_sensors` prerequisite on the GPU path, and leaves
MuJoCo-CPU alone. An explicitly set `deterministic_mode` wins.
- **PhysX / OvPhysX** enable `enable_enhanced_determinism`. OvPhysX is
best-effort and not verified end to end.

Validation stays with the backend:
`NewtonManager._validate_deterministic_solver_cfg()` rejects an
unsupported solver at solver initialization, so there is one policy and
one set of error messages rather than a copy in the RL layer. Adding a
backend no longer means editing `isaaclab_rl`.

**A determinism request that would starve a sensor is now refused.**
Disabling MuJoCo Warp's sensors also skips its `rne_postconstraint`
stage, which fills Newton's `body_qdd` / `body_parent_f`. The IMU, PVA
and joint-wrench sensors read that state, so `Isaac-Ant`,
`Isaac-Humanoid` and `Isaac-Repose-Cube-Shadow` — all defaulting to
`newton_mjwarp` and feeding `joint_wrench` into their policy
observations — would have trained on values that are never refreshed,
with no error. `NewtonManager` raises at solver initialization, the only
point where both the solver config and the registered sensors are
visible.

The guard restates `{"body_qdd", "body_parent_f"}`, which Newton also
states internally (`solver_mujoco.py:4360` as a set, `:5179` as an
equivalent `or`-chain). That duplication is tracked upstream in
newton-physics/newton#4109, which asks for two
things: Newton refusing the combination at the source, and exporting the
field set as a public constant. Either lets this guard shrink — the
constant and its sensor-tracking delete entirely once Isaac Lab pins a
Newton that raises. Until then the guard is what prevents the silent
case, so it stays.

Fixes NVBug 6658578 (P0, Isaac Lab 3.0 GA).

## Type of change

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

## Validation

Three `--deterministic` runs of `Isaac-Cartpole-Camera` (50 epochs, task
defaults) on one L40, each in its own container:

```
det1 vs det2   55/55 checkpoint tensors bitwise identical
det1 vs det3   55/55 checkpoint tensors bitwise identical
ctrl1 vs ctrl2 41/55 differ          <- same task, no flag
```

The unflagged controls diverge, so the agreement above is the flag's
doing rather than a task that is trivially reproducible. `Isaac-Ant
--deterministic` fails at startup with the sensor message. MuJoCo-CPU
could not be exercised: `SolverMuJoCo.get_max_contact_count()` raises
`NotImplementedError` on that path, so it is unreachable in Isaac Lab
today.

8 unit tests added; 200 pass across `test_entrypoints_common.py` and
`test_newton_manager_abstraction.py`.

## Release backport

- [x] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
isaaclab-bot Bot pushed a commit that referenced this pull request Sep 3, 2026
… physics backend (#7334)

# Description

`--deterministic` configured PyTorch and the Isaac RTX renderer but
never reached the physics solver, so training on Newton backends was not
reproducible even with the flag passed. Two defaults moved out from
under the flag between 3.0beta2 and GA:

| Default | v3.0.0-beta2 | GA |
|---|---|---|
| `CartpolePhysicsCfg.default` | `PhysxCfg()` | `NewtonCfg` MJWarp,
`deterministic_mode="not_guaranteed"` |
| `MultiBackendRendererCfg.default` | `IsaacRtxRendererCfg()` |
`NewtonWarpRendererCfg()` |

The physics switch landed in `0caae64dc7c` (#7066), absent from all
three `v3.0.0-beta*` tags. At beta2 the flag worked because PhysX is
run-to-run deterministic for rigid bodies **and** Isaac RTX was the
default renderer; both premises were removed without re-wiring the flag.

`--deterministic` now sets `PhysicsCfg.deterministic` on the resolved
physics config, in `apply_env_overrides()` — the existing CLI-to-cfg
seam, after `scan()` resolves the backend and before the solver is
built. That field is the backend-agnostic request; each physics manager
translates it when the simulation starts:

- **Newton** derives `deterministic_mode="run_to_run"`, applies the
MJWarp `disable_sensors` prerequisite on the GPU path, and leaves
MuJoCo-CPU alone. An explicitly set `deterministic_mode` wins.
- **PhysX / OvPhysX** enable `enable_enhanced_determinism`. OvPhysX is
best-effort and not verified end to end.

Validation stays with the backend:
`NewtonManager._validate_deterministic_solver_cfg()` rejects an
unsupported solver at solver initialization, so there is one policy and
one set of error messages rather than a copy in the RL layer. Adding a
backend no longer means editing `isaaclab_rl`.

**A determinism request that would starve a sensor is now refused.**
Disabling MuJoCo Warp's sensors also skips its `rne_postconstraint`
stage, which fills Newton's `body_qdd` / `body_parent_f`. The IMU, PVA
and joint-wrench sensors read that state, so `Isaac-Ant`,
`Isaac-Humanoid` and `Isaac-Repose-Cube-Shadow` — all defaulting to
`newton_mjwarp` and feeding `joint_wrench` into their policy
observations — would have trained on values that are never refreshed,
with no error. `NewtonManager` raises at solver initialization, the only
point where both the solver config and the registered sensors are
visible.

The guard restates `{"body_qdd", "body_parent_f"}`, which Newton also
states internally (`solver_mujoco.py:4360` as a set, `:5179` as an
equivalent `or`-chain). That duplication is tracked upstream in
newton-physics/newton#4109, which asks for two
things: Newton refusing the combination at the source, and exporting the
field set as a public constant. Either lets this guard shrink — the
constant and its sensor-tracking delete entirely once Isaac Lab pins a
Newton that raises. Until then the guard is what prevents the silent
case, so it stays.

Fixes NVBug 6658578 (P0, Isaac Lab 3.0 GA).

## Type of change

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

## Validation

Three `--deterministic` runs of `Isaac-Cartpole-Camera` (50 epochs, task
defaults) on one L40, each in its own container:

```
det1 vs det2   55/55 checkpoint tensors bitwise identical
det1 vs det3   55/55 checkpoint tensors bitwise identical
ctrl1 vs ctrl2 41/55 differ          <- same task, no flag
```

The unflagged controls diverge, so the agreement above is the flag's
doing rather than a task that is trivially reproducible. `Isaac-Ant
--deterministic` fails at startup with the sensor message. MuJoCo-CPU
could not be exercised: `SolverMuJoCo.get_max_contact_count()` raises
`NotImplementedError` on that path, so it is unreachable in Isaac Lab
today.

8 unit tests added; 200 pass across `test_entrypoints_common.py` and
`test_newton_manager_abstraction.py`.

## Release backport

- [x] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

(cherry picked from commit 3748a72)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants