Skip to content

Commit 9e4e62c

Browse files
hujc7kellyguo11
andauthored
[Newton] Bump Newton pin to v1.2.0rc2 (#5523)
## Summary Bumps the Newton pin to [`v1.2.0rc2`](https://pypi.org/project/newton/1.2.0rc2/), which pulls in IsaacLab-relevant fixes plus the upstream tendon-scoping fix. ## What's new in Newton v1.2.0rc2 vs IsaacLab's current pin (`a27277e`) The current IsaacLab Newton pin is from late April; v1.2.0rc2 is the latest release-candidate cut. Notable fixes pulled in: - **[newton-physics/newton#2659](newton-physics/newton#2659 \"Scope USD custom-frequency parsing\" — `parse_usd` now scopes the custom-frequency walk to `root_path` natively. - **[newton-physics/newton#2678](newton-physics/newton#2678 Regression fix. - **[newton-physics/newton#2720](newton-physics/newton#2720 `SolverKamino` reset under `world_mask`. - **[newton-physics/newton#2710](newton-physics/newton#2710 VRAM leak fix on example reset. - Plus 16 other smaller fixes between rc1 and rc2. ## Required dep bumps Newton 1.2.0rc2's \`pyproject.toml\` requires: - \`warp-lang==1.13.0\` - \`mujoco==3.8.0\` (was 3.6.0) - \`mujoco-warp==3.8.0.1\` (was 3.6.0) Pins updated in: | File | Change | |---|---| | \`source/isaaclab/setup.py\` | \`warp-lang==1.12.0\` → \`==1.13.0\`; \`mujoco==3.6.0\` → \`==3.8.0\`; \`mujoco-warp==3.6.0\` → \`==3.8.0.1\` | | \`source/isaaclab_newton/setup.py\` | mujoco / mujoco-warp bumps; Newton pin → \`v1.2.0rc2\` | | \`source/isaaclab_visualizers/setup.py\` | 3× Newton pin → \`v1.2.0rc2\` | | \`tools/wheel_builder/res/python_packages.toml\` | All four pins mirrored | ## Code adapts \`warp-lang\` 1.13 removed the \`wp.math\` namespace. Two IsaacLab call sites use it: - \`source/isaaclab_newton/isaaclab_newton/physics/newton_manager.py:72\` - \`source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer_kernels.py:330\` Both rewritten as \`wp.math.transform_to_matrix(...)\` → \`wp.transform_to_matrix(...)\`. That's the only IsaacLab-side adapt needed. ## Test plan - [x] \`./isaaclab.sh -i newton\` clean install against the bumped pins. - [x] \`pip list\` confirms \`newton 1.2.0rc2\`, \`warp-lang 1.13.0\`, \`mujoco 3.8.0\`, \`mujoco-warp 3.8.0.1\`. - [x] Sanity smoke: Shadow-Hand-Over MAPPO (4 envs, 1 iter) runs clean — simulation init through CUDA graph capture through one training step + checkpoint save, no errors. - [x] Pre-commit clean. ## Caveat Smoke covered Shadow-Hand-Over MAPPO. Other envs with different sensors / renderers / collision setups could surface warp 1.13 or mujoco 3.8 differences the smoke didn't exercise; full PR CI catches them. --------- Co-authored-by: Kelly Guo <kellyg@nvidia.com>
1 parent a7514be commit 9e4e62c

14 files changed

Lines changed: 182 additions & 18 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Changed
2+
^^^^^^^
3+
4+
* Bumped Newton pin to ``v1.2.0rc2``. Pulls in IsaacLab-relevant fixes from
5+
`newton-physics/newton#2678 <https://github.com/newton-physics/newton/pull/2678>`_
6+
and `newton-physics/newton#2720
7+
<https://github.com/newton-physics/newton/pull/2720>`_ (``SolverKamino``
8+
reset under ``world_mask``), the upstream tendon-scoping fix from
9+
`newton-physics/newton#2659
10+
<https://github.com/newton-physics/newton/pull/2659>`_ ("Scope USD
11+
custom-frequency parsing"), and a VRAM-leak fix on example reset
12+
(`newton-physics/newton#2710
13+
<https://github.com/newton-physics/newton/pull/2710>`_).
14+
* Newton ``v1.2.0rc2`` requires ``warp-lang==1.13.0``, ``mujoco==3.8.0``,
15+
and ``mujoco-warp==3.8.0.1``. ``warp-lang``/``mujoco``/``mujoco-warp``
16+
pins live in :mod:`isaaclab` and ``tools/wheel_builder/res/python_packages.toml``;
17+
the Newton pin is mirrored across :mod:`isaaclab_newton`,
18+
:mod:`isaaclab_visualizers` (3×), :mod:`isaaclab_physx` (``[newton]``
19+
extra), and the wheel-builder TOML.
20+
* Updated ``wp.math.transform_to_matrix`` to ``wp.transform_to_matrix`` in
21+
:mod:`~isaaclab_newton.physics.newton_manager` and
22+
:mod:`~isaaclab_ov.renderers.ovrtx_renderer_kernels` to match the
23+
``warp-lang`` 1.13 API (the ``wp.math`` namespace was removed).

source/isaaclab/setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
# procedural-generation
3131
"trimesh",
3232
"pyglet>=2.1.6,<3",
33-
"mujoco==3.6.0",
34-
"mujoco-warp==3.6.0",
33+
"mujoco==3.8.0",
34+
"mujoco-warp==3.8.0.1",
3535
# image processing
3636
"transformers==4.57.6",
3737
"einops", # needed for transformers, doesn't always auto-install
38-
"warp-lang==1.12.0",
38+
"warp-lang==1.13.0",
3939
"matplotlib>=3.10.3", # minimum version for Python 3.12 support
4040
# make sure this is consistent with isaac sim version
4141
"pillow==12.1.1",
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Added
2+
^^^^^
3+
4+
* Added a temporary ``warp.torch`` compatibility shim at
5+
:mod:`isaaclab_mimic` import time so that cuRobo (NVlabs/curobo) keeps
6+
working with ``warp-lang>=1.13``, which dropped the ``warp.torch``
7+
submodule in favour of top-level ``warp.*`` (e.g.
8+
``wp.torch.device_from_torch`` → ``wp.device_from_torch``). cuRobo's
9+
pinned commit and ``main`` still call ``wp.torch.*`` and raise
10+
``AttributeError: module 'warp' has no attribute 'torch'`` at
11+
:meth:`MotionGenConfig.load_from_robot_config` time. The shim
12+
reconstructs ``warp.torch`` as a thin forwarding module and is a
13+
no-op once warp re-introduces the namespace or cuRobo migrates.
14+
Remove this shim once the cuRobo pin in ``docker/Dockerfile.curobo``
15+
is bumped to a commit that uses the top-level ``wp.*`` API directly.

source/isaaclab_mimic/isaaclab_mimic/__init__.py

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,53 @@
55

66
"""Package containing implementation of Isaac Lab Mimic data generation."""
77

8+
# ---------------------------------------------------------------------------
9+
# Compatibility shim: re-expose ``warp.torch`` after warp-lang 1.13 dropped it
10+
#
11+
# Newton ``v1.2.0rc2`` requires ``warp-lang>=1.13``. Warp 1.13 collapsed the
12+
# ``warp.torch`` submodule into the top-level ``warp`` namespace, so e.g.
13+
# ``wp.torch.device_from_torch`` is now ``wp.device_from_torch``. cuRobo
14+
# (NVlabs/curobo) still uses the old ``wp.torch.*`` form (verified at
15+
# ``ebb71702f`` and on ``main`` as of 2026-05-07) and raises
16+
# ``AttributeError: module 'warp' has no attribute 'torch'`` at
17+
# ``MotionGenConfig.load_from_robot_config(...)`` time.
18+
#
19+
# This shim runs at ``isaaclab_mimic`` import — which Python evaluates before
20+
# any submodule, including
21+
# :mod:`isaaclab_mimic.motion_planners.curobo.curobo_planner` — so curobo
22+
# sees a ``warp.torch`` namespace whose members forward to the relocated
23+
# top-level ``warp.*`` callables. Idempotent: a no-op once warp ships
24+
# ``wp.torch`` again or curobo migrates.
25+
#
26+
# TODO: remove this shim once the cuRobo pin in ``docker/Dockerfile.curobo``
27+
# bumps to a commit that uses ``wp.from_torch``/``wp.device_from_torch``/
28+
# etc. directly. Tracking upstream at https://github.com/NVlabs/curobo —
29+
# follow up on the open issue / PR there to confirm the migration landed
30+
# before deleting this block.
31+
import sys as _sys
32+
import types as _types
33+
34+
import warp as _wp
35+
36+
if not hasattr(_wp, "torch"):
37+
_wp_torch_shim = _types.ModuleType("warp.torch")
38+
for _name in (
39+
"from_torch",
40+
"to_torch",
41+
"device_from_torch",
42+
"device_to_torch",
43+
"dtype_from_torch",
44+
"dtype_to_torch",
45+
"stream_from_torch",
46+
"stream_to_torch",
47+
):
48+
if hasattr(_wp, _name):
49+
setattr(_wp_torch_shim, _name, getattr(_wp, _name))
50+
_wp.torch = _wp_torch_shim
51+
_sys.modules["warp.torch"] = _wp_torch_shim
52+
del _wp_torch_shim, _name
53+
54+
del _sys, _types, _wp
55+
56+
857
__version__ = "1.0.0"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Changed
2+
^^^^^^^
3+
4+
* Bumped Newton pin to ``v1.2.0rc2``. Pulls in IsaacLab-relevant fixes from
5+
`newton-physics/newton#2678 <https://github.com/newton-physics/newton/pull/2678>`_
6+
and `newton-physics/newton#2720
7+
<https://github.com/newton-physics/newton/pull/2720>`_ (``SolverKamino``
8+
reset under ``world_mask``), the upstream tendon-scoping fix from
9+
`newton-physics/newton#2659
10+
<https://github.com/newton-physics/newton/pull/2659>`_ ("Scope USD
11+
custom-frequency parsing"), and a VRAM-leak fix on example reset
12+
(`newton-physics/newton#2710
13+
<https://github.com/newton-physics/newton/pull/2710>`_).
14+
* Newton ``v1.2.0rc2`` requires ``warp-lang==1.13.0``, ``mujoco==3.8.0``,
15+
and ``mujoco-warp==3.8.0.1``. ``warp-lang``/``mujoco``/``mujoco-warp``
16+
pins live in :mod:`isaaclab` and ``tools/wheel_builder/res/python_packages.toml``;
17+
the Newton pin is mirrored across :mod:`isaaclab_newton`,
18+
:mod:`isaaclab_visualizers` (3×), :mod:`isaaclab_physx` (``[newton]``
19+
extra), and the wheel-builder TOML.
20+
* Updated ``wp.math.transform_to_matrix`` to ``wp.transform_to_matrix`` in
21+
:mod:`~isaaclab_newton.physics.newton_manager` and
22+
:mod:`~isaaclab_ov.renderers.ovrtx_renderer_kernels` to match the
23+
``warp-lang`` 1.13 API (the ``wp.math`` namespace was removed).
24+
* Adapted :class:`~isaaclab_newton.renderers.NewtonWarpRenderer` to
25+
Newton ``v1.2.0rc2``'s explicit shape-BVH lifecycle.
26+
:meth:`~newton.sensors.SensorTiledCamera.update` no longer auto-builds
27+
the BVH when a non-``None`` state is passed and the underlying
28+
``RenderContext.render`` now raises ``RuntimeError("build_bvh_shape()
29+
must be called before rendering shapes.")`` if it was never built. The
30+
renderer now calls ``newton.geometry.build_bvh_shape`` once after
31+
sensor construction and ``newton.geometry.refit_bvh_shape`` each frame
32+
before :meth:`~newton.sensors.SensorTiledCamera.update`, since env
33+
body poses move every step.

source/isaaclab_newton/isaaclab_newton/physics/newton_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def _set_fabric_transforms(
6969
i = int(wp.tid())
7070
idx = int(newton_indices[i])
7171
transform = newton_body_q[idx]
72-
fabric_transforms[i] = wp.transpose(wp.mat44d(wp.math.transform_to_matrix(transform)))
72+
fabric_transforms[i] = wp.transpose(wp.mat44d(wp.transform_to_matrix(transform)))
7373

7474

7575
@wp.kernel(enable_backward=False)

source/isaaclab_newton/isaaclab_newton/renderers/newton_warp_renderer.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,14 @@ def __init__(self, cfg: NewtonWarpRendererCfg):
172172
),
173173
)
174174

175+
# Newton ``v1.2.0rc2`` made shape-BVH construction explicit; ``SensorTiledCamera.update``
176+
# no longer auto-builds when a non-``None`` state is passed, and the underlying
177+
# ``RenderContext.render`` raises if ``build_bvh_shape`` was never called for the model.
178+
# Build it once per model — idempotent across multiple sensors that share ``newton_model``
179+
# because subsequent calls overwrite the same model-level BVH attributes.
180+
if newton_model.shape_count > 0 and newton_model.bvh_shapes is None:
181+
newton.geometry.build_bvh_shape(newton_model, newton_model.state())
182+
175183
if cfg.create_default_light:
176184
self.newton_sensor.utils.create_default_light(enable_shadows=cfg.enable_shadows)
177185

@@ -220,8 +228,13 @@ def update_camera(
220228

221229
def render(self, render_data: RenderData):
222230
"""Render and write to output buffers. See :meth:`~isaaclab.renderers.base_renderer.BaseRenderer.render`."""
231+
newton_state = self.get_scene_data_provider().get_newton_state()
232+
# Refit the shape BVH against the current state since env body poses move every frame.
233+
# ``build_bvh_shape`` ran once in ``__init__``; ``refit_bvh_shape`` reuses that topology.
234+
if self.newton_sensor.model.shape_count > 0:
235+
newton.geometry.refit_bvh_shape(self.newton_sensor.model, newton_state)
223236
self.newton_sensor.update(
224-
self.get_scene_data_provider().get_newton_state(),
237+
newton_state,
225238
render_data.camera_transforms,
226239
render_data.camera_rays,
227240
color_image=render_data.outputs.color_image,

source/isaaclab_newton/setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ def run(self):
3838
EXTRAS_REQUIRE = {
3939
"all": [
4040
"prettytable==3.3.0",
41-
"mujoco==3.6.0",
42-
"mujoco-warp==3.6.0",
41+
"mujoco==3.8.0",
42+
"mujoco-warp==3.8.0.1",
4343
"PyOpenGL-accelerate==3.1.10",
44-
"newton @ git+https://github.com/newton-physics/newton.git@a27277ed49d6f307b8a1e4c394be7e1d14965a62",
44+
"newton @ git+https://github.com/newton-physics/newton.git@v1.2.0rc2",
4545
],
4646
}
4747

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Changed
2+
^^^^^^^
3+
4+
* Bumped Newton pin to ``v1.2.0rc2``. Pulls in IsaacLab-relevant fixes from
5+
`newton-physics/newton#2678 <https://github.com/newton-physics/newton/pull/2678>`_
6+
and `newton-physics/newton#2720
7+
<https://github.com/newton-physics/newton/pull/2720>`_ (``SolverKamino``
8+
reset under ``world_mask``), the upstream tendon-scoping fix from
9+
`newton-physics/newton#2659
10+
<https://github.com/newton-physics/newton/pull/2659>`_ ("Scope USD
11+
custom-frequency parsing"), and a VRAM-leak fix on example reset
12+
(`newton-physics/newton#2710
13+
<https://github.com/newton-physics/newton/pull/2710>`_).
14+
* Newton ``v1.2.0rc2`` requires ``warp-lang==1.13.0``, ``mujoco==3.8.0``,
15+
and ``mujoco-warp==3.8.0.1``. ``warp-lang``/``mujoco``/``mujoco-warp``
16+
pins live in :mod:`isaaclab` and ``tools/wheel_builder/res/python_packages.toml``;
17+
the Newton pin is mirrored across :mod:`isaaclab_newton`,
18+
:mod:`isaaclab_visualizers` (3×), :mod:`isaaclab_physx` (``[newton]``
19+
extra), and the wheel-builder TOML.
20+
* Updated ``wp.math.transform_to_matrix`` to ``wp.transform_to_matrix`` in
21+
:mod:`~isaaclab_newton.physics.newton_manager` and
22+
:mod:`~isaaclab_ov.renderers.ovrtx_renderer_kernels` to match the
23+
``warp-lang`` 1.13 API (the ``wp.math`` namespace was removed).

source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer_kernels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,4 +327,4 @@ def sync_newton_transforms_kernel(
327327
i = wp.tid()
328328
body_idx = newton_body_indices[i]
329329
transform = newton_body_q[body_idx]
330-
ovrtx_transforms[i] = wp.transpose(wp.mat44d(wp.math.transform_to_matrix(transform)))
330+
ovrtx_transforms[i] = wp.transpose(wp.mat44d(wp.transform_to_matrix(transform)))

0 commit comments

Comments
 (0)