Repository navigation
Keep convex hulls as convex hulls in the MPM solver - #9317
Conversation
MPMSolver.prepare_builder retyped every convex-hull shape of the scene as a triangle mesh in place, because Newton's implicit MPM solver raised NotImplementedError for convex hulls. The retyping applied to all shapes, including ones the granular solver never touches, such as robot links, and moved them to the mesh path of Newton's rigid collision detection, which is much slower than the convex path. Newton's implicit MPM solver now accepts convex hulls as colliders, so the in-place conversion is removed and shapes keep their type.
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Compatibility and deprecation (1). Other reviewed categories look good.
- PR description: Title and three-file scope match; substantiate “significantly slows” with baseline/candidate collision latency, revisions, command/workload, hardware, backend, environment count, warmup, and runtime environment, or remove the magnitude claim.
- Design and architecture: Architecture looks good.
- Scope and over-engineering: No over-engineering issues.
- API: API changes look good.
- Compatibility and deprecation: Breaking changes: convex-hull MPM scenes now raise NotImplementedError against the unchanged Newton pin; update to a hull-capable revision before removing the conversion.
- Implementation: Implementation looks good.
- Style consistency: Style consistency looks good.
- Test quality: Test quality looks good.
Significant concerns. Posted 1 inline finding.
Automated review; human maintainers own approval decisions.
| builder.body_inv_mass[body_id] = 0.0 | ||
| builder.body_inertia[body_id] = wp.mat33() | ||
| builder.body_inv_inertia[body_id] = wp.mat33() | ||
| for shape_id, shape_type in enumerate(builder.shape_type): |
There was a problem hiding this comment.
🔴 Critical · Compatibility — Update Newton before removing conversion
The unchanged Newton pin still rejects convex hulls. Removing this conversion makes previously supported MPM scenes raise NotImplementedError during solver construction. Pin a hull-capable Newton revision with this change, or retain the conversion.
[Medium impact] No additional blocking issues were found beyond the dependency already acknowledged by the author. SummaryRemoves the scene-wide conversion of convex hulls to triangle meshes from
Acknowledgment: jnskkmhr explicitly states that the current Newton pin still rejects convex hulls. The upstream support and pin update are deferred dependencies; this review does not repeat that known issue as a finding. Reviews (1) · Last reviewed commit: "Keep convex hulls as convex hulls in the..." · Reviewed by Greptile |
The pinned Newton revision raises NotImplementedError for convex hulls in the implicit MPM solver. Pin the head of newton-physics/newton#5706, which accepts them, so the solver is built with convex hulls kept as they are. Repin to the merge commit once that pull request lands.
|
run-ci |
The head of newton-physics/newton#5706 is based on a Newton main that requires MuJoCo and MuJoCo Warp 4.0.1, while Isaac Lab overrides both to 3.17. With that pin the MuJoCo solver fails with "module 'mujoco_warp' has no attribute 'SetConstGroup'". Moving Isaac Lab to MuJoCo 4.0.1 is a dependency upgrade outside this change, so the pin goes back to the previous Newton revision. This reverts commit fce5917.
StafaH
left a comment
There was a problem hiding this comment.
Let's wait for the official newton bump, then we can avoid the manual override
|
run-ci |
|
run-ci |
# Description `MPMSolver.prepare_builder` retyped every convex hull in a scene as a triangle mesh, including robot links that MPM never touches. That changed their rigid collision representation and sent them through the mesh collision path. Keep their authored types and let Newton's implicit MPM solver handle convex hulls directly. The regression fixture creates a real, non-degenerate convex hull through the builder API and checks that its type survives solver construction. Merged main after isaac-sim#9270. Its Newton revision `838ddf544927333559af894dfba0edb1a9efba04` already includes convex-hull MPM support. Dependency pins, the lockfile, wheel overrides, contact API cleanup, `soft_contact_gap` rename, and removal of the unused Omniverse documentation inventory are all inherited from main. Removed the duplicate contact API changelog and major-bump marker. No dependency on an unmerged Newton PR remains. ## Type of change - Bug fix ## Validation Cleanup revision `3add63a3b`: - Full repository formatting/lint passed using `UV_NO_SYNC=1 ISAACLAB_CHANGELOG_BASE_REF=upstream/main uv run isaaclab --format`. - Changelog validation against `upstream/main`, whitespace checks, and merge-conflict checks passed. - Confirmed the Newton revision inherited from isaac-sim#9270 accepts `CONVEX_MESH` in its implicit MPM collider implementation. - Focused solver tests could not collect in the local macOS environment because `ovstorage` is missing. Frozen synchronization is unsupported on macOS by the project lockfile. The CUDA MPM regression requires CI verification on a supported platform. ## Checklist - [x] I have read and understood the contribution guidelines. - [x] I have run the repository formatting/lint checks. - [x] I have updated the PR description for the final scope. - [x] I have applied the test-audit criteria to the retained regression coverage. - [x] I have retained the changelog fragment for the MPM behavior change. --------- Co-authored-by: Octi Zhang <[email protected]> Co-authored-by: Kelly Guo <[email protected]> (cherry picked from commit e5f0a3f)
…ion (#9368) ## Description Backport fourteen merged PRs to `release/3.1.0`: | Original PR | Change | | --- | --- | | #9359 | Let CI recover after Warp and OVRTX cache eviction; allow cold-cache demo startup. | | #9292 | Detect UTF-8 and BOM-marked UTF-16 YAML input and write UTF-8 independently of the system locale. | | #9346 | Update the Isaac Sim CI image digest to `6745f1725c9b`. | | #9334 | Bind cloned deformable state and materials in clone-plan environment order. | | #9172 | Update and pin setup-uv and cache actions in performance CI. | | #9062 | Resolve ray-caster mounts through shared frame views and fix Kuka-Allegro camera mounts and missed-ray clipping. | | #9247 | Use floating-point digital-filter coefficients when configuration literals are integers. | | #9285 | Support scalar shapes in uniform, triangular, and log-uniform random sampling. | | #9333 | Initialize OVPhysX physics consumers and joint-wrench bindings before deferred render cloning. | | #9366 | Add the success-guided reset sampling paper citation to the NIST package docstring. | | #9369 | Mark ARM64 OptiX rendering tests as expected failures without starting the unsupported runtime. | | #9365 | Fix documented GR00T N1.7 installation with explicit tyro and Git LFS/source-override handling. | | #9270 | Upgrade Newton, MuJoCo/MuJoCo Warp 4.1, Warp 1.20, USD schemas, and LEAPP, with required runtime and converter compatibility changes. | | #9317 | Preserve convex-hull collider types when constructing the implicit MPM solver. | Cherry-picked with `-x`, preserving one commit per source PR. The first six were applied in merge order (#9334, #9062, #9292, #9359, #9346, #9172), followed by #9247, #9285, #9333, #9366, #9369, #9365, #9270, and #9317. All fourteen applied without conflicts or manual edits. Every stable patch ID matches its original merge commit. Original documentation, regression tests, and changelog fragments are preserved. ### Compatibility These are the original PRs in full, including their compatibility changes and version markers: - #9292: legacy locale-encoded YAML must be converted to UTF-8. - #9062: ray casters require an existing mount frame; the old Newton/OVPhysX synthetic mounting behavior is removed. The shared FrameView transform API is added. Kuka-Allegro missed rays now clip at 2.5 m, changing observations seen by previously trained policies. - #9333: removes unreleased internal binding-event plumbing; public `PhysicsEvent.PHYSICS_READY` subscriptions and callback priorities remain supported. This includes the lifecycle changes from the original PR. - #9270: upgrades core dependencies and includes breaking API removals. Actuators use `command_interface` / `command_interface_state` and `drive`; Newton sensors use solver observables. Removed options include `MujocoCollisionCfg.solmix`, `MJWarpSolverCfg.update_data_interval` / `ls_parallel`, and `KaminoPADMMCfg.compl_tolerance`; `soft_contact_margin` becomes `soft_contact_gap`. Native MuJoCo CPU simulation requires one world. The temporary MJCF converter patch and original migration documentation are included. ARM OptiX requires an R590+ driver; #9369 retains the expected failure on current ARM CI. ## Type of change - Release backport: bug fixes, dependency upgrades, compatibility changes, CI updates, tests, and documentation. ## Validation Latest combined head: `1a2304c75`. The branch includes a merge of release tip `7cfe2659f` in `9f60679bc`; existing changes from that merge are preserved. ### Final combined-head checks - Full repository formatting/lint, changelog validation against `upstream/release/3.1.0`, and `git diff --check upstream/release/3.1.0` passed at `1a2304c75`. - #9317 applied without conflicts and its stable patch ID matches the original. Its required Newton revision `838ddf544927333559af894dfba0edb1a9efba04` is already locked through #9270. - Focused MPM tests were attempted with `uv run --no-sync python -m pytest source/isaaclab_newton/test/physics/test_newton_solvers.py -k mpm -q`; collection is blocked by the missing `isaaclab_newton` installation in this macOS environment. The CUDA regression requires supported-platform CI. ### Earlier thirteen-backport checks - Full repository formatting/lint passed: `ISAACLAB_CHANGELOG_BASE_REF=upstream/release/3.1.0 uv run --no-sync isaaclab --format`. - Changelog validation against `upstream/release/3.1.0` and `git diff --check upstream/release/3.1.0` passed. - #9270 applied without conflicts and its stable patch ID matches the original. Its original dependency lock, wheel overrides, runtime adaptations, tests, golden image, and changelog fragments are preserved. - Root dependency metadata: **13 passed**; wheel-builder metadata: **14 passed**, using `uv run --no-sync python -m pytest` on the corresponding CLI test files. - Reset-state buffers: **7 passed, 1 skipped** in the existing macOS environment. This environment still has Warp **1.17.0**, so this result does not validate the new Warp 1.20 runtime. - Confirmed the lock selects Warp 1.20.0, MuJoCo/MuJoCo Warp 4.1.0, Newton USD schemas 0.8.0, and Newton revision `838ddf544927333559af894dfba0edb1a9efba04`. - Updated dependency installation, GPU simulation/rendering, and a clean docs build remain unvalidated locally. Earlier runtime test results below predate #9270 and do not establish compatibility with the upgraded dependencies. ### Earlier twelve-backport checks - Full repository formatting/lint, changelog validation against `upstream/release/3.1.0`, and `git diff --check upstream/release/3.1.0` passed at `26293b3bc`. - #9365 applied without conflicts and its stable patch ID matches the original. It changes only the GR00T installation documentation; `pyproject.toml` and `uv.lock` are unchanged by this cherry-pick. - The updated installation command block passed `bash -n`. External GR00T installation and training were not rerun locally. - Clean docs validation remains outstanding on a supported platform, as detailed below. ### Earlier eleven-backport checks - Full repository formatting/lint, changelog validation against `upstream/release/3.1.0`, and `git diff --check upstream/release/3.1.0` passed at `2a7783ebe`. - #9369 applied without conflicts and its stable patch ID matches the original. - Evaluated the actual OptiX xfail decorator for `aarch64`, `arm64`, `x86_64`, and `AMD64`: only ARM64 enables `xfail(run=False)`; Newton Warp tests retain no xfail marker. - GPU rendering was not rerun locally. ### Earlier ten-backport checks The following checks passed at `97dc765f9`, before the test-marker-only #9369 cherry-pick: - Full repository formatting/lint checks passed: `ISAACLAB_CHANGELOG_BASE_REF=upstream/release/3.1.0 uv run --no-sync isaaclab --format`. - Changelog check passed: `uv run --no-sync python tools/changelog/cli.py check upstream/release/3.1.0 --include-worktree`. - `git diff --check upstream/release/3.1.0` passed. - All ten stable patch IDs match their source commits. - Tensor processors: **13 passed**, using `uv run --no-sync python -m pytest source/isaaclab/test/utils/test_tensor_processors.py -q`. - Direct CPU checks passed for scalar, batched, and empty requests in uniform, triangular, and log-uniform sampling, plus integer-coefficient digital-filter unit-delay behavior. The scalar-sampling and integer-coefficient bugs were reproduced before these fixes were added. - The existing uv interpreter and imported core package were verified to point at this checkout. ### Earlier six-backport checks The following passed at `2afdfd8be`, before the four additional cherry-picks, using `uv run --no-sync python -m pytest <file> -q`, one file per process: - YAML I/O: **8 passed**. - Clone-plan algebra: **32 passed, 5 skipped**. - Ray-caster kernels: **17 passed**. ### Remaining validation - Validation used the existing uv environment on macOS because normal uv resolution rejects this platform; the committed lockfile supports Linux and Windows only. - A clean docs build was attempted for the initial six-backport head with `uv run --no-sync isaaclab --docs`; its nested uv invocation was blocked by that platform restriction. The expanded documentation changes still need a supported-platform build. - GPU/OVPhysX/Newton simulation integration, including the #9333 lifecycle changes, and cold-cache demos have not been rerun locally for this combined backport. - No complete CI result is claimed for the latest combined head. ## Checklist - [x] Read the contribution guidelines. - [x] Run full repository formatting and lint checks. - [x] Preserve original documentation, tests, and package changelog fragments. - [x] Verify all fourteen cherry-picks match the original patches. - [x] Run focused locally supported checks. - [ ] Complete clean docs and GPU integration validation on supported platforms. --------- Signed-off-by: Sylvester Kaczmarek <[email protected]> Co-authored-by: ooctipus <[email protected]> Co-authored-by: YuTeh Shen <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Sylvester Kaczmarek <[email protected]> Co-authored-by: hujc <[email protected]> Co-authored-by: isaaclab-bot[bot] <282401363+isaaclab-bot[bot]@users.noreply.github.com> Co-authored-by: fanes <[email protected]> Co-authored-by: Richard Schmitt <[email protected]> Co-authored-by: Mateo Guaman Castro <[email protected]> Co-authored-by: Junnosuke Kamohara <[email protected]>
Description
MPMSolver.prepare_builderretyped every convex hull in a scene as a triangle mesh, including robot links that MPM never touches. That changed their rigid collision representation and sent them through the mesh collision path. Keep their authored types and let Newton's implicit MPM solver handle convex hulls directly. The regression fixture creates a real, non-degenerate convex hull through the builder API and checks that its type survives solver construction.Merged main after #9270. Its Newton revision
838ddf544927333559af894dfba0edb1a9efba04already includes convex-hull MPM support. Dependency pins, the lockfile, wheel overrides, contact API cleanup,soft_contact_gaprename, and removal of the unused Omniverse documentation inventory are all inherited from main. Removed the duplicate contact API changelog and major-bump marker. No dependency on an unmerged Newton PR remains.Type of change
Validation
Cleanup revision
3add63a3b:UV_NO_SYNC=1 ISAACLAB_CHANGELOG_BASE_REF=upstream/main uv run isaaclab --format.upstream/main, whitespace checks, and merge-conflict checks passed.CONVEX_MESHin its implicit MPM collider implementation.ovstorageis missing. Frozen synchronization is unsupported on macOS by the project lockfile. The CUDA MPM regression requires CI verification on a supported platform.Checklist