Add internal ADMM collision capacity controls - #7912
rebeccazhang0707 wants to merge 1 commit into
Conversation
|
| capacity = solver_cfg.contact_max_triangle_pairs | ||
| if capacity is not None and (type(capacity) is not int or capacity <= 0): | ||
| raise ValueError("CouplerAdmmCfg.contact_max_triangle_pairs must be a positive integer or None.") |
There was a problem hiding this comment.
When rigid contact matching is enabled, contact_max_triangle_pairs values at or above 2**20 pass this positive-only validation and are forwarded to the rebuilt pipeline. Newton 1.6 requires the capacity to remain below that limit for deterministic contact packing, so this configuration can fail during solver construction or stepping instead of being rejected here. Please validate the matching-dependent upper bound along with the existing positivity check.
There was a problem hiding this comment.
Isaac Lab Review Bot
Adds opt-in ADMM collision-capacity controls with validation, documentation, changelog coverage, and runtime tests. One documented backend constraint is not enforced before constructing the replacement pipeline.
- Design and architecture: Rebuilding Newton 1.6's private ADMM collision pipeline before stepping and graph capture is a proportionate adapter while no public capacity hook exists, though it intentionally couples the implementation to pinned private attributes.
- API: The new fields default to None and preserve the existing API path, but contact_max_triangle_pairs accepts values at or above 2**20 even when rigid contact matching is enabled, despite the public documentation stating that this combination is unsupported.
- Implementation: The rebuild refreshes the solver's internal contacts and carries forward filters, output capacities, and matching settings. Add conditional validation rejecting triangle-pair capacities at or above 2**20 when rigid contact matching is enabled, while retaining larger capacities for matching-disabled configurations.
Minor fixes needed. Posted 1 actionable finding inline.
Automated review; human maintainers own approval decisions.
|
|
||
| if isinstance(solver_cfg, CouplerAdmmCfg): | ||
| capacity = solver_cfg.contact_max_triangle_pairs | ||
| if capacity is not None and (type(capacity) is not int or capacity <= 0): |
There was a problem hiding this comment.
🔵 Suggestion · Api — Matching triangle-pair limit is unenforced
The new field documentation states Newton 1.6 requires the triangle-pair capacity to stay below 2**20 when rigid contact matching is enabled, but _validate_config accepts any positive integer. A configuration that this package documents as unsupported passes validation and is forwarded to the rebuilt pipeline. Consider rejecting capacities at or above that limit when rigid_contact_matching is enabled, while allowing larger values otherwise.
Description
Dense cross-solver contacts can exhaust ADMM's internal triangle-pair and contact-reduction buffers even when the outer Newton collision pipeline has sufficient capacity. Expose
CouplerAdmmCfg.contact_max_triangle_pairsandcontact_reduction_hashtable_size_factorso tasks can size those internal buffers independently. Both default toNone, preserving existing allocations.Validate the supplied capacities and rebuild the pinned Newton 1.6 internal pipeline before stepping, preserving pair filters, output capacities, and contact matching. This adapter uses Newton's private internal pipeline because the current ADMM constructor has no capacity hook. Document the matching-enabled triangle-pair limit and how to grow the hashtable independently.
Extracted the general interface from the shoelace task branch; environment-count scaling and task/training changes remain outside this PR. No new dependencies.
Validation
uv run --extra test python -m pytest -q source/isaaclab_contrib/test/coupling/test_coupler.py source/isaaclab_contrib/test/coupling/test_coupler_runtime.py— 66 passed with Newton 1.6.0. CPU runtime coverage constructs, resets, and steps real proxy/ADMM solvers, including mesh contact, resized buffers, and preserved contact matching.developand pass with this change.uv run --isolated --extra dev -- make -C docs current-docs— warning-free build.uv run isaaclab -fand the changelog gate — passed.ISAACLAB_CHANGELOG_BASE_REF=upstream-develop-pr-basepoints the local hook at the fetched upstreamdevelopbase instead of the fork's olderorigin/develop.Type of change
Release backport
developChecklist
uv run isaaclab -f.CONTRIBUTORS.md.