|
| 1 | +.. Copyright (c) 2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). |
| 2 | +.. All rights reserved. |
| 3 | +.. |
| 4 | +.. SPDX-License-Identifier: BSD-3-Clause |
| 5 | +
|
| 6 | +.. _newton-coupled-solvers: |
| 7 | + |
| 8 | +Coupled Solvers |
| 9 | +=============== |
| 10 | + |
| 11 | +.. warning:: |
| 12 | + |
| 13 | + Coupled solvers are experimental and exposed through |
| 14 | + :mod:`isaaclab_contrib.coupling`. Their API, behavior, feature support, |
| 15 | + performance, and implementation may change. |
| 16 | + |
| 17 | +Newton can partition one model between multiple solvers and exchange state and |
| 18 | +forces between them during each simulation step. This lets a task combine |
| 19 | +solver families that target different physics, such as an MJWarp rigid robot |
| 20 | +interacting with VBD cloth or an MPM material. |
| 21 | + |
| 22 | +Isaac Lab exposes this framework through |
| 23 | +:mod:`isaaclab_contrib.coupling`. The adapter turns configuration selectors |
| 24 | +into named Newton solver entries, constructs the selected coupling algorithm, |
| 25 | +and integrates it with :class:`~isaaclab_newton.physics.NewtonCfg`. For the |
| 26 | +shared-model architecture, iteration algorithms, supported constraint rows, |
| 27 | +and solver-specific implementation details, see Newton's |
| 28 | +`Coupled Solvers concept page |
| 29 | +<https://newton-physics.github.io/newton/stable/concepts/coupling.html>`_. |
| 30 | + |
| 31 | + |
| 32 | +The coupling model |
| 33 | +------------------ |
| 34 | + |
| 35 | +A coupled simulation starts from one Newton model. Instead of giving the whole |
| 36 | +model to one solver, Isaac Lab partitions it into named entries. Each entry |
| 37 | +selects a solver and owns a disjoint part of the model: |
| 38 | + |
| 39 | +.. code-block:: text |
| 40 | +
|
| 41 | + Shared Newton model |
| 42 | + ├── "rigid" entry → MJWarp owns robot bodies, joints, and shapes |
| 43 | + ├── "soft" entry → VBD owns deformable particles and static shapes |
| 44 | + └── interface → proxy or ADMM coupling connects the entries |
| 45 | +
|
| 46 | +Each solver receives a view of the shared model and advances only the elements |
| 47 | +owned by its entry. An element can belong to at most one entry; unassigned |
| 48 | +elements remain outside the nested solvers. Keep each articulation in a single |
| 49 | +entry. |
| 50 | + |
| 51 | +Isaac Lab resolves ownership selectors, constructs the Newton entry views, and |
| 52 | +runs the coupled solver through the normal Newton backend lifecycle. Newton |
| 53 | +owns the coupling algorithms and the exchange of poses, forces, and constraint |
| 54 | +information between entries. |
| 55 | + |
| 56 | + |
| 57 | +Choose Proxy or ADMM Coupling |
| 58 | +----------------------------- |
| 59 | + |
| 60 | +.. list-table:: |
| 61 | + :header-rows: 1 |
| 62 | + :widths: 20 40 40 |
| 63 | + |
| 64 | + * - Approach |
| 65 | + - How it works |
| 66 | + - When to use it |
| 67 | + * - Proxy |
| 68 | + - A source-owned body or particle appears as a virtual endpoint in a |
| 69 | + destination solver. The destination returns feedback on a later pass or |
| 70 | + iteration. |
| 71 | + - Use when the interaction is naturally directional, such as a rigid |
| 72 | + collider inside a deformable or particle solve. Proxy coupling can |
| 73 | + reuse the destination solver's contact path and is the established path |
| 74 | + for Isaac Lab's coupled MJWarp--VBD and rigid--MPM tasks. |
| 75 | + * - ADMM |
| 76 | + - The coupler creates interface constraints between entries, iterates the |
| 77 | + sub-solvers, and applies equal and opposite interface forces. |
| 78 | + - Use when the interface should be symmetric, especially for supported |
| 79 | + cross-entry joints, body--particle attachments, or frictional contacts. |
| 80 | + ADMM has more tuning parameters and supports a narrower set of |
| 81 | + constraint rows. |
| 82 | + |
| 83 | +Proxy coupling is usually the simpler starting point for collider-style |
| 84 | +rigid--deformable interaction. Use ``mode="lagged"`` first; the |
| 85 | +``"staggered"`` mode uses a newer source state but is more sensitive to the |
| 86 | +timestep and ordering. Increase coupling iterations only after each entry is |
| 87 | +stable on its own. |
| 88 | + |
| 89 | +ADMM is a better fit when assigning a source and destination would make the |
| 90 | +physical interface artificially one-way. Its fixed iteration count and |
| 91 | +penalty, proximal, and stabilization parameters are part of the coupled |
| 92 | +constraint solve, so tune them together with the timestep and the participating |
| 93 | +solvers. Newton's concept page is the source of truth for the currently |
| 94 | +supported joints, contacts, and limitations. |
| 95 | + |
| 96 | +Proxy coupling can have lower coupling overhead because it reuses the |
| 97 | +destination solver's contact path and may work with one pass, but its |
| 98 | +directional exchange is timestep- and ordering-sensitive. ADMM represents a |
| 99 | +symmetric interface, but every coupling iteration advances the participating |
| 100 | +solvers again. Additional passes or iterations can improve coupled response and |
| 101 | +interface convergence at a higher runtime cost. Neither approach is uniformly |
| 102 | +more accurate; compare them on task-relevant physical metrics. |
| 103 | + |
| 104 | + |
| 105 | +Configure a coupled solver |
| 106 | +-------------------------- |
| 107 | + |
| 108 | +In Isaac Lab, :class:`~isaaclab_contrib.coupling.CouplerEntryCfg` defines each |
| 109 | +entry's solver and ownership. Use |
| 110 | +:class:`~isaaclab_contrib.coupling.CouplerProxyCfg` or |
| 111 | +:class:`~isaaclab_contrib.coupling.CouplerAdmmCfg` as the |
| 112 | +:class:`~isaaclab_newton.physics.NewtonCfg` solver configuration. |
| 113 | + |
| 114 | +The following configuration mirrors the maintained Franka rigid--deformable tasks. It |
| 115 | +assigns the complete robot to MJWarp, particles and static collision geometry |
| 116 | +to VBD, and exposes only the hand and fingers as VBD proxy colliders: |
| 117 | + |
| 118 | +.. code-block:: python |
| 119 | +
|
| 120 | + from isaaclab_contrib.coupling import ( |
| 121 | + CouplerEntryCfg, |
| 122 | + CouplerProxyCfg, |
| 123 | + CouplerProxyMappingCfg, |
| 124 | + ) |
| 125 | + from isaaclab_newton.physics import MJWarpSolverCfg, NewtonCfg, VBDSolverCfg |
| 126 | +
|
| 127 | + entries = [ |
| 128 | + CouplerEntryCfg( |
| 129 | + name="rigid", |
| 130 | + solver_cfg=MJWarpSolverCfg(), |
| 131 | + bodies=[r"/World/envs/env_[^/]+/Robot"], |
| 132 | + ), |
| 133 | + CouplerEntryCfg( |
| 134 | + name="soft", |
| 135 | + solver_cfg=VBDSolverCfg(), |
| 136 | + all_particles=True, |
| 137 | + include_static_shapes=True, |
| 138 | + ), |
| 139 | + ] |
| 140 | +
|
| 141 | + physics = NewtonCfg( |
| 142 | + solver_cfg=CouplerProxyCfg( |
| 143 | + entries=entries, |
| 144 | + proxies=[ |
| 145 | + CouplerProxyMappingCfg( |
| 146 | + source="rigid", |
| 147 | + destination="soft", |
| 148 | + bodies=[ |
| 149 | + r"/World/envs/env_[^/]+/Robot/Geometry/.*panda_hand", |
| 150 | + r"/World/envs/env_[^/]+/Robot/Geometry/.*panda_(left|right)finger", |
| 151 | + ], |
| 152 | + mode="lagged", |
| 153 | + ) |
| 154 | + ], |
| 155 | + iterations=1, |
| 156 | + ), |
| 157 | + num_substeps=2, |
| 158 | + ) |
| 159 | +
|
| 160 | +For ADMM, keep the ownership entries and replace the proxy mapping with the |
| 161 | +symmetric interfaces that should be coupled: |
| 162 | + |
| 163 | +.. code-block:: python |
| 164 | +
|
| 165 | + from isaaclab_contrib.coupling import CouplerAdmmCfg |
| 166 | +
|
| 167 | + physics = NewtonCfg( |
| 168 | + solver_cfg=CouplerAdmmCfg( |
| 169 | + entries=entries, |
| 170 | + contact_pairs=[("rigid", "soft")], |
| 171 | + iterations=5, |
| 172 | + rho=1.0, |
| 173 | + ), |
| 174 | + num_substeps=2, |
| 175 | + ) |
| 176 | +
|
| 177 | +Set ``contact_pairs=None`` to generate every distinct entry pair, or use an |
| 178 | +empty list to disable ADMM contact coupling while retaining supported |
| 179 | +cross-entry joints and attachments. |
| 180 | + |
| 181 | + |
| 182 | +Tune Coupling |
| 183 | +------------- |
| 184 | + |
| 185 | +Stabilize each entry independently before changing coupling controls. |
| 186 | + |
| 187 | +* ``CouplerEntryCfg.substeps`` changes the time resolution for one entry; more |
| 188 | + substeps add solver work. |
| 189 | +* For proxy coupling, ``mode`` controls exchange ordering, ``iterations`` |
| 190 | + controls relaxation passes, ``mass_scale`` changes proxy effective inertia in |
| 191 | + the destination, and ``collide_interval`` controls contact refresh frequency. |
| 192 | +* For ADMM, ``iterations`` controls interface passes, ``rho`` sets the penalty |
| 193 | + weight, ``gamma`` adds proximal inertia and velocity weighting, and |
| 194 | + ``baumgarte`` adds positional-error correction. |
| 195 | + |
| 196 | +More substeps or iterations can improve stability or convergence, but cost |
| 197 | +runtime and cannot repair an unstable entry. The generated |
| 198 | +:doc:`coupling configuration API |
| 199 | +</source/api/lab_contrib/isaaclab_contrib.coupling>` lists every field and |
| 200 | +default; Newton's concept page explains the underlying algorithms. |
| 201 | + |
| 202 | + |
| 203 | +Start from a maintained task |
| 204 | +---------------------------- |
| 205 | + |
| 206 | +The :ref:`newton-vbd-proxy-coupling` guide contains the complete configuration |
| 207 | +and runnable commands for the Franka soft-body tasks. Start from that example |
| 208 | +when building a proxy-coupled rigid--deformable environment, then narrow entry |
| 209 | +ownership and proxy selectors to the bodies that participate in the |
| 210 | +interaction. |
| 211 | + |
| 212 | +Current Isaac Lab limitations include no support for nested couplers or Newton |
| 213 | +contact sensors, and proxy coupling supports at most two entries. Some solver |
| 214 | +modes require manager-specific lifecycle work and cannot be nested in a |
| 215 | +coupler. Validate each entry independently before tuning the coupled result, |
| 216 | +and consult the Newton concept page for current algorithm-level support and |
| 217 | +limitations. |
0 commit comments