Skip to content

[Newton] Fixes kit decoupling paths for new graph workflows - #4177

Merged
kellyguo11 merged 66 commits into
isaac-sim:dev/newtonfrom
kellyguo11:decouple-kit-graph
Dec 10, 2025
Merged

kellyguo11 merged 66 commits into
isaac-sim:dev/newtonfrom
kellyguo11:decouple-kit-graph

Conversation

@kellyguo11

Copy link
Copy Markdown
Contributor

Description

Fixes a few place where omniverse decoupling wasn't considered yet for new refactored paths.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@greptile-apps

greptile-apps Bot commented Dec 10, 2025

Copy link
Copy Markdown
Contributor

Skipped: This PR changes more files than the configured file change limit: (222 files found, 100 file limit)

@github-actions github-actions Bot added documentation Improvements or additions to documentation asset New asset feature or request isaac-sim Related to Isaac Sim team infrastructure labels Dec 10, 2025
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Dec 10, 2025
@kellyguo11
kellyguo11 merged commit 6b7afee into isaac-sim:dev/newton Dec 10, 2025
ooctipus added a commit to ooctipus/IsaacLab that referenced this pull request Oct 8, 2026
Newton isaac-sim#4177 imports authored normals and preserves sharp USD mesh shading. Refresh the four affected Newton-rendered ANYmal references; keep the existing pixel and SSIM tolerances.
ooctipus added a commit that referenced this pull request Oct 8, 2026
# Description

Update Newton to commit `5ea82eef6f7911388025a8df6ccdb172e2fed286` and
MuJoCo/MuJoCo Warp to 3.14. Adapt checkpoint loading, actuator
selection, cable indexing, deformable registration, and visualization to
the changed interfaces. Workspace requirements and wheel metadata use
the same Newton revision.

## Runtime changes and their upstream causes

- **Actuator checkpoints — [Newton
#4347](newton-physics/newton#4347 Newton
removed TorchScript/dict loading. Export existing TorchScript MLP/LSTM
checkpoints to dynamic-batch `.pt2` during USD authoring, preserving
metadata and device placement. Users keep their existing paths and
actuator configurations.
- **Actuator parameters — [Newton
#4430](newton-physics/newton#4430 Selection
caches now belong to each view. Initialize the DOF mapping cache in
Isaac Lab's lightweight PhysX/OVPhysX view and borrow the updated
mapping methods. Remove its duplicate world-mask implementation.
- **Cable indexing — [Newton
#4124](newton-physics/newton#4124 Standalone
cables now include the free root joint. Its child is the root segment,
so the link array already contains every segment. Remove the separate
root binding and `link_count + 1`; use one child-body ID array for
writes. Masked writes and CUDA capture remain covered.
- **Deformable registration — [Newton
#4363](newton-physics/newton#4363 Mesh
builders now record their own surface/volume ranges. Remove Isaac Lab's
duplicate calls to the deleted private recording methods and read the
new records directly.
- **Live plots — [Newton
#4186](newton-physics/newton#4186 Read
histories from `PlotLogger`, their new owner. The old viewer-level
lookups left GL plots empty.
- **Contact visualization — [Newton
#4340](newton-physics/newton#4340 Replace
the removed `sensing_obj_transforms` alias with `sensing_transforms`.
- **Rendering references — [Newton
#4177](newton-physics/newton#4177 Refresh
four ANYmal images for authored mesh normals and USD sharp shading.
Pixel and SSIM tolerances are unchanged. Disabling the upstream
normal-loading change made both affected Newton cases pass against the
old references, confirming the cause.

All seven upstream changes are included in the pinned revision.

## Why the reset code can be removed

The rebind callback was introduced in [Isaac Lab
#4818](#4818), when hard
resets restarted simulation without first dispatching `STOP`. [Isaac Lab
#8027](#8027) subsequently
added `STOP` before model recreation. Assets are now invalidated and
their existing `PHYSICS_READY` initialization constructs new views,
data, and actuators. Rebinding the discarded data is redundant.

The extra callbacks run before asset initialization and access the
previous data's weak view reference. Newton #4430 removed global caches
that accidentally retained those views, exposing `ReferenceError` in
rigid objects and collections. Articulations avoided that error only
because the shared view registry retained their old views; a
joint-wrench sensor initialized first could then select a view of the
old model.

Remove these extra callbacks across rigid objects, collections,
articulations, cables, deformables, and MPM. Clear Newton's old registry
entries and per-model actuator/step hooks before rebuilding. Each data
instance binds once during construction. Remove the rebind-only proxy
branches, timestamp invalidation, actuator-executor rebinding, and
cleanup overrides. Keep articulation's model-init/post-step cleanup and
its separate joint/body ordering setup, which still have callers.

This preserves the existing hard-reset lifetime: reacquire `asset.data`
and its arrays after `sim.reset(soft=False)`. Soft resets retain the
current model and data. The direct `ArticulationData` test now retains
its `ArticulationView` explicitly, matching production ownership instead
of relying on Newton's former global cache.

Existing asset tests now exercise two real hard resets, state writes,
physics steps, fresh data containers, and stable callback counts.
Replace the synthetic array-swap/rebind test and its helper with this
lifecycle check; remove the actuator test whose only caller was the
deleted private rebind method. Extend the existing nested-root sensor
test to initialize the sensor first. This follow-up removes 200
production lines and 449 lines overall, without adding production files,
classes, or helpers.

PhysX and OVPhysX retain their existing reset lifecycle. Inline five
one-use proxy-initialization helpers into buffer creation, and remove
the unused OVPhysX articulation-data invalidation method and its
test-only assertions. Keep PhysX articulation's helper because ordering
changes call it again. This cleanup removes 64 production lines and 14
test lines (76 net lines including two changelog fragments), with no new
helpers or public API changes.

## Validation

Additional PhysX/OVPhysX validation for `6d4202844`: 565 shared
rigid-object, collection, and articulation contract tests passed on CPU
and GPU0, with four existing expected failures. Each file ran in its own
process. The retained OVPhysX ordering-cache test also passed. An AST
comparison confirmed that inlining preserved every initialization
statement and its order; formatting, lint, and changelog checks passed.

Validated `f677d2532` on GPU0. The collection, articulation, deformable,
MPM, and sensor-order regressions failed on `9f5d1c3bd` for the expected
stale-view or accumulating-callback errors and passed with the fix.

148 focused tests passed. Each test file ran in its own process:

```bash
export CUDA_VISIBLE_DEVICES=0 DISPLAY=
export OMNI_KIT_ACCEPT_EULA=YES ACCEPT_EULA=Y
export WARP_CACHE_PATH=/tmp/pr6aii-warp-cache
for test_file in \
  source/isaaclab_newton/test/assets/test_rigid_object.py \
  source/isaaclab_newton/test/assets/test_articulation.py \
  source/isaaclab_newton/test/assets/test_mpm_object.py \
  source/isaaclab_newton/test/assets/test_deformable_object.py \
  source/isaaclab/test/actuators/test_actuator_collection.py \
  source/isaaclab_newton/test/assets/test_newton_actuators_newton.py \
  source/isaaclab_newton/test/sensors/test_joint_wrench_sensor.py; do
  uv run --no-sync python -m pytest "$test_file" -q
done
uv run --no-sync python -m pytest \
  source/isaaclab_newton/test/physics/test_newton_manager_abstraction.py \
  -k 'hard_reset_then_step_runs or graph_capture_preserves_first_step_and_recapture or reset_lands' -q
ISAACLAB_CHANGELOG_BASE_REF=abe7db4f3 uv run --no-sync isaaclab -f
```

The environment included the `test`, `isaacsim`, and
`tetrahedralization` extras. Local disk pressure required moving
compilation temporary files to shared memory; incompatible global Warp
cache entries required using the branch's dedicated cache. No production
workaround, test tolerance, or timeout was added for either environment
issue.

Earlier checks on the same dependency revision covered checkpoint
numerical agreement and variable batches, viewer teardown and markers,
cable masked writes/capture, camera/raycast hard resets, deformable
cloning, wheel metadata, and all four updated image references.

The exact Newton VCS pin still requires Git for installation. [PyPI does
not accept direct-URL
dependencies](https://setuptools.pypa.io/en/stable/userguide/dependency_management.html#direct-url-dependencies),
so a published Newton version containing the required changes is needed
before publishing that dependency metadata to PyPI.

Related viewer work: #8303.

## Type of change

- Bug fix

## Release backport

- [ ] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

## Checklist

- [x] Read the contribution guidelines
- [x] Ran `uv run isaaclab -f`
- [x] Validated changed behavior with focused tests
- [x] Added changelog fragments for each changed package
- [x] Contributor already listed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

asset New asset feature or request documentation Improvements or additions to documentation infrastructure isaac-lab Related to Isaac Lab team isaac-sim Related to Isaac Sim team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants