Skip to content

Bump Newton and MuJoCo Warp for MuJoCo 4.1 - #9270

Open
ooctipus wants to merge 13 commits into
isaac-sim:mainfrom
ooctipus:codex/mujoco-reset-recovery
Open

ooctipus wants to merge 13 commits into
isaac-sim:mainfrom
ooctipus:codex/mujoco-reset-recovery

Conversation

@ooctipus

@ooctipus ooctipus commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Update to the MuJoCo and MuJoCo Warp 4.1.0 releases and adapt Isaac Lab to Newton's current APIs.

  • Newton: 14e6321, the merged MuJoCo 4.1 compatibility commit from Newton #5750.
  • MuJoCo Warp: 4.1.0 release, installed from PyPI.
  • Matching dependencies: MuJoCo 4.1.0, Warp 1.20.0 (standard CUDA 13 build), and Newton USD schemas 0.8.0.

Newton supplies the MuJoCo Warp dependency. A single mujoco-warp~=4.1.0 override remains because Isaac Sim 6.2 pins mujoco-warp==3.12.0; removing the override makes the combined installation unsatisfiable. The direct MuJoCo Warp requirement and redundant mujoco-core override are removed.

The 4.1 release includes the equality-reset fix in MuJoCo Warp #1998.

Why other code changes are needed

The snippets below show the API changes in simplified form.

Reset buffers: Warp 1.20 cannot evaluate the kernel argument source in this compile-time check:

- if wp.static(len(source.shape) == 1):
+ if wp.static(ndim == 1):

Read ndim in Python and capture it in a cached kernel factory before compilation. A shared row-copy kernel handles both reset-buffer reads and writes, preserving masks and strided views. The reset-buffer tests pass on the new Warp version.

Sensors: Newton moved acceleration and joint-force readings from simulation state to solver outputs:

- state.body_qdd
+ observables.body_qdd

- state.body_parent_f
+ observables.body_parent_f

Request these outputs before solver initialization, then bind the readers once they exist. Newton now also computes them with deterministic physics enabled, so remove the old restriction on that combination.

Actuators: use Newton's current delay API, including in test helpers:

- Actuator(delay=delay, ...)
+ Actuator(input_processors=[delay], ...)

- state.delay_state
+ state.input_processor_states

Use InputProcessorDelay in place of Delay, and remove the deprecated "controller" component alias; callers use "drive". Pack delays directly and use Newton's guaranteed component lists without fallback handling. Update contact calls and rename soft_contact_margin to soft_contact_gap too.

Solver defaults: adopt Newton's synchronization on every step and automatic world separation:

- MJWarpSolverCfg(update_data_interval=2, ls_parallel=False)
+ MJWarpSolverCfg()

Remove these config fields and their task overrides, the ignored-option warning shims, and explicit separate_worlds overrides. Reset becomes one public call:

self.native.reset(state, world_mask=world_mask, flags=0)

Newton now handles synchronization, so delete the extra private _update_mjc_data() call and duplicate CPU mask check. flags=0 preserves the task's authored pose while clearing solver history. Tasks that used sparse imports now synchronize every step. MuJoCo CPU requires a single-world model.

Contact mixing: MuJoCo 4.1 removed per-collider solmix. Remove MujocoCollisionCfg.solmix and its USD writer and validation, with no alias. Equal-priority colliders now have equal weights; use priority when one collider's contact parameters should win.

Warp packaging: use the standard indexed CUDA 13 release with a single requirement:

"warp-lang==1.20.0"

The remaining changes follow from upstream behavior:

  • Visual clones: Newton now rebuilds collision filters from joint settings. Clear those settings too for clones used only for visualization.
  • Rendering references — investigation found a bug: the six Newton Warp RGB updates currently in this PR mask corrupted ambient-light data; they are not intended lighting changes. Newton creates its ambient buffer lazily inside CUDA graph capture. Replay then uploads from temporary host memory that has already been released. Initializing that buffer before capture restores the original rendering-scene image pixel-for-pixel, and all six original RGB references pass without changing tolerances. The root fix is Newton #5791, which initializes the persistent buffer before capture and deletes the lazy getter and duplicate host fields. Its new regression fails on both GPUs before the fix and passes afterward; the full camera suite completes with 84 passes and 3 optional OptiX skips. Applying just that production-code change to this PR's existing Newton pin passes all six original RGB references. The six reference updates should be removed when the upstream fix is adopted. The MPM image uses Isaac RTX and is separate. Its pile-shape change comes mainly from Newton #5021: the fixture uses collider_basis="pic27", and upstream changed particle contacts to account for particle radius, prioritize contacts in capped cells, and shield contacts behind other particles; the rheology solve also changed. Swapping only the native MPM solver code across that commit reproduces the main displacement while keeping the current Lab code, MuJoCo, and Warp fixed. Both stacks start from identical particle positions, but some positions differ by about 3.6 cm after 60 steps. On the current solver, captured and ordinary stepping agree within 0.4 micrometres. The MPM reference update is justified by changed simulation behavior; it does not address the RGB lighting bug.
  • Demo tests: compiling the new kernels on first launch can exceed five minutes. Allow ten minutes for NIST and H1 startup; NIST took 301 seconds on CI.

One independent fix is still included: remove an unused Omniverse docs inventory that returns HTTP 403. This also affects the old dependency versions.

Kamino: the merged Newton revision rejects compl_tolerance, so even our default Kamino configuration would raise TypeError. Remove it from our config and the DR Legs preset; primal and dual tolerances still control convergence:

 KaminoPADMMCfg(
     primal_tolerance=1.0e-5,
     dual_tolerance=1.0e-5,
-    compl_tolerance=1.0e-5,
 )

LEAPP fixes CUDA 13 CI

LEAPP 0.8.1, previously installed by the Linux RL job, changes these Warp globals just by being imported:

wp.config.cuda_output = "ptx"
wp.config.ptx_target_arch = 75

That overrides Warp's automatic compiler selection for the entire application. The current runner's driver supports CUDA 13.2, while Warp 1.20 bundles CUDA 13.4. The forced PTX setting makes conditional-graph capture fail with CUDA error 222.

The merged LEAPP #112, commit e43b364, removes those global assignments and preserves export portability when saving the model instead:

wp.capture_save(..., source_fallback=True)

The export retains generated CUDA source so Warp can recompile an incompatible binary for the destination GPU. LEAPP's native replay loader enables that path too. Its regression tests cover kernels compiled before tracing and fresh-input inference after deliberately invalidating the saved binary; they pass with Warp 1.19 and 1.20.

On the original failing runner and exact CI image, installing this full LEAPP commit and TorchRL 0.15.0 passes the entire RL suite: 292 passed, one skipped, across 16 test files. That includes all 10 simulation wrappers and the LEAPP export/replay checks. The host driver remains 595.58.03, and the standard Warp wheel is unchanged. A driver update is not needed for this failure.

Pin that exact upstream LEAPP commit in both the leapp extra and the RL CI job. The lock update changes only LEAPP; no transitive dependencies move. This uses the merged develop version directly, with no separate 0.8.1 backport branch. This PR keeps the single standard Warp requirement, with no CUDA 12 wheel URLs or application compiler override.

Validation

With merged Newton 14e6321, standard Warp 1.20.0 (CUDA 13.4), and MuJoCo/MuJoCo Warp 4.1.0:

  • 252 focused local tests pass, with 3 skips: solvers, reset buffers and samplers, dependency packaging, RL wrappers, native actuators, the Newton manager, and sensors.
  • A diagnostic that initializes Newton's ambient buffer before graph capture passes all six original Newton Warp RGB references and all three OVPhysX/Newton Warp rendering cases. The rendering-scene image is pixel-identical to the original Warp 1.17 result. This diagnostic is not yet a production fix. The soft-body case needs the optional pytetwild dependency, which is absent from the local environment.
  • Standalone conditional graph capture/replay and masked, strided reset-buffer writes pass on both local GPUs. Minimal graph capture and the wrapper cases also pass on the actual Linux CI runner with Warp's automatic CUBIN selection.
  • The Docker Newton package job, Windows CI (including simulation smoke tests), and docs CI pass with these dependencies. The full RL suite also passes with the pinned LEAPP commit in a fresh CI-image container on the original runner (292 passed, one skipped). The isaaclab_rl job in the new GitHub Docker CI run also passes with the exact pinned LEAPP commit. Other jobs are still running.
  • With the installed LEAPP commit e43b364, 69 Lab LEAPP export/replay tests pass (one skip), all 10 RL wrapper tests pass, and the LEAPP CLI startup check passes. Importing LEAPP preserves Warp compiler settings.
  • Formatting, lint, changelog checks, lock consistency, Warp cache verification, and the strict local documentation build pass.

Other outstanding CI findings:

  • The MJCF-to-USD converter still reads geom.solmix, which MuJoCo 4.1 removed. The kit-less job reports 11 converter failures and 34 passes, including the CUDA 13 Newton/MJWarp training smoke test. This needs an upstream converter update.
  • ARM OVPhysX with Newton Warp rendering has corrupted colors. The ambient-buffer lifetime bug above can explain this kind of corruption, but the initialization fix still needs confirmation on ARM. Those references are unchanged.
  • A previous run found unstable contact forces in the GPU 1 mesh-box case. It passed locally before the CUDA 13 switch and still needs multi-GPU CI confirmation.

@ooctipus
ooctipus requested a review from a team November 27, 2026 09:07
@github-actions github-actions Bot added isaac-lab Related to Isaac Lab team infrastructure labels Nov 27, 2026

@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

All reviewed code categories look good.

  • PR description: Title and six-file scope match; replace “all other locked package entries” with “other third-party locked packages,” since isaaclab-dev metadata changes; reported reset and packaging validation supports the stated behavior.
  • 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: Style consistency looks good.
  • Test quality: Test quality looks good.

No blocking issues. No inline findings.

Automated review; human maintainers own approval decisions.

@greptile-apps

greptile-apps Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; no actionable regression was established.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable regression was established.

Summary

Pins MuJoCo Warp to a MuJoCo 3.17 backport intended to fix stale velocity data after resets.

  • Connect and weld constraints use refreshed velocity data after a reset.

No actionable issue was established. ooctipus explicitly accepts the temporary fork because the upstream fix requires an incompatible API change.

Reviews (1) · Last reviewed commit: "Pin MuJoCo Warp 3.17 with corrected equa..." · Reviewed by Greptile

@ooctipus

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Nov 27, 2026
Comment thread pyproject.toml Resolved
Update Newton to the current upstream revision and MuJoCo Warp to the
newest revision that retains the pose API Newton consumes. Align the
MuJoCo 4.0.1, Warp 1.19, and USD schema dependencies across source and
wheel installations.

Adopt the current contact API directly and rename the soft contact gap
configuration without retaining compatibility aliases.
@ooctipus
ooctipus force-pushed the codex/mujoco-reset-recovery branch from 5952cc2 to a9f6cfe Compare November 30, 2026 23:11
@ooctipus
ooctipus requested a review from hujc7 as a code owner November 30, 2026 23:11
@ooctipus ooctipus changed the title Pin MuJoCo Warp 3.17 with corrected connect and weld velocity refresh Bump Newton and MuJoCo Warp versions Nov 30, 2026
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Dec 1, 2026
@ooctipus

ooctipus commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Dec 1, 2026
@ooctipus
ooctipus requested a review from r-schmitt as a code owner December 1, 2026 05:38
@ooctipus

ooctipus commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci ovstage

@isaaclab-bot isaaclab-bot Bot added ci:run-ovstage Run the opt-in OVStage rendering correctness lane and removed ci:run-ovstage Run the opt-in OVStage rendering correctness lane labels Dec 1, 2026
@ooctipus

ooctipus commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci ovstage

@ooctipus ooctipus changed the title Bump Newton and MuJoCo Warp versions Bump Newton and MuJoCo Warp for MuJoCo 4.1 Dec 1, 2026
@isaaclab-bot isaaclab-bot Bot added ci:run-ovstage Run the opt-in OVStage rendering correctness lane and removed ci:run-ovstage Run the opt-in OVStage rendering correctness lane labels Dec 1, 2026
@ooctipus

ooctipus commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Dec 2, 2026
@ooctipus

ooctipus commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Dec 2, 2026
@ooctipus

ooctipus commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Dec 2, 2026

This branch has not been deployed

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

Labels

documentation Improvements or additions to documentation infrastructure isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants