Skip to content

Simplify Newton coupler proxy resolution and solver-config forwarding - #5

Merged
mmichelis merged 7 commits into
mym/coupledsolverfrom
mym/coupledsolver-resolve
Jul 14, 2026
Merged

mmichelis merged 7 commits into
mym/coupledsolverfrom
mym/coupledsolver-resolve

Conversation

@mmichelis

@mmichelis mmichelis commented Jul 13, 2026 •

Copy link
Copy Markdown
Owner

Description

This PR simplifies the Newton coupler's proxy and ADMM configuration handling on top of the NewtonCouplerManager rename. It reduces the coupler surface, removes a redundant per-proxy override path, and reuses existing helpers so the config-to-Newton translation is smaller and clearer.

Proxy configuration

  • CouplerProxyMappingCfg now accepts raw Newton body ids directly, alongside the existing scene-entity and label-regex selectors.
  • Proxy selectors are resolved in place instead of through a separate _ResolvedProxy dataclass, so the resolved config is forwarded straight to Newton's SolverCoupledProxy.Proxy via its own fields.
  • Proxy resolution is idempotent: re-resolving an already-resolved (integer) selector yields the same body ids.

ADMM configuration

  • ADMM forwarding reuses the existing _filter_solver_kwargs helper to populate SolverCoupledADMM.Config from exactly the fields it declares, instead of diffing parent and child dataclass fields.
  • The proxy build path is aligned to the same forwarding style for consistency.

Selector resolution

  • Entity-to-body resolution is consolidated into a single order-preserving, deduplicating _resolve_entities_to_body_ids helper shared by entries and proxies.

Breaking change

  • The per-proxy shape-material overrides (shape_material_ke/kd/mu, shape_margin, shape_gap) and the _apply_proxy_shape_overrides pass are removed.
  • Migration: set per-shape contact materials through the per-asset material system (NewtonMaterialCfg) and the model-global NewtonShapeCfg defaults instead of the coupler-specific override.

Tests and changelog

  • The pure-Python coupler tests are updated to cover raw body-id selectors, idempotent in-place proxy resolution, and the simplified ADMM and proxy forwarding.
  • The isaaclab_contrib changelog fragment is refreshed to reflect the removed fields.

Type of change

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

Screenshots

Not applicable; this change affects coupler configuration and logic with no visual output.

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 a changelog fragment under source/<pkg>/changelog.d/ for every touched package (do not edit CHANGELOG.rst or bump extension.toml — CI handles that)
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

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

lgtm

@maxkra15 maxkra15 mentioned this pull request Jul 13, 2026
9 of 11 tasks
@mmichelis
mmichelis merged commit f7d1ccb into mym/coupledsolver Jul 14, 2026
9 of 13 checks passed
@mmichelis
mmichelis deleted the mym/coupledsolver-resolve branch July 14, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants