Skip to content

Move standalone VBD support into Newton core - #6937

Merged
kellyguo11 merged 16 commits into
isaac-sim:developfrom
mmichelis:vbd-core-review-fixes
Aug 14, 2026
Merged

Move standalone VBD support into Newton core#6937
kellyguo11 merged 16 commits into
isaac-sim:developfrom
mmichelis:vbd-core-review-fixes

Conversation

@mmichelis

@mmichelis mmichelis commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Description

Moves the standalone Newton VBD solver configuration and manager from isaaclab_contrib.deformable into isaaclab_newton.physics. The core VBD API can now be imported without isaaclab_contrib. When the contrib deformable integration is installed, NewtonVBDManager uses its registered deformable builder hook and Fabric synchronization.

  • Adds core NewtonVBDManager, VBDSolverCfg, and NewtonSoftContactCfg.
  • Moves global soft-contact parameters from the nested solver_cfg.model_cfg to NewtonCfg.soft_contact_cfg.
  • Removes the contrib NewtonModelCfg, NewtonModelSolverCfg, VBDSolverCfg, and NewtonVBDManager symbols. Import the standalone VBD types from isaaclab_newton.physics instead.
  • Keeps coupled solvers and deformable object integration in contrib. Custom coupling now imports the VBD manager and configuration from core.
  • Keeps deformable USD exclusions localized in the core VBD manager without changing the generic Newton manager importer API.
  • Migrates the launcher, examples, tutorials, and Franka soft-body task presets to the core API.
  • Updates API, migration, deformable, and VBD usage documentation.
  • Adds focused core API, VBD USD exclusion, BVH, manager abstraction, launcher, and contrib consumer tests.
  • Adds changelog fragments for all four touched packages.

No new external dependencies are required.

The removed symbols are experimental contrib APIs. This change intentionally does not retain compatibility aliases at the old import paths.

Migration

Import the standalone VBD types from isaaclab_newton.physics:

from isaaclab_newton.physics import NewtonCfg, NewtonSoftContactCfg, VBDSolverCfg

physics_cfg = NewtonCfg(
    solver_cfg=VBDSolverCfg(iterations=10),
    soft_contact_cfg=NewtonSoftContactCfg(soft_contact_kd=0.01),  # preserve the previous contrib default
)

Global soft-contact parameters move from solver_cfg.model_cfg to the outer NewtonCfg.soft_contact_cfg. NewtonSoftContactCfg.soft_contact_kd defaults to Newton's 10.0; set it explicitly if you relied on the previous contrib default of 0.01.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Breaking change (existing functionality will not work without user modification)
  • Documentation update

Validation

  • 5 core VBD tests passed.
  • 5 VBD manager abstraction tests passed.
  • 64 contrib deformable and coupling consumer tests passed.
  • 1 launcher VBD configuration test passed.
  • 39 Newton cloner tests passed against the latest develop changes.
  • All modified packages passed changelog-fragment validation.
  • The full documentation build completed without warnings or errors.
  • All repository pre-commit hooks passed.

Pytest warnings were limited to third-party PyTorch deprecation warnings and existing Newton warnings.

Checklist

  • I have read and understood the contribution guidelines.
  • I have run the pre-commit checks with ./isaaclab.sh -f.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove the feature works.
  • I have added a changelog fragment for every touched package.
  • My name already exists in CONTRIBUTORS.md.

@mmichelis
mmichelis requested a review from a team August 6, 2026 09:22
@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Aug 6, 2026
@greptile-apps

greptile-apps Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR moves standalone VBD configuration and manager support from isaaclab_contrib into isaaclab_newton.physics, while retaining optional contrib deformable hooks and synchronization.

  • Adds the core VBD manager, solver configuration, and outer Newton soft-contact configuration.
  • Migrates launcher, task, coupling, demo, test, and documentation consumers to the new API.
  • Removes the intentionally unsupported experimental contrib import paths.

Confidence Score: 5/5

The PR appears safe to merge; no concrete changed-code failure remains after checking the VBD lifecycle, replication, optional contrib integration, and configuration migration.

The migrated contact settings remain attached to the outer Newton configuration, optional contrib integration is isolated behind guarded imports, and the new VBD replication path preserves per-world transforms, hooks, sites, and deformable exclusions.

Important Files Changed

Filename Overview
source/isaaclab_newton/isaaclab_newton/physics/vbd_manager.py Adds the core VBD lifecycle, USD import and replication path, optional contrib hooks, solver construction, and per-step BVH rebuilding without an identified regression.
source/isaaclab_newton/isaaclab_newton/physics/newton_manager_cfg.py Adds outer model-global soft-contact configuration to NewtonCfg while preserving native Newton defaults when unset.
source/isaaclab_newton/isaaclab_newton/physics/newton_manager.py Applies explicitly configured soft-contact parameters to the finalized Newton model.
source/isaaclab_newton/isaaclab_newton/physics/vbd_manager_cfg.py Introduces the core VBD solver configuration with the fields previously supplied by contrib.
source/isaaclab_contrib/isaaclab_contrib/coupling/coupler.py Migrates coupling to the core VBD manager and removes obsolete nested model-configuration validation.
source/isaaclab_contrib/isaaclab_contrib/custom_coupling/franka_soft_env_cfg.py Migrates custom coupling to core VBD configuration while preserving the outer soft-contact configuration inherited from the core preset.
source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/franka_soft_env_cfg.py Moves task-specific soft-contact values from the nested solver configuration to NewtonCfg without changing their values.
source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/franka_cloth_env_cfg.py Migrates the cloth task to core VBD and outer soft-contact configuration while retaining its prior tuning.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  Launcher["Launcher / task preset"] --> NewtonCfg["NewtonCfg"]
  NewtonCfg --> VBDCfg["VBDSolverCfg"]
  NewtonCfg --> ContactCfg["NewtonSoftContactCfg"]
  VBDCfg --> VBDManager["NewtonVBDManager"]
  VBDManager --> CoreBuilder["Core Newton builder and VBD solver"]
  Contrib["Optional isaaclab_contrib deformable integration"] -. registers builder and Fabric hooks .-> VBDManager
  VBDManager --> Model["Finalized Newton model"]
  ContactCfg --> Model
Loading

Reviews (1): Last reviewed commit: "Correct coupled VBD migration note" | Re-trigger Greptile

@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

The VBD manager/config relocation into isaaclab_newton.physics, outer NewtonCfg.soft_contact_cfg, and migrated launcher, coupling, task, documentation, and test paths are internally consistent. Before merge, preserve the removed contrib APIs through a deprecation cycle and document the changed damping default in the contrib migration guidance.

  • Design and architecture: Moving standalone VBD ownership into Newton core while retaining deformable-object integration and coupled solvers in contrib is coherent. Hoisting global soft-contact parameters onto NewtonCfg also removes the solver-specific model-config shim cleanly.
  • API: The new core exports and API documentation are wired correctly. However, the previously public contrib VBD symbols are deleted without the prior deprecation required by repository policy; forwarding aliases should remain for a release. The contrib changelog must also state that soft_contact_kd changes from 0.01 to 10.0 and explain how to preserve the old behavior.
  • Implementation: The model-finalization soft-contact application, VBD stage-import exclusions and replication hooks, BVH rebuild ordering, launcher path, and migrated coupling consumers align with the new API. The required implementation change is compatibility forwarding at the old contrib import paths; the associated migration note should cover the materially changed damping default.

Minor fixes needed. Posted 2 actionable findings inline.

Automated review; human maintainers own approval decisions.

Changed
^^^^^^^

* **Breaking:** Moved the standalone VBD solver from

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.

🟡 Warning · Api — Contrib VBD symbols removed without prior deprecation

VBDSolverCfg, NewtonModelCfg, NewtonModelSolverCfg, and vbd_manager.NewtonVBDManager were exported from isaaclab_contrib.deformable.__init__.pyi and documented via autoclass; this change deletes them so existing imports fail immediately. Repository rules require deprecating public symbols in a prior release before removal. Keep thin forwarding aliases at the old paths that emit DeprecationWarning and resolve to the core types for one release.

``isaaclab_contrib.deformable`` to :mod:`isaaclab_newton.physics`. Import
:class:`~isaaclab_newton.physics.NewtonVBDManager` and
:class:`~isaaclab_newton.physics.VBDSolverCfg` from their new location, and
move ``NewtonModelCfg`` and ``NewtonModelSolverCfg`` soft-contact settings to

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.

🔵 Suggestion · Api — Migration note omits soft_contact_kd default change

NewtonModelCfg.soft_contact_kd defaulted to 1.0e-2 while NewtonSoftContactCfg.soft_contact_kd defaults to 10.0, so users who simply move settings to soft_contact_cfg silently get 1000x the contact damping. Changed entries must carry migration guidance; add the default-value change and the explicit soft_contact_kd=0.01 restoration note to this fragment.

@AntoineRichard AntoineRichard left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI-generated review

Requesting changes for the code-quality and documentation issues called out inline. The largest concerns are the duplicated Newton stage-import pipeline, public configuration docstrings that lost functional value semantics during the move, and tests that either duplicate the manager-matrix coverage or do not exercise the new soft-contact application path.

The two existing inline findings about removing public contrib APIs without a deprecation cycle and omitting the soft_contact_kd migration guidance also remain unresolved and are merge-blocking under the repository rules.

Validation performed on the exact PR head (0a5fedf1a0):

  • uv run isaaclab -f: passed.
  • 84 focused non-GPU VBD, launcher, coupling, and manager-wiring tests: passed.
  • uv run --isolated --extra test -- make -C docs current-docs: passed.

setup_registered_deformable_fabric_sync(cls)

@classmethod
def instantiate_builder_from_stage(cls):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[AI-generated review] Avoid duplicating the complete stage-import pipeline. This method copies nearly all of NewtonManager.instantiate_builder_from_stage (environment discovery, global/prototype imports, visual restoration, site injection, pose extraction, replication, and manager-state publication) solely to add deformable ignore paths and coloring. Any correction to the generic importer now has to be made in two places, and the copies have already drifted in structure. Extract the shared import/replication flow and provide a protected hook for solver-specific ignore paths; VBD should only supply its deformable exclusions and coloring requirement.

@mmichelis mmichelis Aug 12, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VBD now uses the shared NewtonManager.instantiate_builder_from_stage() flow and only overrides _get_usd_import_ignore_paths() to provide deformable exclusions. Coloring remains VBD-specific without duplicating the import pipeline.

"""Self-contact detection margin [m]."""

particle_collision_detection_interval: int = -1
"""How often particle self-contact detection runs."""

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[AI-generated review] Document the accepted value semantics. The default is -1, but "how often" does not tell users what negative, zero, or positive values do. The moved contrib API documented the actual contract: < 0 runs once before initialization, 0 runs before and after initialization, and k >= 1 runs before every k VBD iterations. Restore that concise mapping so this public field is functional rather than merely descriptive.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed. Restored the concise < 0, 0, and k >= 1 behavior mapping from the contrib API documentation.

"""Body-particle contact damping [N*s/m]."""

soft_contact_mu: float = 0.5
"""Body-particle contact friction coefficient [dimensionless]."""

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[AI-generated review] Preserve the solver semantics when moving this public config. The removed NewtonModelCfg documentation stated that effective friction is sqrt(soft_contact_mu * shape_mu); this replacement now reads as though soft_contact_mu is used directly. Restore the concise formula and its interaction with per-shape material friction. The same principle applies to soft_contact_ke, whose effective contact stiffness is averaged with the rigid shape stiffness. These are functional contracts, not tuning rationale.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored the effective body-particle stiffness and friction formulas, including their interaction with the rigid shape material properties in d7708fed1b.

from isaaclab_newton.physics import NewtonCfg, NewtonManager


def test_vbd_symbols_are_exported_from_core():

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[AI-generated review] Remove this duplicate test. test_newton_manager_abstraction.py now imports both public symbols, includes VBD in SOLVER_MATRIX (covering class_type resolution), and includes NewtonVBDManager in the subclass contract test. Consequently every assertion here is already exercised elsewhere; keeping this adds maintenance without guarding an additional regression.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 33c4862066. Removed the duplicate test; the abstraction suite already covers public exports, class resolution, and subclass contracts.

assert issubclass(physics.NewtonVBDManager, NewtonManager)


def test_soft_contact_cfg_defaults_match_newton():

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[AI-generated review] Test the new behavior, not copied constants. These assertions pass even if the new assignments in NewtonManager.start_simulation are deleted. Add a behavioral test that supplies non-default NewtonSoftContactCfg values, finalizes a model (or a focused fake), and verifies that all three values reach the finalized model; also cover that None preserves Newton defaults. The literal-default assertions can then be removed or kept only if the defaults themselves are an intentional compatibility contract.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 713f6a07bc. Replaced the literal-default assertions with behavioral coverage for custom value propagation and preservation of Newton defaults when the config is None.

:class:`~isaaclab_contrib.deformable.VBDSolverCfg` directly. Robot or
rigid-body scenes can use either:
:class:`~isaaclab_newton.physics.VBDSolverCfg` directly. Robot or
rigid-body scenes can use:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[AI-generated review] Keep the supported-coupling list consistent with this page. This wording makes the following list exhaustive, but the Custom MJWarp + VBD Parameters section later on this page still documents CoupledMJWarpVBDSolverCfg as a supported opt-in rigid/deformable path. Either retain that third bullet here or narrow this sentence to the named-entry couplers so the overview does not contradict its own detailed section.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in c3da4fd677. Narrowed the overview list to named-entry coupling options so it no longer excludes the custom shared-model path documented later.

* Soft bodies and particles are available through the experimental VBD path in
:mod:`isaaclab_contrib.deformable`; other non-rigid PhysX features are not
yet covered.
* Soft bodies and particles use the core VBD solver with the contrib deformable

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[AI-generated review] This is a capability, not a known gap. The same capability is already stated in the package and solver-coverage sections above, so repeating it here obscures the actual limitations and creates another statement to keep synchronized. Remove it from Known Gaps, or rewrite it to name the concrete non-rigid features that remain unsupported.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 7bb11dd89f. Removed the duplicated capability statement so Known Gaps now contains only actual limitations.

@kellyguo11 kellyguo11 moved this to In review in Isaac Lab Aug 11, 2026
@AntoineRichard

Copy link
Copy Markdown
Collaborator

Hi @mmichelis — thanks for addressing the duplicated stage-import pipeline and preserving the VBD coloring flow.

Could you please clarify the plan for the other review comments that are still open? In particular:

  • documenting the accepted semantics of particle_collision_detection_interval;
  • restoring the effective soft_contact_ke and soft_contact_mu formulas in the public config docs;
  • removing the duplicate symbol-export test;
  • adding behavioral coverage that verifies soft_contact_cfg reaches the finalized model and that None preserves Newton defaults;
  • reconciling the supported-coupling overview with CoupledMJWarpVBDSolverCfg;
  • removing the VBD capability statement from the Known Gaps section;
  • preserving the removed public contrib APIs through a deprecation cycle; and
  • documenting the soft_contact_kd default change and migration setting.

Some of these may be intentionally deferred or not planned for this PR. If so, could you briefly explain the rationale and, where applicable, whether they will be handled in follow-up work? That will help me understand which threads can be closed. Thanks!

@mmichelis
mmichelis force-pushed the vbd-core-review-fixes branch from 7bb11dd to 6fb7a62 Compare August 13, 2026 13:41
Add a narrow solver hook for USD import exclusions so VBD can reuse the generic stage importer. Move VBD coloring to finalization preparation and retain focused import-path coverage.
Keep stage import shared while preserving separate coloring for stage-created and prebuilt VBD builders.
Document the accepted interval values and trim redundant VBD coloring test scaffolding.
Restore the effective stiffness and friction formulas for body-particle soft contacts.
Rely on the Newton manager abstraction suite for public exports, class resolution, and subclass contracts.
Exercise configured overrides and preservation of finalized model defaults through the startup lifecycle.
Scope the overview list to named-entry coupling while retaining the custom shared-model path in its dedicated section.
Carry the new rigid-particle buffer option into the core VBD config and keep rigid-force capability coverage after removing the contrib manager.
Update the cable examples to use the core VBD configuration and mark the contrib API removal as a major change.
@mmichelis
mmichelis force-pushed the vbd-core-review-fixes branch from 23ac3ba to ab29bc3 Compare August 14, 2026 18:36
@kellyguo11
kellyguo11 merged commit f210338 into isaac-sim:develop Aug 14, 2026
47 of 48 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in Isaac Lab Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants