Repository navigation
Conversation
Signed-off-by: Elle Miller <[email protected]>
Signed-off-by: Elle Miller <[email protected]>
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Style consistency (2), Test quality (2). Other reviewed categories look good.
- PR description: The title matches the allocation fix and supplied reproduction; correct Testing’s claim that the hydroelastic test has nondeterministic parametrization, and shorten the repeated field-loss explanation while preserving the reproduction and template sections.
- Design and architecture: Architecture looks good.
- Scope and over-engineering: No over-engineering issues.
- API: API changes look good.
- Compatibility and deprecation: No breaking changes identified.
- Implementation: Implementation looks good.
- Style consistency: The new hydroelastic test lacks required signature annotations; annotate device as str and add -> None.
- Test quality: The new mock rows fail on the baseline because model=None cannot supply contact attributes, not because stiffness is lost; remove those rows and retain the real hydroelastic regression.
Minor fixes needed. Posted 4 inline findings.
Automated review; human maintainers own approval decisions.
| """Contact allocation can rebuild the pipeline but must leave solver output allocation to its caller.""" | ||
| @pytest.mark.parametrize( | ||
| "deterministic_mode", | ||
| [wp.DeterministicMode.GPU_TO_GPU, wp.DeterministicMode.NOT_GUARANTEED], |
There was a problem hiding this comment.
🟡 Warning · Test Quality — Remove nondeterministic mock rows
These rows fail before the fix because model=None cannot supply requested contact attributes to bare Contacts, not because properties are lost. The hydroelastic test owns that regression; retain the existing deterministic rows.
| assert observable_requests == [] | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("device", test_devices(DeviceScope.CUDA)) |
There was a problem hiding this comment.
🟡 Warning · Test Quality — Mark the regression kitless
This test runs without Isaac Sim, but the file has no kitless marker, so text-based kitless CI selection misses it. Add pytest.mark.kitless directly to the test.
|
|
||
|
|
||
| @pytest.mark.parametrize("device", test_devices(DeviceScope.CUDA)) | ||
| def test_hydroelastic_contacts_keep_per_contact_stiffness_when_nconmax_grows(device): |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Annotate the new test
The new function omits parameter and return annotations required by the contribution guide. Annotate device as str and add -> None.
| assert backend.contacts.rigid_contact_max == 12000 | ||
| assert backend.contacts.per_contact_shape_properties is True | ||
| assert backend.contacts.rigid_contact_stiffness is not None | ||
| nc = int(backend.contacts.rigid_contact_count.numpy()[0]) |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Name the contact count
The new nc abbreviation obscures the measured contact count and conflicts with the guide’s descriptive-name rule. Rename it contact_count.
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryThe PR rebuilds
No new actionable issues were found in the changes since the previous review. Tests were not run during this review. Reviews (2) · Last reviewed commit: "Build hydroelastic test SDFs on the para..." · Reviewed by Greptile |
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Style consistency (2), Test quality (1). Other reviewed categories look good.
- PR description: Testing incorrectly claims hydroelastic determinism parametrization; name only the capacity test, condense repeated branch and #7783 explanations, and retain the reproduction and reported validation.
- Design and architecture: Architecture looks good.
- Scope and over-engineering: No over-engineering issues.
- API: API changes look good.
- Compatibility and deprecation: No breaking changes identified.
- Implementation: Implementation looks good.
- Style consistency: Both changed test signatures lack guide-required parameter and return annotations; add concrete types and -> None.
- Test quality: The standalone hydroelastic regression lacks pytest.mark.kitless, excluding it from marker-based kitless CI; add the marker while retaining distinct physical and allocation-contract coverage.
Minor fixes needed. Posted 3 inline findings.
Automated review; human maintainers own approval decisions.
| assert observable_requests == [] | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("device", test_devices(DeviceScope.CUDA)) |
There was a problem hiding this comment.
🟡 Warning · Test Quality — Mark the regression kitless
This standalone Newton test needs no Isaac Sim, but the file lacks a kitless marker and marker-based CI will not select it. Mark the new test pytest.mark.kitless.
|
|
||
|
|
||
| @pytest.mark.parametrize("device", test_devices(DeviceScope.CUDA)) | ||
| def test_hydroelastic_contacts_keep_per_contact_stiffness_when_nconmax_grows(device): |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Annotate changed test signatures
Both changed test functions omit parameter and return annotations required by the contribution guide. Add concrete parameter types and -> None.
|
|
||
| @pytest.mark.parametrize("device", test_devices(DeviceScope.CUDA)) | ||
| def test_hydroelastic_contacts_keep_per_contact_stiffness_when_nconmax_grows(device): | ||
| """Hydroelastic SDF contacts must retain per-contact stiffness arrays when nconmax exceeds auto-estimate.""" |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Remove redundant test docstring
The docstring repeats the test name and assertions without explaining a constraint. Remove it rather than maintain a second description of the same contract.
Signed-off-by: Elle Miller <[email protected]>
|
run-ci |
Signed-off-by: Elle Miller <[email protected]>
Description
TL;DR: When a simulation needs more contacts than Newton estimates by default, Isaac Lab allocates a new contact buffer without enabling per-contact stiffness. Newton still generates hydroelastic contact points across the iso-surface, but discards every triangle's pressure-derived stiffness, so MuJoCo Warp silently falls back to uniform rigid contact parameters across the whole link instead of using the hydroelastic pressure law.
In
NewtonBackend._allocate_contacts(), whenrequired > self.contacts.rigid_contact_maxin non-deterministic mode, Isaac Lab constructs a bareContacts(...)instead of rebuildingCollisionPipelineand callingself.collision_pipeline.contacts(). Doing so silently drops pipeline-configured state—includingper_contact_shape_properties=True(rigid_contact_stiffness,rigid_contact_damping,rigid_contact_friction),contact_matchingand its implicit sort buffers (related to #7783),contact_report, soft-contact buffers, andCONTACTcustom attributes.This PR removes the bare
Contacts(...)fallback soCollisionPipelineis rebuilt withrigid_contact_max=requiredandself.collision_pipeline.contacts()is used in both determinism modes.Fixes # (issue)
Related to #7783.
Type of change
Reproduction
Dropping a hydroelastic box (
kh = 5e5vs5e7) onto a hydroelastic ground plane (kh = 1e9) withMJWarpSolverCfg(use_mujoco_contacts=False, nconmax=12000)in default non-deterministic mode:Standalone reproduction script (kit-less)
Before:
After:
Testing
pytest source/isaaclab_newton/test/physics/test_newton_manager.py --noconftest -q: 64 passed (includingtest_deterministic_collision_pipeline_grows_with_the_solver_contact_capacityand the newtest_hydroelastic_contacts_keep_per_contact_stiffness_when_nconmax_grows)isaaclab --format(allpre-commithooks:ruff,ruff-format,codespell, license header, RST, changelog fragment): passedpython tools/changelog/cli.py check main --include-worktree: passedChecklist
Docker and GPU tests run on demand. Push the commits you want tested, then
comment
run-cion the pull request.pre-commitchecks withuv run isaaclab --formatsource/<pkg>/changelog.d/for every touched package (do not editCHANGELOG.rstor bump package versions — CI handles that)CONTRIBUTORS.mdor my name already exists there