Repository navigation
[Newton] Redesign Newton Manager [2b/N] - #8734
Conversation
be11c09 to
7b63601
Compare
# Description Part of the Newton manager redesign (overview with API examples: #8218 (comment)). [1/N] #8711 (merged) made physics managers instances owned by the simulation as `sim.backend_manager`. The former [2/N] #8712 is split into five stacked PRs: | PR | Stage | |---|---| | [2a/N] **#8733 (this PR)** | Move Newton simulation data onto NewtonBackend | | [2b/N] #8734 | Describe Newton solvers with solver specifications | | [2c/N] #8735 | Move Newton manager logic into backend functions | | [2d/N] #8736 | Capture Newton model changes and Torch work in the step | | [2e/N] #8737 | Run each Newton step as one step graph | This PR is the bottom of the stack and targets `main` directly. ## What this PR does Newton's `Model` stays the immutable description (like `mjModel`). **`NewtonBackend`** becomes the mutable data bound to one finalized model (like `mjData`): state, control, solver, collision pipeline, contacts, sensors, Newton actuators and reset masks. The manager reads and writes `backend.*` instead of private fields, and a hard reset closes the backend and finalizes a new one. - The simulation registry still owns the builder and backend: consumers call `sim.get_or_create_backend(NewtonBuilderCfg(...))` / `sim.get_or_create_backend(NewtonBackendCfg(...))` as before. `NewtonBackendCfg.class_type` is `NewtonBackend`, constructed through `instantiate`. - Replication outputs (`NewtonCloneRecord`, site index map, world transforms, source builders) are read through manager accessors instead of private fields; site and extended-attribute requests persist on the builder across hard resets, so sensors no longer re-register them. - `add_contact_sensor` / `add_imu_sensor` return the Newton sensor. - `NewtonBuilderCfg` and `NewtonBackendCfg` move into their own `newton_builder_cfg.py` / `newton_backend_cfg.py`. - The per-solver manager subclasses and their hooks are unchanged apart from operating on the backend. ## Type of change - Breaking change. No deprecation shims: removed APIs are listed below with their replacements. ## Migration | Before | Now | |---|---| | `manager.get_model()`, `get_state_0()`, `get_state_1()`, `get_control()`, `get_contacts()` | `manager.backend.model`, `.state_0`, `.state_1`, `.control`, `.contacts` | | `manager._solver`, `_contacts`, `_collision_pipeline`, `_adapter`, `_world_reset_mask`, `_fk_reset_mask`, `kinematics_dirty` | `backend.solver`, `.contacts`, `.collision_pipeline`, `.actuators`, `.world_mask`, `.fk_mask`, `.kinematics_dirty` | | `get_num_envs()`, `get_dt()`, `get_solver_dt()` | `backend.model.world_count`, `backend.dt`, `backend.solver_dt` | | `cl_register_site(...)` | `register_site(...)` | | `add_frame_transform_sensor(...)` | construct `newton.sensors.SensorFrameTransform` on `backend.model` | | `add_contact_sensor` / `add_imu_sensor` returning a key or index | both return the Newton sensor | | private replication fields (`_cl_site_index_map`, `_world_xforms`, `_cl_protos`, ...) | `get_site_index_map()`, `get_world_xforms()`, `get_clone_source_builders()`, `get_clone_record()` | | `from isaaclab_newton.physics.newton_manager_cfg import NewtonBuilderCfg, NewtonBackendCfg` | `from isaaclab_newton.physics import NewtonBuilderCfg, NewtonBackendCfg` | | sensors re-registering sites / `body_qdd` on `STOP` | not needed; requests persist on the builder | ## Testing Every test file in its own process without Isaac Sim (Kit), compared with `main`: no file has more failures or fewer passes, apart from two tests removed with the deprecated accessors. Remaining failures also fail on `main` or need missing extras (Kit launcher tests, rl_games/sb3, `rerun`). Not run: Kit-only tests and the GB300, Rizon coffee and teapot examples. ## 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 changelog fragments --------- Co-authored-by: Maximilian Krause <[email protected]>
…solver-specs # Conflicts: # source/isaaclab_newton/isaaclab_newton/cloner/replicate.py
7b63601 to
9c4ba52
Compare
[High impact] The redesign reaches Newton simulation and coupling workflows across Isaac Lab. Fix contact growth and custom solver construction before merging. Findings
SummaryThis PR replaces per-solver managers with one
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[SimulationContext] --> B[NewtonManager]
B --> C[NewtonBackend]
C --> D[Resolved solver configuration]
D --> E[Newton solver]
D --> F[Contacts and collision pipeline]
D --> G[Step and reset methods]
H[Coupler configuration] --> I[Entry configurations]
I --> J[Entry solvers]
J --> K[Newton coupled solver]
D -. may be .-> H
Reviews (1) · Last reviewed commit: "Describe Newton solvers by their configu..." · Reviewed by Greptile |
| backend.collision_pipeline = solver_cfg.create_collision_pipeline( | ||
| model, solver, **args, rigid_contact_max=required | ||
| ) |
There was a problem hiding this comment.
With deterministic physics and MJWarpSolverCfg(use_mujoco_contacts=False), reset fails when MuJoCo needs more contacts than the pipeline allocated and collision_cfg is set. to_pipeline_args() already includes rigid_contact_max, even when it is None. Passing **args alongside rigid_contact_max=required therefore raises TypeError.
Set args['rigid_contact_max'] = required before rebuilding the pipeline.
| backend.collision_pipeline = solver_cfg.create_collision_pipeline( | |
| model, solver, **args, rigid_contact_max=required | |
| ) | |
| args["rigid_contact_max"] = required | |
| backend.collision_pipeline = solver_cfg.create_collision_pipeline(model, solver, **args) |
There was a problem hiding this comment.
Fixed: the rebuild sets rigid_contact_max in the args, and the test covers a configured pipeline.
| kwargs = solver_kwargs(SolverMuJoCo, self, mode) | ||
| # ls_parallel is deprecated in newton; forwarding it (even as False) emits a warning. | ||
| kwargs.pop("ls_parallel", None) | ||
| if deterministic: | ||
| kwargs["disable_sensors"] = True | ||
| return SolverMuJoCo(model, **kwargs) |
There was a problem hiding this comment.
Custom solver selections are ignored
MJWarpSolverCfg.build() ignores solver_class and always constructs SolverMuJoCo. _KaminoSolverCfgBase.build() likewise always constructs SolverKamino. A configuration subclass that selects a custom solver silently runs the stock solver instead, even though solver_classes() registers attributes for the selected class.
Resolve solver_class in both builders and use the selected class for construction and argument filtering.
There was a problem hiding this comment.
Fixed: both build solver_class.
| if self.rigid_compliant_alm is None: | ||
| del kwargs["rigid_compliant_alm"] |
There was a problem hiding this comment.
Custom VBD constructors can fail
VBDSolverCfg.build() deletes rigid_compliant_alm even when solver_kwargs() has filtered it out. A custom SolverVBD subclass can expose a narrower constructor, such as (model, iterations=10), and choose the remaining settings itself. With the default rigid_compliant_alm=None, this raises KeyError before constructing the solver.
Use kwargs.pop('rigid_compliant_alm', None) so an already-filtered argument is safe.
| if self.rigid_compliant_alm is None: | |
| del kwargs["rigid_compliant_alm"] | |
| if self.rigid_compliant_alm is None: | |
| kwargs.pop("rigid_compliant_alm", None) |
There was a problem hiding this comment.
Fixed: pop(..., None).
| @@ -13,20 +13,19 @@ full Isaac Lab installation containing :mod:`isaaclab_tasks`. | |||
| .. autosummary:: | |||
|
|
|||
| newton_manager_cfg.CoupledMJWarpVBDSolverCfg | |||
There was a problem hiding this comment.
API summary names removed module
The class list still names newton_manager_cfg.CoupledMJWarpVBDSolverCfg, but this PR removes that module. The detailed class entry uses the new path correctly. The stale summary entry produces an import warning and a broken link when Sphinx builds the documentation.
Update the class list to coupled_mjwarp_vbd_solver_cfg.CoupledMJWarpVBDSolverCfg too.
| newton_manager_cfg.CoupledMJWarpVBDSolverCfg | |
| coupled_mjwarp_vbd_solver_cfg.CoupledMJWarpVBDSolverCfg |
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!
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Design and architecture (1), Scope and over-engineering (1), API (1), Compatibility and deprecation (5), Implementation (2), Style consistency (3), Test quality (2).
- PR description: The body overstates collision_cfg rejection: Kamino-internal and MPM paths ignore it; qualify MJWarp determinism because required sensor attributes still raise, and add CouplerCfg.outer_contact_entry to the summary.
- Design and architecture: The generic manager still branches on MJWarp-only use_mujoco_cpu semantics; move deterministic-mode resolution behind a NewtonSolverCfg capability method.
- Scope and over-engineering: Minimal implementation: keep NewtonManager; keep newton_builder.py and mpm_solver.py as functional owners; keep the custom coupled solver and its separate configuration module for runtime state and import isolation, but remove duplicated bound-contact state. Suggested PR breakdown: (1) configclass ClassVar fix; (2) Newton manager, config, builder, and MPM migration; (3) contrib coupling and custom solver; (4) tasks, examples, documentation, and focused validation.
- API: The custom-coupling autosummary still references deleted newton_manager_cfg; point it to coupled_mjwarp_vbd_solver_cfg so documentation builds resolve the public class.
- Compatibility and deprecation: Breaking changes: public managers, modules, class_type, builder, tendon, reset helpers, and class_type=None behavior lack deprecation bridges; keep old contracts functional with targeted warnings, migration guidance, and transition tests.
- Implementation: Internal-contact Kamino and MPM paths accept collision_cfg but never use it; reject collision_cfg whenever uses_collision_pipeline() is false.
- Style consistency: MJWarp determinism now forces sensors off, but its field and NewtonCfg documentation still require callers to set the flag; document the actual automatic behavior.
- Test quality: Remove the duplicated contact-sensor and inherited capability assertions, plus the ClassVar inheritance check already owned by the focused configclass regression test.
Significant concerns. Posted 15 inline findings.
Automated review; human maintainers own approval decisions.
| "CouplerEntryCfg", | ||
| "CouplerProxyMappingCfg", | ||
| "CouplerProxyCfg", | ||
| "NewtonCouplerManager", |
There was a problem hiding this comment.
🔴 Critical · Compatibility — Coupler manager exports removed abruptly
NewtonCouplerManager, NewtonCoupledMJWarpVBDManager, and custom_coupling.newton_manager_cfg vanish with no transition. Keep deprecated aliases and the old module importable for the prescribed cycle.
There was a problem hiding this comment.
Intentional: no shims in this series. The removal is marked Breaking in the changelog with its replacement.
| "NewtonCfg", | ||
| "NewtonCloneRecord", | ||
| "NewtonCollisionPipelineCfg", | ||
| "NewtonFeatherstoneManager", |
There was a problem hiding this comment.
🔴 Critical · Compatibility — Removed solver managers lack deprecation
The six per-solver manager classes and their modules are deleted outright, so existing imports and subclasses fail immediately. Keep deprecated aliases and forwarding modules that warn with replacement and removal guidance for the supported window.
There was a problem hiding this comment.
Intentional: no shims in this series. The removal is marked Breaking in the changelog with its replacement.
| self._clone: NewtonCloneRecord | None = None | ||
| self._active_extended_state_attributes: set[str] = set() | ||
| self.views.clear() | ||
| self._solver_specific_clear() |
There was a problem hiding this comment.
🔴 Critical · Compatibility — Manager helper methods removed without bridges
create_builder, create_fixed_tendon_control, and NewtonMPMManager.reset_solver_state disappear, breaking existing callers and changing the reset receiver from manager to backend. Retain deprecated delegates to the replacement functions.
There was a problem hiding this comment.
Intentional: no shims in this series. The removal is marked Breaking in the changelog with its replacement.
| model, solver, solver_cfg = backend.model, backend.solver, backend.solver_cfg | ||
| if not solver_cfg.uses_collision_pipeline(solver): | ||
| backend.contacts = solver_cfg.create_contacts(solver) | ||
| if backend.contacts is not None and self._cfg.collision_cfg is not None: |
There was a problem hiding this comment.
🔴 Critical · Implementation — collision_cfg silently ignored for some solvers
The rejection runs only when create_contacts() returns a buffer, so Kamino with its internal detector and MPM accept collision_cfg and discard it. Raise whenever uses_collision_pipeline() is false.
There was a problem hiding this comment.
Fixed: rejected whenever the solver does not use the collision pipeline.
| .. _Newton documentation: https://newton.readthedocs.io/en/latest/ | ||
| """ | ||
|
|
||
| class_type: type[NewtonManager] | str = "{DIR}.newton_manager:NewtonManager" |
There was a problem hiding this comment.
🔴 Critical · Compatibility — NewtonSolverCfg.class_type removed abruptly
Custom solver configurations setting class_type now fail or are silently ignored. Keep the field functional for one deprecation cycle, translating it to solver_class or NewtonCfg.class_type with a targeted warning.
There was a problem hiding this comment.
Intentional: no shims in this series. The removal is marked Breaking in the changelog with its replacement.
| # ls_parallel is deprecated in newton; forwarding it (even as False) emits a warning. | ||
| kwargs.pop("ls_parallel", None) | ||
| if deterministic: | ||
| kwargs["disable_sensors"] = True |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — disable_sensors docs contradict behavior
build now forces disable_sensors=True under a determinism guarantee, but this field's docstring and NewtonCfg.deterministic_mode still instruct callers to set it themselves. Update both.
There was a problem hiding this comment.
Fixed: the docs describe the automatic disable.
| # no Newton setting applies -- report the request rather than dropping it silently. | ||
| if getattr(solver_cfg, "use_mujoco_cpu", False): | ||
| if cfg.deterministic or cfg.deterministic_mode != "not_guaranteed": | ||
| if getattr(cfg.solver_cfg, "use_mujoco_cpu", False): |
There was a problem hiding this comment.
🟡 Warning · Design Architecture — Manager branches on MJWarp-only field
_resolve_deterministic_mode duck-types use_mujoco_cpu, keeping one solver's semantics in the generic manager. Express this through a NewtonSolverCfg method overridden by MJWarpSolverCfg.
There was a problem hiding this comment.
Fixed: moved behind applied_deterministic_mode, overridden by MJWarp.
| # Building blocks — used by _simulate_full / _simulate_physics_only | ||
| # ------------------------------------------------------------------ | ||
|
|
||
| def _prepare_step(self) -> None: |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Inline one-line _prepare_step wrapper
_prepare_step only forwards to backend.solver_cfg.pre_step(backend.solver, backend.state_0), and both callers already bind backend. Inline it at the two call sites.
| Auto-set in :meth:`__post_init__` from :attr:`solver_cfg.class_type`. | ||
| Users normally do not set this directly. | ||
| """ | ||
| class_type: type[NewtonManager] | str = "{DIR}.newton_manager:NewtonManager" |
There was a problem hiding this comment.
🟡 Warning · Compatibility — class_type=None no longer re-derived
__post_init__ previously rejected explicit values, so downstream presets pass class_type=None through replace(). That None now reaches instantiation unchecked. Reject or re-derive it.
There was a problem hiding this comment.
Fixed: None now raises clearly; omit it for the default manager.
| NewtonMJWarpManager(NewtonCfg())._validate_deterministic_solver_cfg( | ||
| CustomSolverCfg(**solver_cfg_kwargs), wp.DeterministicMode.GPU_TO_GPU | ||
| ) | ||
| assert CustomSolverCfg().deterministic is True |
There was a problem hiding this comment.
🟡 Warning · Test Quality — Test asserts Python ClassVar inheritance
CustomSolverCfg().deterministic is True only checks that a subclass inherits a ClassVar, which is Python behavior; the deterministic rejection test already owns the contract. Remove it.
| env_template: Environment path template of the clone plan, e.g. ``"/World/envs/env_{}"``. | ||
| """ | ||
| self.cfg = cfg | ||
| self.native: SolverBase = self.build_native(model, mode, env_template) |
There was a problem hiding this comment.
newton solver holds only cfg and native?
There was a problem hiding this comment.
Agreed, removed the wrapper. backend.solver is Newton's solver again; NewtonSolver is now only stateless class methods taking the config and Newton's solver.
| articulation.write_fixed_tendon_properties_to_sim_mask() | ||
| scene.step("tendon") | ||
|
|
||
| solver_model = scene.sim.backend_manager.backend.solver.mjw_model |
There was a problem hiding this comment.
currently the native feels like a shim
There was a problem hiding this comment.
Removed: .native is gone and backend.solver is the Newton solver.
| wp.copy(state.body_qd, model.body_qd) | ||
| wp.copy(state.body_q, wrapped, dest_offset=cable_body_start, count=len(wrapped_xforms)) | ||
| state.body_f.zero_() | ||
| backend.solver.reset(backend.state_0, flags=0) |
There was a problem hiding this comment.
have you consider an alternative functional option that does
class NewtonSolverFunctions:
@classmethod
def reset(solver, state, flag)
newton_solver_functions.reset(backend.solver, backend.state_0, flags=0)
versus
backend.solver.native.reset(backend.state_0, flags=0)
There was a problem hiding this comment.
Went with this in 03efc9e: solver_cfg.class_type.reset(solver_cfg, backend.solver, state, world_mask). This line is back to backend.solver.reset(...).
The backend holds Newton's solver directly again. Each solver configuration's class_type selects a NewtonSolverFunctions subclass whose class methods take the configuration and Newton's solver, so Isaac Lab no longer wraps it.
AntoineRichard
left a comment
There was a problem hiding this comment.
Experimental review tooling 🤖
Snapshot review: This run reviewed 03efc9e1ffda92d794470879b053eca199b0f04b. The PR advanced to e261242a4d39d8bdbe898a730c87ee0cac8e5996 before publication; newer commits are outside this run's scope, and findings may already be addressed there. Comments are attached to the reviewed commit.
Thanks for opening this PR to IsaacLab! We're currently experimenting with automated review tooling, and we'd appreciate a little human time to review the review! The reviewer is under review, too.
Please reply with feedback on useful findings, false positives, and anything the tool missed.
Open Code Review v1.13.3 with Sol6.1 (azure/openai/gpt-6.1-sol, via NVIDIA Inference Hub) reviewed 03efc9e1ffda92d794470879b053eca199b0f04b.
Reasoning effort: high. Review effort: medium.
Result: OCR reported 3 observations. 1 potential issues are posted inline and 2 additional suggestions are summarized below.
Additional suggestions from the tool
- source/isaaclab_newton/isaaclab_newton/physics/kamino_solver_cfg.py:324 (low, documentation): The new
:meth:references tobuildandeval_fkare unqualified, so Sphinx looks for them on the configuration class or its module, neither of which defines these methods. They will render without working API links. Use qualified solver-function references; if linking to the Kamino overrides, also ensure those methods are documented as targets (the currentKaminoSolverFunctionsautoclass has no:members:). - source/isaaclab_newton/isaaclab_newton/physics/mpm_solver_cfg.py:124 (low, documentation):
MPMSolverCfghas nostepmethod, so this unqualified method reference has no valid target in the configuration class. Link toMPMSolverFunctionsinstead, or use literalsteptext to avoid a broken API cross-reference.
Scope: 80 of 93 changed files selected, including Python tests and .rst files. This was a static review; simulation tests were not run.
Review time: 8m27s. Token usage: 4,043,765.
| for entry_cfg in {type(entry.solver_cfg): entry.solver_cfg for entry in cfg.entries}.values(): | ||
| entry_cfg.class_type.prepare_builder(entry_cfg, builder) |
There was a problem hiding this comment.
Experimental review tooling · medium · bug
Deduplicating by configuration type drops distinct solver-functions implementations. For example, two MPMSolverCfg entries can select different custom class_type values, but this dictionary retains only the last configuration, so the first implementation's required builder preparation never runs even though its solver is still constructed. Deduplicate by the selected preparation hook/implementation instead, and add a regression test with same-type configurations selecting different functions classes.
…solver-specs # Conflicts: # source/isaaclab_newton/isaaclab_newton/physics/kamino_manager.py
|
coupler.py deduplicates entries using |
…solver-specs # Conflicts: # source/isaaclab_contrib/isaaclab_contrib/coupling/coupler.py # source/isaaclab_contrib/test/coupling/test_coupler.py
|
run-ci |
# Description Part 2c of the Newton manager redesign ([overview](#8218 (comment))). Builds on [2a/N] #8733 and [2b/N] #8734 (both merged). ## Summary `NewtonManager`'s step, reset and contact logic moves onto `NewtonBackend`. A backend now holds everything one model's step needs and the methods that run it, so backends with different solvers can be built and stepped side by side without a manager or simulation context: ```python backend = NewtonBackend(NewtonBackendCfg(physics_cfg=cfg, device="cuda:0"), builder, dt=0.01) backend.init_solver() # solver, contacts, initial FK backend.invalidate_fk(env_mask, articulation_ids=ids) backend.step() # forward + step; captured as a CUDA graph after the first call backend.refit_bvh(timestamp) # shared BVHs, refit once per state ``` **Why:** - **Hard resets are correct by construction.** Step callbacks, solver-init callbacks, pending model changes, the outer-capture flag and the captured graph live on the backend, so they are discarded with the model instead of being cleared by hand in the manager. - **Several simulations per process.** No backend method reads manager or module state (`test_two_backends.py`: MJWarp and Featherstone stepped side by side, eager and captured, with reset masks isolated per backend). - **Groundwork for 2d/2e:** the step becomes one captured graph whose capture the caller can own. The manager keeps what outlives a model (builder, sites, clone record, decimation) and scene-data timestamps. Solver behavior goes through `solver_cfg.class_type` as in 2b. Behavior is unchanged, including the solver-init callback and initial-FK order. `NewtonQueries.run_query` combined a shared BVH refit with each consumer's query capture. It is split: the shared part is `backend.refit_bvh(timestamp)`, and the renderer and ray caster capture their own query, as the frame transformer already did. The Newton viewer now registers its picking forces with each new backend on a hard reset, since state-force callbacks belong to the backend. ## Breaking changes | Removed | Use instead | |---|---| | `NewtonQueries.run_query` | `backend.refit_bvh(timestamp)`, then capture the query with `newton_backend.capture_graph` | | `NewtonQueries.capture_graph`, `._refit_bvh` | `newton_backend.capture_graph`, `backend.refit_bvh` | | `NewtonManager.transforms_may_change_on_graph_replay` | `NewtonBackend.transforms_may_change_on_graph_replay` | | Manager privates (`_simulate_full`, `_graph`, `_post_step_callbacks`, ...) | `backend.step()`, `backend.graph`, `backend.post_step_callbacks`, ... | ## Performance `isaaclab benchmark runtime`, 4096 envs, `physics=newton_mjwarp`, 1000 steps, warm kernel cache, run sequentially: | Task | main | this PR | |---|---|---| | Cartpole | 2.65 M steps/s | 2.69 M steps/s | | Reach-Franka | 1.058 M steps/s | 1.054 M steps/s | | Flat ANYmal-D | 254.6 k steps/s | 254.6 k steps/s | ## Testing Targeted tests pass, run file by file: manager abstraction (106), two backends (3), Newton visualizer adapter, VBD core, MJWarp tendon control, MPM reset masks and object, coupler, coupler runtime, custom coupling, visualization state, articulation (incl. contract `-k newton`), joint coordinates, Newton actuators, BAM actuator, contact sensor, frame transformer, ray caster, IMU, cloner. Tests that need Isaac Sim (renderers, deformable object, `test_newton_solver_reset`) were not run locally. ## 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 changelog fragments
Description
Part 2b of the Newton manager redesign (overview).
Builds on [2a/N] #8733 (merged), which moved Newton's simulation data onto
NewtonBackend.Summary
There is now one
NewtonManagerand one generic solver path for every Newton solver. The six per-solver managersubclasses (
NewtonMJWarpManager,NewtonVBDManager, ...) are gone. What differs per solver lives in a small,stateless Isaac Lab solver class (
MJWarpSolver,XPBDSolver, ...) that the solverconfiguration selects through
class_type. Newton's solver is never wrapped:backend.solveris Newton's solver.Why: most of what Isaac Lab does with a solver is the same for all of them: build it from its config, step it,
reset masked worlds, run forward kinematics, collide with Newton's
CollisionPipeline. The manager's own job(lifecycle, builder, hard reset, callbacks) doesn't depend on the solver at all. So:
NewtonSolverholds that generic path as class methods taking the config and Newton's solver; a subclassoverrides only where its solver differs;
CouplerCfg.outer_contact_entrylimits the outercollision pipeline to one entry's shape pairs.
Before and after
What differs between solvers
Breaking changes
There are no deprecation shims. Each removal is listed in the changelog with its replacement.
NewtonMJWarpManager,NewtonXPBDManager,NewtonVBDManager,NewtonFeatherstoneManager,NewtonKaminoManager,NewtonMPMManagerNewtonManager; the solver config'sclass_typeselectsMJWarpSolver,XPBDSolver, ...NewtonSolverCfg.class_typeselecting a managerNewtonSolver; a custom manager goes onNewtonCfg.class_type_build_solver,_step_solver, ...build,step,reset, ... on aNewtonSolversubclassNewtonManager.create_builderisaaclab_newton.physics.create_builderNewtonManager.create_fixed_tendon_control(articulation)NewtonSolver.fixed_tendon_control(cfg, articulation, model)NewtonMPMManager.reset_solver_statereset_mpm_solver_state(backend, ...)NewtonCouplerManager,NewtonCoupledMJWarpVBDManagerCouplerSolver,CoupledMJWarpVBDSolver; overrideCouplerSolver.build_coupledfor a custom coupled solvermjwarp_manager,xpbd_manager, ...,*_manager_cfg*_solver/*_solver_cfg; import fromisaaclab_newton.physicsBehavior changes
longer modified. Tasks whose sensors need attributes only that stage fills (IMU/PVA
body_qdd, joint wrenchbody_parent_f) still raise.use_mujoco_cpu=Truesteps eagerly instead of capturing a CUDA graph.NewtonCfg.collision_cfgis rejected for any solver that does not use Newton's collision pipeline: MJWarp withMuJoCo contacts (as before), Kamino with its own collision detector, and MPM.
NewtonCfg.class_type=Noneraises; omit it to useNewtonManager.NewtonCfg.debug_modediagnostics to their entries' solvers.{ENV_REGEX_NS}selectors expand against the environment template the manager passes in, not a global.Testing
Targeted tests pass on the branch merged with current
main: manager abstraction (106), coupler (66), couplerruntime, custom coupling, contrib coupling environments without Isaac Sim, VBD core, MPM reset contract and spawners,
MJWarp tendon control, cloner, visualization state, the Newton visualizer tests, and the articulation contract
(
-k newton). The GB300, Rizon coffee, teapot and coupled MJWarp/VBD solvers resolve. Tests that need Isaac Sim(
test_manual_coupling,test_newton_solver_reset,test_newton_fabric_body_sync, MPM rendering) were not runlocally.
Checklist
pre-commitchecks with./isaaclab.sh --format