Skip to content

Pin Newton to v1.4.0 and override the Isaac Sim MuJoCo pins#6584

Closed
hujc7 wants to merge 3 commits into
isaac-sim:developfrom
hujc7:jichuanh/newton-pin-v140
Closed

Pin Newton to v1.4.0 and override the Isaac Sim MuJoCo pins#6584
hujc7 wants to merge 3 commits into
isaac-sim:developfrom
hujc7:jichuanh/newton-pin-v140

Conversation

@hujc7

@hujc7 hujc7 commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Problem: mesh-mesh contact regression in the MuJoCo pipeline (upstream)

The Newton range this pin crosses includes newton#2980 (MuJoCo 3.10 margin/gap semantics), which introduces a regression: mesh-mesh shape pairs in the MuJoCo contacts pipeline lose collision response entirely — bodies tunnel through each other with zero contact forces.

Bisect (via test_horizontal_collision_detects_contact[mesh_capsule-mujoco_contacts]):

Newton ref Result
c7ae7c7648c (current develop pin) pass
346121aaaca = newton#2980 fail (first bad)
9af5a9f4181 (1.5.0.dev0) fail
v1.4.0 fail
  • No older pin avoids it: the ignore_paths fix landed 31 commits after the regression, so every Newton commit containing the fix also contains the regression.
  • legacy_margin_gap=True at USD import does not restore the behavior (the failure is contact-pair loss, not margin-value translation), and neither does raising the builder default gap.
  • Scope: primitive pairs and mesh-vs-primitive pairs are unaffected (the dexterous task families train to full success rates under this pin).
  • Tracked upstream as newton#3559; the affected test case is marked xfail referencing that issue and should be re-enabled when the upstream fix lands.

Stacking

hujc7 added 2 commits July 16, 2026 23:53
Advance the Newton pin from a pre-1.4 development commit to the v1.4.0
release, which contains the ignore_paths custom-frequency traversal fix
and the 1.4 stabilization series. Newton 1.4 requires the MuJoCo 3.10
stack while isaacsim-core pins mujoco-warp==3.8.0.3 exactly, so
mujoco-warp and mujoco join the [tool.uv] override-dependencies with
the 3.10.0.2 floor that v1.4.0 declares. The version table and its
single-source test carry the new entries.

Known upstream regression, tracked and marked xfail: mesh-mesh pairs in
the MuJoCo contacts pipeline lose collision response under the 3.10
margin/gap semantics (objects tunnel with zero contact forces).
@github-actions github-actions Bot added isaac-lab Related to Isaac Lab team infrastructure labels Jul 17, 2026
@greptile-apps

greptile-apps Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR advances the Newton dependency from a pre-1.4 dev commit to the v1.4.0 release tag, bringing in the ignore_paths USD traversal fix, and adds mujoco-warp>=3.10.0.2,<3.11 and mujoco~=3.10.0 as uv override-dependencies to satisfy Newton 1.4's MuJoCo 3.10 requirement over Isaac Sim's pinned 3.8 stack.

  • pyproject.toml: Newton pin changed to v1.4.0; two new version-table entries (mujoco_warp, mujoco) and matching override-dependencies entries added using the same override mechanism already in use for torch and newton.
  • test_uv_run_pyproject.py: Two new assertions verify that the mujoco-warp/mujoco override strings in [tool.uv] match the version table, keeping the single-source-of-truth invariant intact.
  • test_contact_sensor.py: Marks the mesh_capsule + mujoco_contacts combination as xfail with a reference to upstream newton#3559, reflecting a known mesh-mesh contact regression introduced by the MuJoCo 3.10 margin/gap semantics change.

Confidence Score: 4/5

Safe to merge as a dependency advance; the main question to resolve is whether the xfail guard in test_contact_sensor.py covers the full extent of the broken mesh-mesh combinations.

The pyproject.toml dependency wiring and version-table test are correct. The concern is in test_contact_sensor.py: the xfail only guards MESH_CAPSULE, but the upstream regression is described as affecting all mesh-mesh pairs, and STABLE_SHAPES includes MESH_SPHERE, MESH_BOX, and MESH_CYLINDER as well. If those parametrised cases also fail under MuJoCo 3.10 contacts, CI would see hard failures on them rather than expected failures.

source/isaaclab_newton/test/sensors/test_contact_sensor.py — the xfail condition should be verified against all mesh shape types, not just MESH_CAPSULE.

Important Files Changed

Filename Overview
pyproject.toml Advances Newton pin to v1.4.0 release tag and adds mujoco-warp/mujoco 3.10 overrides to both the version table and uv override-dependencies; stale "git commit" comment is the only minor issue.
source/isaaclab/test/cli/test_uv_run_pyproject.py Adds two assertions to the single-source version test that verify the new mujoco-warp and mujoco overrides match the version table; logic is correct and consistent with the existing assertion pattern.
source/isaaclab_newton/test/sensors/test_contact_sensor.py Adds an xfail guard for mesh_capsule + mujoco_contacts, but the regression (described as affecting all mesh-mesh pairs) may leave MESH_SPHERE, MESH_BOX, and MESH_CYLINDER uncovered; docstring placement is also incorrect.
source/isaaclab_newton/changelog.d/newton-pin-v140.minor.rst New changelog fragment documenting the Newton v1.4.0 pin and the ignore_paths fix; content is accurate and complete.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["isaacsim-core 6.0.0.1\n(pins mujoco-warp==3.8.0.3, mujoco==3.8.x, newton==1.2.0)"]
    B["[tool.uv] override-dependencies\n(Isaac Lab wins over every requester)"]
    C["newton[sim] @ git+...@v1.4.0"]
    D["mujoco-warp >=3.10.0.2,<3.11"]
    E["mujoco ~=3.10.0"]
    F["torch==2.11.0 stack"]
    G["Resolved environment\n(Newton 1.4 + MuJoCo 3.10)"]
    A -->|"exact pins blocked by"| B
    B --> C
    B --> D
    B --> E
    B --> F
    C --> G
    D --> G
    E --> G
    F --> G
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A["isaacsim-core 6.0.0.1\n(pins mujoco-warp==3.8.0.3, mujoco==3.8.x, newton==1.2.0)"]
    B["[tool.uv] override-dependencies\n(Isaac Lab wins over every requester)"]
    C["newton[sim] @ git+...@v1.4.0"]
    D["mujoco-warp >=3.10.0.2,<3.11"]
    E["mujoco ~=3.10.0"]
    F["torch==2.11.0 stack"]
    G["Resolved environment\n(Newton 1.4 + MuJoCo 3.10)"]
    A -->|"exact pins blocked by"| B
    B --> C
    B --> D
    B --> E
    B --> F
    C --> G
    D --> G
    E --> G
    F --> G
Loading

Reviews (1): Last reviewed commit: "Reference the upstream Newton issue from..." | Re-trigger Greptile

Comment on lines +202 to +207
if use_mujoco_contacts and shape_type == ShapeType.MESH_CAPSULE:
pytest.xfail(
"Newton >= 1.4 (mujoco-warp 3.10 margin/gap semantics) loses mesh-mesh collision response in the"
" MuJoCo contacts pipeline: objects tunnel with zero contact forces."
" Tracked upstream: https://github.com/newton-physics/newton/issues/3559"
)

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 xfail scope may be too narrow for other mesh types

The PR description characterises the regression as "mesh-mesh shape pairs in the MuJoCo contacts pipeline lose collision response entirely," yet the guard only covers MESH_CAPSULE. STABLE_SHAPES also includes MESH_SPHERE, MESH_BOX, and MESH_CYLINDER. Because test_horizontal_collision_detects_contact runs the same shape_type for both objects, those combinations are also mesh-mesh collisions and are likely affected. If any of them fail under the new MuJoCo 3.10 stack they will produce an unguarded hard failure in CI rather than an expected-failure, which would block merges unrelated to this pin. Consider broadening the condition to use_mujoco_contacts and is_mesh_shape(shape_type) (the helper is already imported) and re-evaluating once the upstream fix in newton#3559 lands.

Comment on lines 201 to 208
def test_horizontal_collision_detects_contact(device: str, use_mujoco_contacts: bool, shape_type: ShapeType):
if use_mujoco_contacts and shape_type == ShapeType.MESH_CAPSULE:
pytest.xfail(
"Newton >= 1.4 (mujoco-warp 3.10 margin/gap semantics) loses mesh-mesh collision response in the"
" MuJoCo contacts pipeline: objects tunnel with zero contact forces."
" Tracked upstream: https://github.com/newton-physics/newton/issues/3559"
)
"""Test horizontal collision detection with varied velocities and separations.

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.

P2 The function docstring is placed after the early-exit block, making it an unreachable string expression rather than a proper __doc__ attribute. Python only recognises a triple-quoted string as a docstring when it is the first statement in the function body. Moving the xfail check below the docstring preserves documentation tooling support and follows the standard pytest conditional-xfail pattern.

Suggested change
def test_horizontal_collision_detects_contact(device: str, use_mujoco_contacts: bool, shape_type: ShapeType):
if use_mujoco_contacts and shape_type == ShapeType.MESH_CAPSULE:
pytest.xfail(
"Newton >= 1.4 (mujoco-warp 3.10 margin/gap semantics) loses mesh-mesh collision response in the"
" MuJoCo contacts pipeline: objects tunnel with zero contact forces."
" Tracked upstream: https://github.com/newton-physics/newton/issues/3559"
)
"""Test horizontal collision detection with varied velocities and separations.
def test_horizontal_collision_detects_contact(device: str, use_mujoco_contacts: bool, shape_type: ShapeType):
"""Test horizontal collision detection with varied velocities and separations.

Comment thread pyproject.toml Outdated
Comment on lines +170 to +171
# Newton git commit + matching warp-lang prerelease (upgraded together).
newton = "c7ae7c7648cd0717df39e5c94b95d5a02c997320"
newton = "v1.4.0"

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.

P2 The comment still reads "Newton git commit" but the pin is now the v1.4.0 release tag, not a bare commit SHA.

Suggested change
# Newton git commit + matching warp-lang prerelease (upgraded together).
newton = "c7ae7c7648cd0717df39e5c94b95d5a02c997320"
newton = "v1.4.0"
# Newton release tag + matching warp-lang prerelease (upgraded together).
newton = "v1.4.0"

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!

Newton 1.4.0 is published on PyPI, so pin newton[sim]==1.4.0 instead of
the git tag (consistent with the pin form adopted by the visualizer
marker PR) and point the single-source test at the release form.
@AntoineRichard

Copy link
Copy Markdown
Collaborator

Closing this as we're going to merge this one instead: #6586

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.

2 participants