Skip to content

Report OVPhysX total contact forces from normal and friction components - #8166

Closed
ooctipus wants to merge 1 commit into
isaac-sim:developfrom
ooctipus:fix/ovphysx-total-contact-forces
Closed

ooctipus wants to merge 1 commit into
isaac-sim:developfrom
ooctipus:fix/ovphysx-total-contact-forces

Conversation

@ooctipus

Copy link
Copy Markdown
Collaborator

Description

Report total contact forces from OVPhysX as normal + friction, instead of returning normal forces with a warning.

  • Read native aggregate friction and filtered friction matrices directly. Remove IsaacLab's reduction of capacity-limited friction anchors.
  • Include friction in total forces even with track_friction_forces=False. That option controls the separate friction outputs, not the total.
  • Preserve force histories, selective reset, contact-loss reporting, and normal-force-based air/contact timing.

For normal-only measurements, use net_normal_forces_w or normal_force_matrix_w. friction_forces_w now follows its aggregate contract; use friction_force_matrix_w for filtered friction. Isaac Sim/Kit PhysX is unchanged.

Dependency / draft status

Validated against a locally built OVPhysX with the new normal/friction contact reads. That branch also replaces wait_op() with wait_task(); this PR updates IsaacLab's three completion calls and their existing tests.

Do not merge until a released OVPhysX wheel provides these APIs and the dependency pin is updated. The current ovphysx==0.6.3 pin and lockfile are intentionally unchanged, so the normal OVPhysX CI environment cannot validate this draft yet. No compatibility fallback or private binary dependency is added.

Validation

Local Release native build, integrated into an isolated IsaacLab uv environment; GPU tests used GPU 0.

IsaacLab checks Result
Contact sensor, CPU 21 passed
Contact sensor, CUDA 17 passed
Contact-position kernels, CPU/CUDA 8 passed
Backend lifecycle and scene-data tests 49 passed

The existing friction test now checks total force against mass * (velocity_after - velocity_before) / dt - mass * gravity. It covers two timesteps, filtered/unfiltered sensing, zero detailed-contact capacity, filters excluding the contacting partner, disabled separate friction tracking, histories, partial reset, and contact loss.

Negative control: omitting friction from total force fails that check by 6.38 N; restoring composition passes. Removed kernel-test variants for the deleted friction-anchor reduction; retained position ordering, truncation, and masking coverage. No new test file or production class.

Reproduction after installing the local OVPhysX wheel into the uv environment (--no-sync preserves that local dependency):

CUDA_VISIBLE_DEVICES=0 uv run --no-sync python -m pytest source/isaaclab_ov/test/sensors/test_contact_sensor.py -q -k cpu
CUDA_VISIBLE_DEVICES=0 uv run --no-sync python -m pytest source/isaaclab_ov/test/sensors/test_contact_sensor.py -q -k cuda

Type of change

  • Bug fix
  • Documentation update

Checklist

  • Read the contribution guidelines
  • Ran uv run --no-sync isaaclab -f and git diff --check
  • Updated documentation and package changelog fragments
  • Extended existing tests and verified the regression fails without composition
  • Contributor already listed in CONTRIBUTORS.md
  • Released OVPhysX dependency available and CI validated

The native contact-binding API emits a deprecation warning in this development build. Documentation builds are left to CI.

@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Sep 29, 2026
@ooctipus ooctipus self-assigned this Sep 30, 2026
@kellyguo11 kellyguo11 moved this to In review in Isaac Lab Sep 30, 2026
@ooctipus ooctipus closed this Oct 9, 2026
ooctipus added a commit that referenced this pull request Oct 9, 2026
…s 0.6.4) (#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 #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]>
@ooctipus
ooctipus deleted the fix/ovphysx-total-contact-forces branch October 14, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant