Repository navigation
Update Newton to 1.9 and MuJoCo/MJWarp to 3.17 - #8953
Conversation
[Medium impact] The update reaches shared physics dependencies and a bounded actuator-loading path. The PR appears safe to merge, with a non-blocking request to test the new checkpoint opt-in. Findings
SummaryUpdates Newton to
Tests were not run during this review. Reviews (1) · Last reviewed commit: "Update Newton and MuJoCo dependency stac..." · Reviewed by Greptile |
| allow_unsafe_torch_checkpoint = False | ||
| if prim.GetTypeName() == "NewtonActuator": | ||
| model_path_attr = prim.GetAttribute("newton:modelPath") | ||
| model_path = model_path_attr.Get() if model_path_attr else None | ||
| model_path = getattr(model_path, "path", model_path) | ||
| allow_unsafe_torch_checkpoint = str(model_path).lower().endswith((".pt", ".pth", ".pt2")) | ||
| parsed = parse_actuator_prim(prim, allow_unsafe_torch_checkpoints=allow_unsafe_torch_checkpoint) |
There was a problem hiding this comment.
The new opt-in decision has no focused regression test. The adapter tests build non-neural actuators, while the checkpoint tests call load_checkpoint directly. Neither checks which flag reaches parse_actuator_prim.
Add parameterized tests for .pt, .pth, .pt2, mixed-case suffixes, missing paths, and non-checkpoint paths. Without these, the suite can pass even if checkpoint imports break or the opt-in becomes unconditional again.
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: Style consistency (1). Other reviewed categories look good.
- PR description: The description matches the diff, but validation should name the rendering-reference and MuJoCo/MJWarp checks or state they were not run; no performance evidence is needed because no hot path changed.
- Design and architecture: Architecture looks good.
- Scope and over-engineering: No over-engineering issues.
- API: API changes look good.
- Compatibility and deprecation: No breaking changes identified.
- Implementation: Implementation looks good.
- Style consistency: Replace
getattr(model_path, "path", model_path)with explicitSdf.AssetPathhandling so the expected value types remain visible and comply with the direct-attribute rule. - Test quality: Test quality looks good.
Minor fixes needed. Posted 1 inline finding.
Automated review; human maintainers own approval decisions.
| if prim.GetTypeName() == "NewtonActuator": | ||
| model_path_attr = prim.GetAttribute("newton:modelPath") | ||
| model_path = model_path_attr.Get() if model_path_attr else None | ||
| model_path = getattr(model_path, "path", model_path) |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — getattr default for known attribute
The coding guide forbids getattr with a default for a statically known attribute. Resolve the Sdf.AssetPath explicitly, e.g. read model_path.path under an isinstance check, so the expected value type stays visible.
There was a problem hiding this comment.
Good point. We already import usd in this function, so there is no concern about introducing deps.
|
run-ci |
| # their existing execution semantics with Newton's trust-gated parser. | ||
| parsed = parse_actuator_prim(prim, allow_unsafe_torch_checkpoints=True) | ||
| allow_unsafe_torch_checkpoint = False | ||
| if prim.GetTypeName() == "NewtonActuator": |
There was a problem hiding this comment.
Maybe add the rationale of this opt-in as comment here for easier reading.
hujc7
left a comment
There was a problem hiding this comment.
Do we also want to deprecate the update_data_interval usage?
|
run-ci |
|
run-ci |
|
On |
Yeah I talked with Alain, we should remove it. In theory, it should only degrade the performance a bit. |
|
run-ci |
## Description Use Newton's `CONTACT_F` solver observables for Isaac Lab contact sensors with MuJoCo, XPBD, VBD, Kamino, and Steel. The backend allocates the solver output when a contact sensor is registered, requests it on the final solver substep of the environment step, and passes it to the sensor. Native collision detectors receive a `Contacts` buffer for observable contact indexing. Late sensor registration invalidates captured step graphs. Newton deprecated `Contacts.force` and `solver.update_contacts()` in version 1.7. Isaac Lab no longer uses that path for contact sensors. Featherstone and implicit MPM do not provide `CONTACT_F` in the pinned Newton version, so contact-sensor registration reports that limitation directly. The changelog fragment records this until Newton adds support. This PR contains no Steel solver or task presets and no contact-capacity change. [#8940](#8940) adds Steel; [#8957](#8957) independently aligns explicit contact capacity. ## Base Rebased on `main` at `bb4d9915f`, which includes [#8953](#8953) (Newton 1.9 and MuJoCo/MuJoCo Warp 3.17) and [#8946](#8946) (Newton manager redesign). The solver observable changes use the new instance-based solver interface. ## Validation - On `bb4d9915f`: the Newton manager, Newton solver, and contact-sensor test files passed with 119 passed and 3 existing skips. Resting-contact cases cover both MuJoCo collision paths, XPBD, VBD, and Kamino with both collision paths. - Pre-commit hooks, changelog gate, and diff whitespace checks passed. - Follow-up `90e1f74d9`: 4 coupled-solver runtime tests and 56 Newton manager tests passed locally. [Activated Docker + Tests CI](https://github.com/isaac-sim/IsaacLab/actions/runs/42301974155) passed, including `isaaclab_assets` and contrib environments.
# Description Add Newton Steel as a solver in the shared Newton backend and expose `presets=newton_steel` across supported Isaac Lab task families. Steel uses point friction by default, the shared Newton manager, and one owner for each task family preset. This branch is rebased onto upstream `main` at `d4be26397`. The Steel presets include the tuned settings from contributor PR [#12](ooctipus#12). Franka Reach and Drawer select the driven PhysX USD variant. ## Dependencies - [PR #8953](#8953) updates Newton to 1.9 and MuJoCo/MuJoCo Warp to 3.17. Dependency pins, the lockfile, wheel overrides, the actuator compatibility fix, and the MPM rendering reference are there. - [PR #8954](#8954) migrates contact sensors for Steel, MuJoCo, XPBD, VBD, and Kamino to Newton solver observables. - [PR #8957](#8957) aligns explicit contact capacity before solver construction. PRs #8953 and #8954 are merged into `main`. PR #8957 is still open and remains a dependency for explicit contact-capacity alignment. The benchmark table below was collected before the Newton Manager redesign and is retained as historical data, not as a current-revision performance claim. ## Historical benchmark: Steel point friction vs MJWarp All 42 Steel-configured task families were benchmarked sequentially on RTX 5090 GPU 0. The original 16,384-environment pairs used point-friction runtime code at `8b8799c40`. Steel rows affected by the driven Franka USD variant or the default solver tuning were rerun with the final integration settings; their MJWarp rows are unchanged. The SO101 row was rerun after #8954's contact-observable migration, before the Newton Manager redesign merged into `main`. The other rows predate that migration and should be read as a baseline, not current-code measurements. The measurements include the dependency versions in #8953: official Newton `7f0c13af6e4d` and MuJoCo/MuJoCo Warp 3.17. Steel uses `friction_anchor_beta=0.0`. - 41 task pairs completed at **16,384 environments**. Both SO101 solvers ran out of GPU memory there, so SO101 was rerun at its configured default of **4,096 environments**; both completed. - In that earlier run, Steel was faster on **28 of 39** pairs without MJWarp line-search warnings at 16,384 environments. The historical geometric mean Steel/MJWarp ratio was **1.31×** (median **1.12×**). - Two 16,384-environment pairs emitted MJWarp line-search warnings; their numbers are shown but excluded from that summary. SO101 uses 4,096 environments and is also outside the 16,384-environment summary. - After #8954's migration on the earlier base, SO101 measured 172,477 aggregate steps/s with Steel and 135,059 with MJWarp on GPU 0. Earlier Steel reruns ranged from 157,878 to 172,872 aggregate steps/s. GPU process checks detected brief unrelated startup overlap on one earlier rerun; per-step contention was not continuously measured. The shared runtime uses Isaac Sim 6.1, while the repository lock targets 6.2. The SO101 task packs 108 keyboard joints into one Newton articulation per environment. Its default Steel preset keeps two substeps. On the earlier combined code with #8954, Steel took 23.7 ms per full `env.step()` call at 4,096 environments; MJWarp took 30.3 ms in its paired rerun. Each result is one 100-call run. These timings have not been repeated after the Newton Manager redesign on current `main`. ### What the numbers mean We timed **100 full `env.step()` calls** after 20 warmup calls. The table shows the **total environment steps per second across all environments**: environments × 100 ÷ the combined host wall time of those calls. Higher is better. This includes work inside `env.step()`, not just the physics solver. GPU completion is not synchronized at every call. ### Default Steel tuning The tuned solver settings from contributor PR #12 are selected by `presets=newton_steel`. The measurements below were taken before this rebase; the tuning improves some tasks and reduces throughput on others in that earlier run. ### Historical result table (`presets=newton_steel`) | Task | Envs | Steel aggregate env steps/s | MJWarp aggregate env steps/s | Steel / MJWarp | Note | |---|---:|---:|---:|---:|---| | Isaac-Ant | 16,384 | 5,318,029 | 2,626,845 | 2.02× | | | Isaac-Ant-Direct | 16,384 | 6,559,093 | 5,599,628 | 1.17× | | | Isaac-Cartpole | 16,384 | 9,422,295 | 8,633,389 | 1.09× | | | Isaac-Cartpole-Camera | 16,384 | 970,962 | 938,307 | 1.03× | | | Isaac-Cartpole-Camera-Direct | 16,384 | 1,014,796 | 987,499 | 1.03× | | | Isaac-Cartpole-Direct | 16,384 | 10,603,728 | 11,049,601 | 0.96× | | | Isaac-Humanoid | 16,384 | 1,716,377 | 1,381,116 | 1.24× | | | Isaac-Humanoid-Direct | 16,384 | 1,889,483 | 1,567,169 | 1.21× | | | Isaac-Lift-Franka | 16,384 | 761,653 | 723,584 | 1.05× | | | Isaac-Lift-KukaAllegro | 16,384 | 630,889 | 473,922 | 1.33× | | | Isaac-Lift-KukaAllegro-Camera | 16,384 | 269,357 | 232,573 | 1.16× | | | Isaac-Open-Drawer-Franka | 16,384 | 3,724,915 | 793,857 | 4.69× | | | Isaac-Open-Drawer-Franka-Direct | 16,384 | 3,768,857 | 818,514 | 4.60× | | | Isaac-Reach-Franka | 16,384 | 2,836,122 | 2,031,628 | 1.40× | | | Isaac-Reach-Franka-OSC | 16,384 | 1,467,223 | 1,248,146 | 1.18× | | | Isaac-Reach-UR10 | 16,384 | 4,697,814 | 2,458,897 | 1.91× | | | Isaac-Reorient-Cube-Allegro | 16,384 | 474,390 | 321,799 | 1.47× | | | Isaac-Reorient-Cube-Allegro-Direct | 16,384 | 473,186 | 330,940 | 1.43× | MJWarp line search (3) | | Isaac-Reorient-KukaAllegro | 16,384 | 619,824 | 475,442 | 1.30× | | | Isaac-Reorient-KukaAllegro-Camera | 16,384 | 260,914 | 236,028 | 1.11× | | | Isaac-Velocity-Flat-AnymalD | 16,384 | 623,494 | 394,514 | 1.58× | MJWarp line search (1) | | Isaac-Velocity-Flat-Cassie | 16,384 | 980,049 | 872,366 | 1.12× | | | Isaac-Velocity-Flat-G1 | 16,384 | 395,715 | 413,783 | 0.96× | | | Isaac-Velocity-Flat-H1 | 16,384 | 811,177 | 732,821 | 1.11× | | | Isaac-Velocity-Flat-UnitreeGo2 | 16,384 | 861,115 | 929,370 | 0.93× | | | Isaac-Velocity-Rough-AnymalD | 16,384 | 262,903 | 309,238 | 0.85× | | | Isaac-Velocity-Rough-Cassie | 16,384 | 626,981 | 546,664 | 1.15× | | | Isaac-Velocity-Rough-G1 | 16,384 | 219,665 | 225,923 | 0.97× | | | Isaac-Velocity-Rough-H1 | 16,384 | 534,495 | 480,473 | 1.11× | | | Isaac-Velocity-Rough-UnitreeGo2 | 16,384 | 360,563 | 385,435 | 0.94× | | | IsaacContrib-Cartpole-Showcase-Direct | 16,384 | 13,125,361 | 11,187,047 | 1.17× | | | IsaacContrib-Keyboard-SO101 | 4,096 | 172,477 | 135,059 | 1.28× | Both OOM at 16,384; rerun with #8954 contact observables | | IsaacContrib-Open-Drawer-Franka-IK-Abs | 16,384 | 3,278,941 | 637,379 | 5.14× | | | IsaacContrib-Open-Drawer-Franka-IK-Rel | 16,384 | 3,120,403 | 584,387 | 5.34× | | | IsaacContrib-Velocity-Flat-AnymalB | 16,384 | 752,575 | 462,837 | 1.63× | | | IsaacContrib-Velocity-Flat-AnymalC | 16,384 | 757,105 | 442,263 | 1.71× | | | IsaacContrib-Velocity-Flat-UnitreeA1 | 16,384 | 789,132 | 1,041,755 | 0.76× | | | IsaacContrib-Velocity-Flat-UnitreeGo1 | 16,384 | 635,813 | 937,895 | 0.68× | | | IsaacContrib-Velocity-Rough-AnymalB | 16,384 | 431,995 | 439,662 | 0.98× | | | IsaacContrib-Velocity-Rough-AnymalC | 16,384 | 410,209 | 404,162 | 1.01× | | | IsaacContrib-Velocity-Rough-UnitreeA1 | 16,384 | 396,145 | 451,066 | 0.88× | | | IsaacContrib-Velocity-Rough-UnitreeGo1 | 16,384 | 330,732 | 396,851 | 0.83× | | | **Geometric mean (39 comparable pairs)** | 16,384 | — | — | **1.31×** | Excludes pairs with MJWarp line-search warnings; SO101 uses 4,096 envs | ## Type of change - New feature - Bug fix - Documentation update ## Validation Focused checks on the rebased branch: - Newton Steel solver: 5 passed - Newton manager Steel build and step: 1 passed - Steel contact-sensor force: 1 passed - Steel task presets: 17 passed - Benchmark capture: 20 passed - Ruff lint and format checks passed; `git diff --check` passed The historical benchmark table has not been rerun on this revision. PR #8957 is still open, so the full integration and CI remain subject to that dependency. ## Checklist - [x] I have read and understood the contribution guidelines - [ ] I have run pre-commit checks on the changed files - [x] I have made corresponding documentation changes - [ ] My changes generate no new warnings - [x] I have validated the changed behavior with focused coverage and applied the test-audit criteria - [x] I have added changelog fragments for every touched source package - [x] My name already exists in CONTRIBUTORS.md
Description
Update the pinned Newton revision from
42f7def118c2(1.8.0.dev0) to7f0c13af6e4d(1.9.0.dev0), and align MuJoCo and MuJoCo Warp from 3.15 to 3.17 inpyproject.toml,uv.lock, and the wheel-builder overrides.Newton 1.9 requires explicit opt-in when its USD actuator parser loads a Torch checkpoint. Scope that opt-in to
NewtonActuatorprims whosenewton:modelPathends in.pt,.pth, or.pt2; add focused coverage for checkpoint and non-checkpoint paths. Refresh the MPM rendering reference produced by the updated Newton stack.Warm up the Valiant PPISP camera before comparing its RGB output: CI captured an unshaded green frame while depth was already populated. Keep the 12% pixel-difference gate and use a 0.90 SSIM gate for the warmed splat image, which measured 0.9155 in CI.
This dependency update is required by the Steel integration PR, which will be narrowed to Steel-specific changes.
Validation
uv lock --checkISAACLAB_CHANGELOG_BASE_REF=upstream/main uv run isaaclab -f91bca223b:rendering-correctness,rendering-correctness-kitless (legacy),isaaclab_newton, andpre-commitpassedperformance-smoke-benchmarks: passed on retry after runner shared-memory startup failures