Skip to content

[PhysX/OVPhysX] Preserve compliant contacts during randomization and cloning - #8464

Merged
StafaH merged 3 commits into
isaac-sim:developfrom
StafaH:fix/split-8379-materials
Oct 12, 2026
Merged

StafaH merged 3 commits into
isaac-sim:developfrom
StafaH:fix/split-8379-materials

Conversation

@StafaH

@StafaH StafaH commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Material randomization overwrote compliant-contact stiffness encoded in negative restitution, and native OVPhysX clones lost acceleration-spring behavior. Preserve stiffness during PhysX/OVPhysX material randomization and import scenes through USD when an acceleration-spring material has positive compliant-contact stiffness. The fallback now logs a warning naming the triggering material. The fallback trades native-cloning startup savings for correct contact behavior.

Split from #8379. This PR targets develop independently and includes the corresponding material and cloning regression coverage.

Validation

  • uv run --no-sync python -m pytest source/isaaclab_ov/test/test_randomize_rigid_body_material_mdp.py: 2 passed on the original split (material randomization is unchanged in this follow-up).
  • uv run --no-sync python -m pytest source/isaaclab_ov/test/assets/test_rigid_object.py -k heterogeneous_clone: 7 passed.
  • uv run --no-sync isaaclab -f: passed, including changelog checks.
  • Native PhysX material-selection test attempted with the isaacsim extra; Isaac Sim stopped at an EULA prompt before test collection. That test remains to be validated in CI.

Type of change

  • Bug fix

Release backport

  • Backport this pull request to the active release branch after it merges into develop.

Checklist

  • Read the contribution guidelines.
  • Ran formatting and lint checks.
  • Kept regression tests with the corresponding fixes.
  • Included package changelog fragments.
  • Author already appears in CONTRIBUTORS.md.

CI follow-up

The failed visualizer job on the previous head hit the known PhysX ANYmal-D Kit tiled golden mismatch (13.43% versus the 12% limit). Rebased onto a48bd07c1, which includes #8470's targeted golden refresh after the warmup change; comparison thresholds remain unchanged. Requested a fresh Docker CI run on 19ee4f488.

Ordinary imports are at module scope; inline imports are retained where required by optional dependencies or deferred runtime loading.

@greptile-apps

greptile-apps Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issue was found.

Summary

The PR preserves compliant-contact stiffness during PhysX and OVPhysX material randomization. OVPhysX scenes with acceleration-spring materials use USD import instead of native cloning.

  • Material randomization keeps compliant-contact stiffness intact.
  • OVPhysX clones keep acceleration-spring contacts through USD import.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Randomize selected materials] --> B{Existing restitution is negative?}
    B -->|Yes| C[Keep stiffness and randomize friction]
    B -->|No| D[Apply sampled friction and restitution]
    E[Prepare OVPhysX clones] --> F{Acceleration spring with positive stiffness?}
    F -->|Yes| G[Import all copies through USD]
    F -->|No| H[Keep existing cloning choice]
Loading

Reviews (1) · Last reviewed commit: "Preserve compliant contacts during rando..." · Reviewed by Greptile

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isaac Lab Review Bot

Needs attention: Implementation (1), Style consistency (1). Other reviewed categories look good.

  • PR description: The body matches the ten-file diff; replace pass-count labels with exact pytest commands and state that positive-stiffness acceleration-spring materials trigger full-stage import.
  • 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: The full-stage acceleration-spring fallback silently removes native-cloning startup savings; emit logger.warning and document the condition in _serialize_stage.
  • Style consistency: The compliant material row is labeled as a cloning mode, obscuring the matrix and invalidating its docstring; separate or rename the axis and update the description.
  • Test quality: Test quality looks good.

Minor fixes needed. Posted 2 inline findings.

Automated review; human maintainers own approval decisions.

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

thanks mustafa!

@ooctipus

Copy link
Copy Markdown
Collaborator

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Oct 12, 2026
@StafaH
StafaH force-pushed the fix/split-8379-materials branch from b7b006a to 19ee4f4 Compare October 12, 2026 18:31
@StafaH

StafaH commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Oct 12, 2026
@StafaH

StafaH commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator Author

Please backport this PR to the active release branch after it merges into develop.

@StafaH
StafaH merged commit 171b0eb into isaac-sim:develop Oct 12, 2026
59 checks passed
@ooctipus
ooctipus deleted the fix/split-8379-materials branch October 12, 2026 19:08
StafaH added a commit that referenced this pull request Oct 12, 2026
#8495)

## Description

Backport the remaining simulation and training fixes from #8464 and
#8465 to `release/3.0.0`, completing the release coverage for the three
PRs split from #8379. This replaces the conflict-resolution drafts #8490
and #8491.

#8463 is already present in the release branch as
`78a297879f7a1edbfd32959ea4fcab8e967c8152`; replaying its merged commit
is empty. Its Newton HDR background and lens-distortion changes are
inherited from the base and are not duplicated here.

- Preserve compliant-contact stiffness during PhysX/OVPhysX material
randomization and use full-stage USD import for positive-stiffness
acceleration-spring materials, with a warning about the startup cost.
- Add training-only `--resume_optimizer_state` /
`--no-resume_optimizer_state`, preserving checkpoint models, iteration,
and RND state while allowing a fresh policy optimizer.
- Expose task discovery for direct workers and preserve literal
overrides following named preset selections.

## Conflict resolution

Kept the release branch's logging and test organization. Adapted
compliant-contact coverage into its existing
`test_heterogeneous_clone_contacts` and retained its scene helper and
ordinary settling duration. Used the source PR's focused CPU/GPU
scenario selection. Did not import the unrelated develop-only
indexed-state test consolidation or logging changes.

Source commits: `171b0ebe03b728997a09c016b37eb49ab074e81a` (#8464) and
`43100989af845462ac7036a256c01bcc8b84fe4a` (#8465). Release base:
`6ea915c13`.

## Validation

- Existing RSL-RL runner, dispatch, parser, and import checks: 14
passed.
- Hydra suite: 67 passed.
- Installed CLI workflow suite: 34 passed.
- OVPhysX material randomization: CPU and GPU passed in separate
processes (2 cases).
- Heterogeneous clone contacts: CPU and GPU passed in separate processes
(6 cases). Removing the cloning fallback makes the compliant GPU case
fail its clone-height comparison; the backport passes.
- Formatting/lint and changelog checks passed against the release base.
The release checker requires an `origin/` ref, so validation used a
temporary base alias that was removed afterward.
- Camera-output contract suite (including the existing #8463 backport):
18 passed.
- `uv run --isolated --extra dev -- make -C docs current-docs`: passed
with warnings treated as errors.
- Native PhysX integration tests will be covered by requested CI; they
were not run locally for this backport.

## Checklist

- [x] Followed contribution guidelines and kept existing tests with
their fixes.
- [x] Included the original package changelog fragments.
- [x] Preserved ordinary imports at module scope and justified
optional/runtime imports.
- [x] Author already appears in `CONTRIBUTORS.md`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants