Skip to content

[Backport] PR #8422 to release/3.0.0 - #8452

Merged
kellyguo11 merged 2 commits into
isaac-sim:release/3.0.0from
kellyguo11:codex/backport-8422-release-3.0.0
Oct 10, 2026
Merged

kellyguo11 merged 2 commits into
isaac-sim:release/3.0.0from
kellyguo11:codex/backport-8422-release-3.0.0

Conversation

@kellyguo11

Copy link
Copy Markdown
Contributor

Description

Backports #8422 to release/3.0.0.

OVPhysX contact sensors now report separate normal and friction components plus their total, including filtered forces and histories. The backport preserves normal-based contact timing, selective resets, contact loss handling, and the documented friction_forces_w aggregate shape.

Depends on #8441, which upgrades the release branch to OVPhysX 0.6.4.72118723 and OVStage 0.2.1.385922. Keep this PR in draft until #8441 merges and CI is rerun against those required APIs.

The source commit cherry-picked without conflicts. The only intentional release-specific range difference is retaining the release-line benchmark command ./isaaclab.sh -p; release/3.0.0 has not adopted the develop-line uv run CLI migration.

Type of change

  • Bug fix
  • Behavior change to the friction_forces_w alias
  • Documentation update

Release backport

  • Not applicable: this PR targets release/3.0.0 directly.

Screenshots

Not applicable.

Validation

  • ISAACLAB_CHANGELOG_BASE_REF=changelog-validation-backport-8422 uvx pre-commit run --all-files — passed every hook, including changelog validation against the current upstream release tip; the temporary validation ref was removed afterward.
  • git diff --check upstream/release/3.0.0...HEAD — passed.
  • git range-diff against source commit bad20159e — matched except for the intentional release-line benchmark invocation described above.
  • pytest source/isaaclab_ov/test/sensors/test_contact_sensor_kernels.py -q — collected successfully; both CUDA-scoped cases skipped because the local macOS host has no CUDA.
  • Full OVPhysX simulation coverage is pending CI after [Backport] PRs #8350 and #8443 to release/3.0.0 #8441 merges. The release lockfile excludes macOS and OVPhysX is unavailable on this host.

Checklist

  • I have read and understood the contribution guidelines.
  • I have run the pre-commit checks.
  • I have made corresponding documentation changes.
  • My changes generate no new static-check warnings.
  • I reviewed the focused regression coverage against the test-audit criteria.
  • I retained changelog fragments for both touched source packages.
  • Contributor names already exist in CONTRIBUTORS.md.

…s 0.6.4) (isaac-sim#8422)

# Description

> **DRAFT: UPDATE DEPENDENCY PINS BEFORE MERGE**
>
> OVPhysX 0.6.4.72118723 is now public and requires OVStage
0.2.1.385922. Keep this PR in draft until the IsaacLab pins and lockfile
are updated and CI passes. This PR still leaves the existing pins
unchanged.

OVPhysX contact sensors currently expose normal-only force totals and
reject aggregate friction reads. Use the separate normal/friction APIs
available in OVPhysX 0.6.4 to report both components and their sum,
including filtered forces and histories.

Aggregate friction works without filters or detailed-contact capacity.
Total forces include friction even when separate friction tracking is
disabled. Preserve normal-based contact timing and handle selective
resets and contact loss. The `friction_forces_w` alias now returns
aggregate vectors `(E, S, 3)`; use `friction_force_matrix_w` for
filtered `(E, S, F, 3)` data. Update the documentation and regression
coverage.

## Maintainer follow-up

This PR supersedes isaac-sim#8166. Commit `9529486` consolidates force-history
loops and test parameter combinations, and folds an excluded-filter
check into the existing friction test. The repository formatter,
changelog gate, and CPU Warp checks passed. Full simulation tests could
not run locally because the NVIDIA driver fails CUDA initialization
before sensor setup.

## Validation

Validated commit `273f128f` with an OVPhysX 0.6.4 candidate and OVStage
`0.2.1.385922`. Repository dependency pins remain unchanged.

- OV backend suite: **540 passed, 19 skipped, 2 xfailed**.
- Shared contract tests: **838 passed, 16 skipped, 5 xfailed**; one
additional Kit-only module could not collect without Kit.
- Task smoke coverage: **48/48 registered explicit OVPhysX task
presets**, each with two environments and 20 steps, plus four
single-environment repeats. Three additional Kuka configuration checks
passed.
- Training smoke: 20 single-GPU iterations and 10 distributed iterations
across two GPUs, with 256 environments per GPU. Both distributed ranks
completed every policy update with finite rewards/losses/parameters and
nonzero friction contributions. This checks execution, not convergence.
- Contact-buffer scale: **1,024/1,024 and 4,096/4,096 sensors in
contact**, each after 100 warmup and 100 measured steps.
- CPU/CUDA force-balance and outside-filter probes passed, along with
all three friction cases on logical `cuda:1`.
- Repository formatting and clean documentation build passed.
- Kitless golden rendering, both stage variants: **30 passed, 25 failed,
18 skipped**. Every failed case also failed on unchanged base
`07daf4426` with both candidate and original locked dependencies. These
are baseline failures; this rendering sweep is not fully green. No
tolerances were changed.

Current CI has **55 failed test executions** from missing new contact
APIs with the unchanged OVPhysX `0.6.3` pin. The candidate-runtime
results above are separate from public pinned-package CI. Rerun CI with
the published, coordinated dependencies before marking this ready for
review; candidate ARM execution remains unverified.

## Type of change

- Bug fix
- Behavior change to the `friction_forces_w` alias
- Documentation update

## Release backport

- [ ] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

## Checklist

- [x] Read the contribution guidelines
- [x] Ran `uv run --no-sync isaaclab --format`
- [x] Updated the documentation
- [x] Added focused regression coverage and applied the test-audit
criteria
- [x] Added changelog fragments for the touched packages
- [x] Contributor name is already in `CONTRIBUTORS.md`
- [ ] OVPhysX 0.6.4 is publicly available and the matching dependency
pins/lockfile are updated
- [ ] CI passes with the updated dependencies

---------

Co-authored-by: marcodiiga <[email protected]>
Co-authored-by: Octi Zhang <[email protected]>
(cherry picked from commit bad2015)
@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Oct 10, 2026
@kellyguo11
kellyguo11 marked this pull request as ready for review October 10, 2026 03:41
@kellyguo11
kellyguo11 requested a review from a team October 10, 2026 03:41
@kellyguo11

Copy link
Copy Markdown
Contributor 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 10, 2026
@greptile-apps

greptile-apps Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium impact] Contact sensor friction force reporting fixes for OVPhysX backend.

No new blocking defect was found; the two test gaps are non-blocking.

Findings

  1. P2 CPU kernel checks disappear ▶
  2. P2 Filtered friction goes unchecked ▶

Summary

Backports OVPhysX contact sensors that report normal, friction, and total forces, including filtered values and histories.

  • OVPhysX contact sensors report total forces with friction included.

kellyguo11 explicitly acknowledges that the required OVPhysX upgrade is pending #8441 and that this PR must remain draft until it merges and CI is rerun. The retained ./isaaclab.sh -p benchmark command is intentional for the release branch.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[OVPhysX contact binding] --> N[Normal forces]
  A --> F[Friction forces]
  N --> T[Total forces]
  F --> T
  N --> H[Current values and histories]
  T --> H
  F --> O{Separate friction tracking enabled?}
  O -->|Yes| H
  N --> C[Contact and air timing]
Loading

Reviews (1) · Last reviewed commit: "[OVPhysX] Report aggregate friction and ..." · Reviewed by Greptile

references.append(expected)
mask = wp.array([True, False, True], dtype=wp.bool, device=device) if use_mask else None

@pytest.mark.parametrize("device", test_devices(DeviceScope.CUDA))

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.

P2 CPU kernel checks disappear

The rewritten test excludes CPU even though unpack_contact_buffer_data still supports it and previously ran there. On hosts without CUDA, every case now skips, leaving ordering, masks, and truncated contacts unchecked locally. Use test_devices() to retain CPU coverage.

Suggested change
@pytest.mark.parametrize("device", test_devices(DeviceScope.CUDA))
@pytest.mark.parametrize("device", test_devices())

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines +890 to +892
track_friction_forces=False,
max_contact_data_count_per_prim=0,
filter_prim_paths_expr=[scene_cfg.shape.prim_path],

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.

P2 Filtered friction goes unchecked

The new total_sensor disables separate friction tracking but filters out the only contacting object, so its force_matrix_w is always zero. A mistake that returns only normal forces with track_friction_forces=False would still pass. Add a sensor with friction tracking disabled whose filter includes the ground, then compare its filtered totals and histories with the tracked sensor.

@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: Compatibility and deprecation (1), Style consistency (1). Other reviewed categories look good.

  • PR description: Body matches the diff but understates the alias rank change; add baseline/candidate measurements with revisions, command, hardware, OVPhysX version, environment count, warmup, and per-step latency for the doubled native reads.
  • Design and architecture: Architecture looks good.
  • Scope and over-engineering: No over-engineering issues.
  • API: API changes look good.
  • Compatibility and deprecation: Breaking changes: OVPhysX friction_forces_w changes from (E,S,F,3) to (E,S,3) without deprecation; keep the warned fallback functional, add removal guidance and transition coverage, then switch later.
  • Implementation: Implementation looks good.
  • Style consistency: The added total_sensor field lacks the purpose and default docstring used by adjacent scene fields; add a matching one-line field docstring.
  • Test quality: Test quality looks good.

Significant concerns. Posted 2 inline findings.

Automated review; human maintainers own approval decisions.

return self._net_friction_forces_w_history_ta

@property
def friction_forces_w(self) -> ProxyArray | None:

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.

🟡 Warning · Compatibility — friction_forces_w alias changes shape silently

On OVPhysX this alias previously returned the (E,S,F,3) filtered matrix with a warning; it now returns (E,S,3), so existing indexing misreads data silently. Keep the warned fallback through a deprecation cycle.

This is a second contact sensor used for testing contact filtering.
"""

total_sensor: ContactSensorCfg = None

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.

🟡 Warning · Style Consistency — Scene config field lacks docstring

Sibling fields shape_2 and contact_sensor_2 document their purpose and None default; total_sensor has neither, leaving its role in the friction test unexplained. Add a matching one-line docstring.

@kellyguo11

Copy link
Copy Markdown
Contributor 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 10, 2026
@kellyguo11
kellyguo11 merged commit 5c517eb into isaac-sim:release/3.0.0 Oct 10, 2026
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants