Skip to content

remove PhysicsManager.binding_init_event - #9333

Open
r-schmitt wants to merge 4 commits into
isaac-sim:mainfrom
r-schmitt:dev/rschmitt/early_joint_wrench_binding
Open

r-schmitt wants to merge 4 commits into
isaac-sim:mainfrom
r-schmitt:dev/rschmitt/early_joint_wrench_binding

Conversation

@r-schmitt

@r-schmitt r-schmitt commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Reduce shared OVStage startup work for Isaac-Reorient-Cube-Shadow-Camera-Direct by resolving joint-wrench bindings through explicit articulation paths from the clone plan.

Remove the separate binding-readiness event and prepare native physics consumers directly during OVPhysX runtime initialization. Assets, contact sensors, and joint-wrench sensors initialize after native cloning and warmup, before deferred render copies and public PHYSICS_READY callbacks.

  • Remove PhysicsManager.binding_init_event, SensorBase.initialize_event, and the OVPhysX binding event.
  • Keep PHYSICS_READY as the public readiness event, preserving existing callback priorities and owned-stage initialization order.
  • Track consumers through weak references, honor callback deregistration, and retain idempotent initialization.
  • Prepare late-created consumers on subsequent non-soft resets and reinitialize consumers after runtime rebuilds.
  • Complete and seal deferred render copies before public readiness callbacks can write stage data.
  • Use the upstream public expand_env_pattern helper for joint-wrench path resolution.

Validation

  • 73 focused tests passed on current main with OVPhysX 0.8.1, covering lifecycle handling, joint-wrench/contact sensors, rigid-object collections, and deformables.
  • Verified shared-stage consumers initialize before public callbacks, including callbacks at priority −1000.
  • Verified late-created consumers, runtime rebuilds, and soft-reset behavior.
  • Seeded shared-main versus PR captures produced bitwise-identical RGB, policy observations, and wrench values.
  • Formatting, lint, changelog checks, and git diff --check passed.

Local legacy / main / PR comparison

Main revision: 467b3457
PR revision: 47049eac

All three arms used the same machine and library versions:

  • AMD Ryzen Threadripper PRO 3975WX
  • RTX PRO 6000 Blackwell Workstation Edition, driver 615.71.09
  • OVPhysX 0.8.1.45833638316
  • OVRTX 0.7.0.1794596436
  • OVStage 0.4.0.1794520352

Workload: Isaac-Reorient-Cube-Shadow-Camera-Direct at 1,225 environments, 64×64 RGB cameras, 50 warmup steps, and 100 measured simulation steps.

Each arm received one excluded application warmup, followed by three unprofiled repetitions in balanced order. Application caches were retained.

Measurement Legacy on main Shared OVStage on main Shared OVStage with PR
Startup KPI — median 17.172 s 17.713 s 17.485 s
Startup KPI — mean 17.155 s 17.832 s 17.509 s
Initial reset-return observation — median 21.405 s 28.967 s 23.077 s
Wrench initialization — diagnostic 155.85 ms 159.09 ms 7.59 ms

The PR’s startup median was 1.3% lower than shared main and 1.8% above legacy main.

Separate diagnostic runs confirmed that joint-wrench initialization completes before render copies with the PR. Diagnostic timings are excluded from the unprofiled startup measurements.

Checklist

Docker and GPU tests run on demand. Push the commits you want tested, then
comment run-ci on the pull request.

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with uv run isaaclab --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have validated the changed behavior with focused coverage and applied the test-audit criteria to any test changes
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package (do not edit CHANGELOG.rst or bump package versions — CI handles that)
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

Release backport

  • Backport to release/3.1.0 after this pull request merges into main.

@r-schmitt
r-schmitt requested a review from a team December 1, 2026 20:14
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Dec 1, 2026
@r-schmitt

Copy link
Copy Markdown
Collaborator Author

run-ci ovstage

@isaaclab-bot isaaclab-bot Bot added ci:run-ovstage Run the opt-in OVStage rendering correctness lane and removed ci:run-ovstage Run the opt-in OVStage rendering correctness lane labels Dec 1, 2026
@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5RetriggerView in Greptile

[Medium impact] The PR appears safe to merge; no actionable defects were found.

Summary

Removes the separate binding-readiness event while keeping PHYSICS_READY as the public readiness event.

  • Shared-stage physics consumers are ready before public callbacks run.
  • Joint-wrench sensors select articulations from clone-plan paths.

The previous-review range was not used because its merge base differs from the current PR’s merge base. The full PR was reviewed. No actionable issues were found. Tests were inspected but not run.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Attach native physics and clone] --> B[Run warmup]
  B --> C[Publish MODEL_INIT]
  C --> D{Borrowed stage?}
  D -->|Yes| E[Prepare registered physics consumers]
  E --> F[Acquire scene-data bindings]
  F --> G[Complete and seal deferred render copies]
  D -->|No| H[Publish PHYSICS_READY]
  G --> H
  H --> I[Run public callbacks in priority order]
Loading

Reviews (2) · Last reviewed commit: "expand_env_pattern" · 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: Style consistency (1). Other reviewed categories look good.

  • PR description: The title and body match the diff and report workload, hardware, backends, counts, repetitions, and startup metrics; add exact revisions, commands, software environment, and warmup procedure to make the performance comparison reproducible.
  • 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 test docstring claims consumer access before render cloning, but the callback only checks is_initialized; describe readiness at the binding event instead.
  • Test quality: Test quality looks good.

Minor fixes needed. Posted 1 inline finding.

Automated review; human maintainers own approval decisions.

"""Sensor initializes on sim reset and exposes correctly-shaped buffers."""
@pytest.mark.parametrize("device,shared", [("cuda:0", True), ("cpu", False)])
def test_initialization_and_shapes(sim, device, shared):
"""Binding-ready consumers can use the initialized sensor before rendering copies."""

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 — Match the readiness assertion

The callback checks is_initialized; it does not use sensor data before rendering copies. Describe the readiness check rather than claiming consumer access.

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

will try find alternative as discussed offline

@r-schmitt
r-schmitt force-pushed the dev/rschmitt/early_joint_wrench_binding branch from 10f26f1 to 789fcf6 Compare December 2, 2026 14:23
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Dec 2, 2026
@r-schmitt r-schmitt changed the title init ovphysx joint-wrench bindings before shared ovstage render cloning remove PhysicsManager.binding_init_event Dec 2, 2026
@r-schmitt

Copy link
Copy Markdown
Collaborator Author

run-ci ovstage

@isaaclab-bot isaaclab-bot Bot added ci:run-ovstage Run the opt-in OVStage rendering correctness lane and removed ci:run-ovstage Run the opt-in OVStage rendering correctness lane labels Dec 2, 2026
@r-schmitt
r-schmitt requested a review from ooctipus December 2, 2026 15:05
@r-schmitt

Copy link
Copy Markdown
Collaborator Author

run-ci ovstage

@isaaclab-bot isaaclab-bot Bot added ci:run-ovstage Run the opt-in OVStage rendering correctness lane and removed ci:run-ovstage Run the opt-in OVStage rendering correctness lane labels Dec 2, 2026

This branch has not been deployed

No deployments
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.

4 participants