isaaclab_contrib.coupling#
Named Newton couplers and their configurations.
This package contains contributed coupled-solver support (proxy and ADMM based rigid-deformable coupling) that wraps Newton’s experimental coupled solvers. Each sub-solver declares its model ownership as a named entry, and coupling interfaces refer to those entries by name.
Classes
Configuration for one named sub-solver and its model ownership. |
|
Base configuration for a Newton experimental coupled solver. |
|
Configuration for one directed virtual-proxy mapping. |
|
Configuration for Newton's lagged-impulse virtual-proxy coupling. |
|
Configuration for Newton's linearized ADMM coupling. |
|
Couple named entries, each built from its own solver configuration on its model view. |
Coupler Configurations#
- class isaaclab_contrib.coupling.CouplerEntryCfg[source]#
Bases:
objectConfiguration for one named sub-solver and its model ownership.
Bodies are selected by full Newton body-label regex. Joints and shapes attached to selected bodies are included by default; additional shapes can be selected directly by their full labels.
Attributes:
Unique name used by coupling mappings to reference this entry.
Configuration used to construct this entry's Newton solver.
Bodies owned by this entry.
Parent-model particle indices owned by this entry.
Whether this entry owns every particle in the parent model.
Whether fully selected child joints are owned by this entry.
Whether shapes attached to selected bodies are owned by this entry.
Whether this entry owns all shapes whose body index is
-1.Regexes matched against full Newton shape labels, with
{ENV_REGEX_NS}expansion.Number of equal substeps this entry runs inside one coupled step.
Whether this entry steps in-place instead of using a second state buffer.
- solver_cfg: NewtonSolverCfg#
Configuration used to construct this entry’s Newton solver.
- bodies: list[str]#
Bodies owned by this entry.
Each string is treated as a regex matched against full Newton body labels, including all descendant body labels below the matched path.
{ENV_REGEX_NS}expands to the simulation’s declared clone template.
- include_child_joints: bool#
Whether fully selected child joints are owned by this entry.
A joint is owned when its child body is selected and its parent is either the world or selected by the same entry.
- class isaaclab_contrib.coupling.CouplerCfg[source]#
Bases:
NewtonSolverCfgBase configuration for a Newton experimental coupled solver.
Bodies, particles, joints, and shapes may be assigned to at most one entry. Unassigned model elements remain outside the nested solvers. Use a concrete subclass to configure the coupling interfaces.
Attributes:
Solver class whose class methods build and drive Newton's solver, e.g.
class_type.build(cfg, model, mode).Solver type metadata (deprecated).
Ordered named sub-solver entries and their ownership selectors.
Entry whose shape pairs the outer collision pipeline collides, or
Nonefor the whole model.- class_type: type | str#
Solver class whose class methods build and drive Newton’s solver, e.g.
class_type.build(cfg, model, mode).
- solver_type: str#
Solver type metadata (deprecated).
Deprecated since version Solver: dispatch is driven by the configuration class; this field is retained as metadata for logging and debugging only. Do not branch on
solver_typein new code.
- entries: list[CouplerEntryCfg]#
Ordered named sub-solver entries and their ownership selectors.
- class isaaclab_contrib.coupling.CouplerProxyMappingCfg[source]#
Bases:
objectConfiguration for one directed virtual-proxy mapping.
Attributes:
Name of the entry that owns the source bodies.
Name of the entry that receives the proxy bodies.
Source bodies exposed as proxies in the destination entry.
Source particle indices exposed as proxies in the destination entry.
Proxy transfer mode passed to Newton's coupled-proxy solver.
Scale applied to proxy body mass/inertia and particle mass in the destination view.
Relaxation factor applied to proxy-feedback forces in lagged and staggered modes.
Proxy-feedback relaxation mode.
Minimum relaxation factor used by adaptive Aitken relaxation.
Maximum relaxation factor used by adaptive Aitken relaxation.
Proxy-local collision refresh interval.
Configuration or factory for the proxy destination collision pipeline.
- bodies: list[str | int]#
Source bodies exposed as proxies in the destination entry.
String selectors use the full-label-regex semantics of
CouplerEntryCfg.bodies. Raw Newton body ids may be given directly as integers. The coupler resolves a copy at build time, preserving these declarations.
- mode: Literal['lagged', 'staggered']#
Proxy transfer mode passed to Newton’s coupled-proxy solver.
- mass_scale: float#
Scale applied to proxy body mass/inertia and particle mass in the destination view.
- proxy_relaxation: float#
Relaxation factor applied to proxy-feedback forces in lagged and staggered modes.
Fixed relaxation blends the new force estimate with the previous feedback. Setting this to
0from a fresh state preserves zero feedback while retaining source-to-destination proxy motion, which yields one-way coupling. Switching an ongoing run to zero instead preserves its existing feedback.
- proxy_relaxation_mode: Literal['fixed', 'aitken']#
Proxy-feedback relaxation mode.
- collide_interval: int | None#
Proxy-local collision refresh interval.
Nonerefreshes contacts on every proxy pass. Explicit values must be positive integers and requirecollision_pipelineto be a factory.
- collision_pipeline: NewtonCollisionPipelineCfg | Callable[[ModelView], CollisionPipeline | None] | None#
Configuration or factory for the proxy destination collision pipeline.
Setting the field or returning
Nonefrom the factory passes shared outer contacts to the destination.
- class isaaclab_contrib.coupling.CouplerProxyCfg[source]#
Bases:
CouplerCfgConfiguration for Newton’s lagged-impulse virtual-proxy coupling.
Newton’s proxy coupler currently supports at most two solver entries.
Attributes:
Solver class whose class methods build and drive Newton's solver, e.g.
class_type.build(cfg, model, mode).Solver type metadata (deprecated).
Ordered named sub-solver entries and their ownership selectors.
Entry whose shape pairs the outer collision pipeline collides, or
Nonefor the whole model.Directed proxy mappings between named solver entries.
Number of proxy relaxation passes per coupled step.
- class_type: type | str#
Solver class whose class methods build and drive Newton’s solver, e.g.
class_type.build(cfg, model, mode).
- solver_type: str#
Solver type metadata (deprecated).
Deprecated since version Solver: dispatch is driven by the configuration class; this field is retained as metadata for logging and debugging only. Do not branch on
solver_typein new code.
- entries: list[CouplerEntryCfg]#
Ordered named sub-solver entries and their ownership selectors.
- outer_contact_entry: str | None#
Entry whose shape pairs the outer collision pipeline collides, or
Nonefor the whole model.Restricting outer contacts to one entry lets another entry, e.g. a cable, run its own post-transfer pipeline.
- proxies: list[CouplerProxyMappingCfg]#
Directed proxy mappings between named solver entries.
- class isaaclab_contrib.coupling.CouplerAdmmCfg[source]#
Bases:
CouplerCfgConfiguration for Newton’s linearized ADMM coupling.
Attributes:
Solver class whose class methods build and drive Newton's solver, e.g.
class_type.build(cfg, model, mode).Solver type metadata (deprecated).
Ordered named sub-solver entries and their ownership selectors.
Entry whose shape pairs the outer collision pipeline collides, or
Nonefor the whole model.Internal ADMM triangle-pair capacity across all environments in one process.
Contact-reduction hash table size relative to the internal triangle-pair capacity.
Symmetric contact interfaces as
(entry_name, entry_name)pairs.Number of ADMM dual iterations per coupled step.
ADMM penalty parameter [dimensionless].
Proximal mass scaling parameter [dimensionless].
Position-error correction fraction [dimensionless].
Translational cross-solver joint stiffness [N/m].
Translational cross-solver joint damping [N*s/m].
Angular cross-solver joint stiffness [N*m/rad].
Angular cross-solver joint damping [N*m*s/rad].
Whether cross-solver joint neighbors remain visible as inertial proxies.
Optional entries that receive cross-solver joint proximal bodies.
Mass scale applied to cross-solver joint proximal bodies.
Frame-to-frame matching mode for collision-detected rigid contacts.
Maximum midpoint distance for matching rigid contacts [m].
Minimum normal dot product for matching rigid contacts.
Scale applied to the previous ADMM dual when a rigid contact matches.
- class_type: type | str#
Solver class whose class methods build and drive Newton’s solver, e.g.
class_type.build(cfg, model, mode).
- solver_type: str#
Solver type metadata (deprecated).
Deprecated since version Solver: dispatch is driven by the configuration class; this field is retained as metadata for logging and debugging only. Do not branch on
solver_typein new code.
- entries: list[CouplerEntryCfg]#
Ordered named sub-solver entries and their ownership selectors.
- outer_contact_entry: str | None#
Entry whose shape pairs the outer collision pipeline collides, or
Nonefor the whole model.Restricting outer contacts to one entry lets another entry, e.g. a cable, run its own post-transfer pipeline.
- contact_max_triangle_pairs: int | None#
Internal ADMM triangle-pair capacity across all environments in one process.
Noneuses Newton’s default. Must be less than2**20withrigid_contact_matchingset to"latest"or"sticky"; larger capacities require"disabled".
- contact_reduction_hashtable_size_factor: float | None#
Contact-reduction hash table size relative to the internal triangle-pair capacity.
Noneuses Newton’s default. Increase it for hash table fill or insertion warnings.
- contact_pairs: list[tuple[str, str]] | None#
Symmetric contact interfaces as
(entry_name, entry_name)pairs.Noneasks Newton to detect every distinct entry pair automatically. An empty list disables ADMM contact coupling.
- joint_proximal_bodies: bool#
Whether cross-solver joint neighbors remain visible as inertial proxies.
- joint_proximal_destination_entries: list[str] | None#
Optional entries that receive cross-solver joint proximal bodies.
- rigid_contact_matching: Literal['disabled', 'latest', 'sticky']#
Frame-to-frame matching mode for collision-detected rigid contacts.
- contact_matching_pos_threshold: float | None#
Maximum midpoint distance for matching rigid contacts [m].
Coupler Solver#
- class isaaclab_contrib.coupling.CouplerSolver[source]#
Bases:
NewtonSolverCouple named entries, each built from its own solver configuration on its model view.
Attributes:
Whether Newton contact sensors can read the solver's contacts.
Methods:
solver_classes(cfg)Newton solvers whose custom builder attributes, and USD schemas, the builder needs before import.
prepare_builder(cfg, builder)Prepare the shared builder once per distinct entry solver class.
build(cfg, model, mode[, env_template])Resolve entry ownership, build each entry's solver on its model view, and couple the entries.
build_coupled(cfg, model, entries, proxies, mode)Construct Newton's coupled solver from the built entries; tasks with a custom coupled solver override it.
supports_capture(cfg, solver)Whether the solver can be recorded into a CUDA graph.
uses_collision_pipeline(cfg, solver)Whether an entry that collides outside its proxies expects contacts from Newton's collision pipeline.
create_collision_pipeline(cfg, solver, **kwargs)Collide the whole model, or only
outer_contact_entry's shape pairs.reset(cfg, solver, state, world_mask)Reset every entry for masked worlds, promoting a selected single MPM world to the full-reset path.
check_step(cfg, solver, captured, debug)Raise asynchronous failures, and log diagnostics, of every entry's solver.
- contact_sensors: ClassVar[bool] = False#
Whether Newton contact sensors can read the solver’s contacts.
- classmethod solver_classes(cfg: CouplerCfg) tuple[type[newton.solvers.SolverBase], ...][source]#
Newton solvers whose custom builder attributes, and USD schemas, the builder needs before import.
- classmethod prepare_builder(cfg: CouplerCfg, builder: newton.ModelBuilder) None[source]#
Prepare the shared builder once per distinct entry solver class.
- classmethod build(cfg: CouplerCfg, model: newton.Model, mode: DeterministicMode, env_template: str | None = None) newton.solvers.experimental.coupled.SolverCoupled[source]#
Resolve entry ownership, build each entry’s solver on its model view, and couple the entries.
{ENV_REGEX_NS}in entry and proxy body selectors and shape patterns expands againstenv_template; the configuration stays unchanged.
- classmethod build_coupled(cfg: CouplerCfg, model: newton.Model, entries: list[newton.solvers.experimental.coupled.SolverCoupled.Entry], proxies: list[CouplerProxyMappingCfg], mode: DeterministicMode) newton.solvers.experimental.coupled.SolverCoupled[source]#
Construct Newton’s coupled solver from the built entries; tasks with a custom coupled solver override it.
A proxy configuration without proxies steps its entries independently: Newton’s proxy solver advances only connected proxy groups.
- classmethod supports_capture(cfg: CouplerCfg, solver: newton.solvers.experimental.coupled.SolverCoupled) bool[source]#
Whether the solver can be recorded into a CUDA graph.
- classmethod uses_collision_pipeline(cfg: CouplerCfg, solver: newton.solvers.experimental.coupled.SolverCoupled) bool[source]#
Whether an entry that collides outside its proxies expects contacts from Newton’s collision pipeline.
- classmethod create_collision_pipeline(cfg: CouplerCfg, solver: newton.solvers.experimental.coupled.SolverCoupled, **kwargs) newton.CollisionPipeline[source]#
Collide the whole model, or only
outer_contact_entry’s shape pairs.
- classmethod reset(cfg: CouplerCfg, solver: newton.solvers.experimental.coupled.SolverCoupled, state: newton.State, world_mask: array) None[source]#
Reset every entry for masked worlds, promoting a selected single MPM world to the full-reset path.