Skip to content

[Newton] Redesign Newton Manager [4/N] - #8926

Merged
StafaH merged 4 commits into
isaac-sim:mainfrom
StafaH:newton/redesign-4-mask-resets-physics
Nov 10, 2026
Merged

StafaH merged 4 commits into
isaac-sim:mainfrom
StafaH:newton/redesign-4-mask-resets-physics

Conversation

@StafaH

@StafaH StafaH commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Part 4 of the Newton manager redesign (overview).
Builds on [2c-ii/N] #8870 (merged), which made the backend reset flags mask-only. The env/MDP layer is [5/N] #8927.

Everything below the managers resets from a boolean device mask. A masked reset changes only the selected
environments and does not synchronize the device, so [5/N] can reset on the reset mask every step.

Assets and scene

  • AssetBase.reset(env_ids=None, env_mask=None) matches the sensor signature on main. Every asset honors
    env_mask (a wp.bool array of shape (num_envs,)), and it takes precedence over env_ids.
  • InteractiveScene.reset(env_ids=None, env_mask=None) passes both to every asset and sensor.
  • Fixed: on main, a reset with only env_mask reset the actuator state of every environment (Newton, PhysX, OV
    articulations), and the external wrenches of every environment (Newton and PhysX rigid objects and collections).
  • Breaking: SurfaceGripper.reset takes env_ids and env_mask instead of indices.
  • Breaking: InteractiveSceneWarp is removed. The base scene now resets every entity from the mask, and the
    override passed indices to the sensors.

Actuators

  • ActuatorBase.reset(env_ids=None, env_mask=None); ActuatorCollection.reset forwards the mask to every group
    and to the backend-native actuators.
  • DelayedPDActuator draws a delay for every environment and keeps the selected ones; the actuator nets clear the
    masked history.
  • NewtonActuatorAdapter.reset(env_mask=...) builds the per-DOF masks of stateful actuators into preallocated
    arrays and skips stateless ones.
  • Contrib Thruster and Multirotor resample and reset the masked environments.

Buffers and processors

  • DelayBuffer.reset takes a boolean mask and redraws sampled lags with torch.where.
  • TensorProcessor.reset, DigitalFilter, Integrator, NoiseModel and NoiseModelWithAdditiveBias take
    env_mask.
  • Ray-caster drift resampling selects environments with the resolved reset mask instead of nonzero().

Breaking: custom subclasses of AssetBase, ActuatorBase, TensorProcessor and NoiseModel must accept
env_mask and leave unselected environments unchanged.

Testing

Targeted tests pass, run file by file: actuator collection and Newton adapter (masked reset; the collection test
runs under torch.cuda.set_sync_debug_mode("error")), delay buffer, tensor processors, noise, Newton
articulation, rigid object, cable, Newton actuators, Newton ray caster, articulation and rigid object contracts
(-k newton), and the experimental frontend. Kit-only tests not run locally: interactive scene, ray caster
sensor, sensor base, thruster, PhysX/OV assets.

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 added changelog fragments

@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Nov 4, 2026
@StafaH StafaH mentioned this pull request Nov 4, 2026
6 tasks done
@StafaH
StafaH force-pushed the newton/redesign-4-mask-resets-physics branch 2 times, most recently from edcdeec to ba22e57 Compare November 6, 2026 21:54

@maxkra15 maxkra15 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.

The mask reset plumbing looks good from this pass. 72 focused checks passed across actuators, buffers, processors and bias noise, including the actuator tests on CUDA. Left two optional performance suggestions inline, mainly for when 5/N starts calling these resets every step. No correctness blocker found in this review; Kit-only paths weren't run.

@StafaH
StafaH force-pushed the newton/redesign-4-mask-resets-physics branch from ba22e57 to 9e909b9 Compare November 10, 2026 04:57
@StafaH
StafaH marked this pull request as ready for review November 10, 2026 04:57
@StafaH
StafaH requested a review from a team November 10, 2026 04:57

@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

Needs attention: Scope and over-engineering (2), Compatibility and deprecation (7), Style consistency (3), Test quality (2). Other reviewed categories look good.

  • PR description: Narrow the no-sync claim to warmed device-mask paths; benchmark full-batch reset latency using baseline/candidate revisions, command/workload, hardware, backend, environment count, warmup, and metric, while retaining the reported per-file validation and template sections.
  • Design and architecture: Architecture looks good.
  • Scope and over-engineering: Minimal implementation: extend InteractiveScene, ActuatorCollection, backend reset hooks, and existing buffer, processor, noise, and ray-caster owners; remove the aggregate entity tuple and discarded drift allocations, then forward masks directly while retaining compatibility bridges. No source modules were added; existing modules retain their responsibilities. Scope is cohesive; no split recommended.
  • API: API changes look good.
  • Compatibility and deprecation: Breaking changes: removed InteractiveSceneWarp, renamed SurfaceGripper.indices, expanded custom reset hooks, and altered seeded index-reset sampling lack complete transitions; retain functional legacy paths, targeted warnings, migration and removal guidance, and transition coverage.
  • Implementation: Implementation looks good.
  • Style consistency: Changed void reset methods omit required return annotations; add -> None consistently.
  • Test quality: The added CPU DelayBuffer regression passes the old implementation and misses the distinguishing synchronization behavior; replace it with a CUDA masked-reset check that rejects synchronization.

Significant concerns. Posted 14 inline findings.

Automated review; human maintainers own approval decisions.

@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

Needs attention: Scope and over-engineering (3), Compatibility and deprecation (4), Style consistency (4), Test quality (3). Other reviewed categories look good.

  • PR description: Qualify the universal synchronization claim; supply reproducible baseline/candidate reset-latency measurements with revisions, command/workload, hardware, backend, environment count, mask density, warmup, and runtime environment.
  • Design and architecture: Architecture looks good.
  • Scope and over-engineering: Minimal implementation: extend InteractiveScene, ActuatorCollection, DelayBuffer, processor/noise owners, and backend/contrib resets; no source modules were added. Collapse duplicate actuator traversal, avoid the scene entity tuple, and allocate zero ray-cast drift only when sampling is disabled. Keep selector forwarding, selected-state updates, and preallocated Newton per-DOF masks. Scope is cohesive; no split recommended.
  • API: API changes look good.
  • Compatibility and deprecation: Breaking changes: InteractiveSceneWarp imports, SurfaceGripper.reset(indices=...), and legacy entity/actuator overrides lose support without complete deprecation bridges; retain functional old contracts with targeted warnings, migration/removal guidance, and transition coverage.
  • Implementation: Implementation looks good.
  • Style consistency: The changelog incorrectly groups DelayBuffer.reset under added env_mask parameters; describe its Torch boolean batch_ids contract separately.
  • Test quality: The processor reset test derives every expectation from another instance of the tested processor, allowing shared computation errors to pass; replace that oracle with hand-computed reset and continued-history values.

Significant concerns. Posted 14 inline findings.

Automated review; human maintainers own approval decisions.

@greptile-apps

greptile-apps Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[High impact] The mask reset path reaches shared scene and stateful reset workflows across multiple physics backends.

The PR appears safe to merge, with a non-blocking cleanup needed for the deleted scene class’s API docs.

Findings

  1. P2 Docs reference the deleted class ▶

Summary

This PR carries boolean reset masks through scenes, assets, actuators, buffers, and stateful processors.

  • Scene assets reset only the environments selected by a device mask.
  • Actuators clear and resample state only for selected environments.
  • Stateful buffers and processors reset selected environments without compacting the mask.
  • Ray casters keep drift resets on the selected environment mask.
  • Multirotor and thruster resets leave unselected flight state alone.
  • Warp environments use the shared scene instead of a separate scene class.

Intentional breaking changes acknowledged by StafaH: removal of InteractiveSceneWarp, replacement of SurfaceGripper.reset(indices=...), and the requirement for custom reset overrides to accept env_mask. The PR description explains that the base scene now supports masks and custom overrides must preserve unselected environments.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["InteractiveScene.reset(env_mask)"] --> B["Assets and sensors"]
    B --> C["ActuatorCollection.reset"]
    C --> D["Torch actuator groups"]
    C --> E["Backend-native actuators"]
    E --> F["Build per-DOF masks"]
    F --> G["Reset both state buffers"]
    B --> H["Wrench composers and sensor buffers"]
Loading

Reviews (1) · Last reviewed commit: "Skip stateless Newton actuators in maske..." · Reviewed by Greptile

@StafaH

StafaH commented Nov 10, 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 Nov 10, 2026
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Nov 10, 2026
Assets, actuators, the Newton actuator adapter, delay buffers, stateful
tensor processors and bias noise models take env_mask and reset only the
selected environments without synchronizing the device. The scene passes
env_ids and env_mask to every asset and sensor, so masked resets no
longer reset the actuator state and external wrenches of every
environment. InteractiveSceneWarp is removed.

@maxkra15 maxkra15 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.

Looks good. The stateless groups no longer allocate or build reset masks, and mixed/stateful groups still reset both state buffers correctly. Mask precedence and the ray-caster drift changes check out too

@AntoineRichard
AntoineRichard enabled auto-merge (squash) November 10, 2026 17:26
@StafaH
StafaH force-pushed the newton/redesign-4-mask-resets-physics branch from 753c30b to ba998c1 Compare November 10, 2026 17:47
@StafaH

StafaH commented Nov 10, 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 Nov 10, 2026
@StafaH

StafaH commented Nov 10, 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 Nov 10, 2026
@StafaH
StafaH disabled auto-merge November 10, 2026 21:52
@StafaH
StafaH merged commit 3bbf6a4 into isaac-sim:main Nov 10, 2026
58 checks passed
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 isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants