Skip to content

Skip empty PhysX rigid-body view creation - #8473

Merged
kellyguo11 merged 2 commits into
isaac-sim:developfrom
kellyguo11:kellyg/fix-empty-physx-rigid-body-view
Oct 12, 2026
Merged

kellyguo11 merged 2 commits into
isaac-sim:developfrom
kellyguo11:kellyg/fix-empty-physx-rigid-body-view

Conversation

@kellyguo11

@kellyguo11 kellyguo11 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Description

Skip the PhysX scene-data rigid-body tensor view when the stage has no rigid bodies.

Since #8021, PhysxManager requests a global create_rigid_body_view("/**") at warmup to back the scene-data
transforms. omni.physics.tensors logs an error whenever a pattern matches no rigid bodies, so every static scene,
for example scripts/tutorials/00_sim/launch_app.py, starts with:

[Error] [omni.physx.tensors.plugin] Pattern '/**' did not match any rigid bodies
[Error] [omni.physx.tensors.plugin] Provided pattern list did not match any rigid bodies

The manager now checks the loaded USD stage, including instance proxies, for UsdPhysics.RigidBodyAPI before
requesting the view. Rigid-body scenes keep the existing tensor-view and articulation-alias behavior.

  • No false skips. With Kit, every PhysX body comes from a USD prim: environments are always authored through
    UsdReplicateContext, and PhysX replication copies from USD sources.
  • Cost. any() stops at the first rigid body, so only static scenes walk the whole stage.
  • Why not ask PhysX. omni.physics.tensors.SimulationView cannot list bodies or silence the no-match error from
    Python. The tensors C++ layer has a per-view setNoMatchLoggingQuiet, which the OVPhysX tensor binding uses for
    wildcard bindings. Once it is exposed in Python, this stage walk can be replaced.

test_reset_without_rigid_bodies_skips_rigid_body_view resets a scene whose only physics prim is a static collider
and checks that no rigid-body view is requested or published. It fails on the pre-fix code with the /** request.
test_timeline_play_stop covers the rigid-body branch; no existing test had a static scene.

No additional dependencies or public API changes are required.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Release backport

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

release/3.0.0 has the same /** request.

Screenshots

Not applicable; this removes startup log errors.

Validation

  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTHONEXE=.venv/bin/python <isaac-sim-source>/python.sh --no-ros-env -m pytest -q source/isaaclab_physx/test/sim/test_simulation_context_kit.py — TODO: rerun after the test change (was 5 passed with source-built Isaac Sim 6.2).
  • The reported launch_app.py --visualizer kit,viser,rerun,newton_gl command reached [INFO]: Setup complete...; neither PhysX tensor error appeared before the bounded smoke run was stopped.
  • ISAACLAB_CHANGELOG_BASE_REF=upstream/develop uv run --no-sync isaaclab -f — passed.
  • uv run --no-sync python tools/changelog/cli.py check upstream/develop --include-worktree — passed.
  • performance-smoke-benchmarks fails on the g1-newton leg (Warp LTO build directory Permission denied). This
    is unrelated; the same workflow fails on develop.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with uv run isaaclab --format
  • No public documentation change is required; the user-visible fix is recorded in the package changelog
  • My changes generate no new warnings
  • I have validated the changed behavior with focused coverage and applied the test-audit criteria to the test change
  • I have added a changelog fragment under source/isaaclab_physx/changelog.d/
  • My name already exists in CONTRIBUTORS.md

@kellyguo11
kellyguo11 requested a review from a team October 12, 2026 05:27
@kellyguo11

Copy link
Copy Markdown
Contributor Author

run-ci

@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Oct 12, 2026
@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
@greptile-apps

greptile-apps Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

This PR skips the global PhysX rigid-body view request when the USD stage contains no rigid bodies.

  • Static scenes skip empty PhysX rigid-body view requests.

Reviews (1) · Last reviewed commit: "Skip empty PhysX rigid-body view creatio..." · 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 accurately describe the static-scene guard, preserved rigid-body behavior, focused validation, changelog, and unchanged public API; no correction is needed.
  • 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 rigid_body_prims variable contains every traversed prim, obscuring the predicate; inline the range into any(...) and retain only has_rigid_bodies.
  • Test quality: Test quality looks good.

Minor fixes needed. Posted 1 inline finding.

Automated review; human maintainers own approval decisions.

[aliases.get(path, path) for path in paths]
)
# The native API logs errors instead of returning an empty view when no rigid bodies exist.
rigid_body_prims = Usd.PrimRange.Stage(sim.stage, Usd.TraverseInstanceProxies())

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 — Misleading name for full prim range

rigid_body_prims holds every prim on the stage, not rigid bodies, so the guard misreads at a glance. Inline the Usd.PrimRange.Stage(...) call into the any(...) generator and keep only has_rigid_bodies.

The guard comment now matches the handle-less wrapper comment below it, and
the test uses a cube collider for the static-collider case instead of the
network-loaded ground plane.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AntoineRichard

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
@kellyguo11
kellyguo11 merged commit 4e1f1f7 into isaac-sim:develop Oct 12, 2026
58 of 59 checks passed
kellyguo11 added a commit that referenced this pull request Oct 12, 2026
Backports #8473 to `release/3.0.0`.

The original cherry-pick conflicted. An NVIDIA inference model proposed
this resolution, and deterministic validation confirmed that it changes
no paths outside the original PR. Because conflict resolution cannot be
certified as an exact patch replay, this PR is intentionally a draft and
requires release-maintainer review.

| Field | Commit |
|---|---|
| Original merged change | `4e1f1f717d49f212ac77f7e659e445d3e258f0b9` |
| Release base used | `6cd92084392eb65f455470453d5fb812e93c8a1e` |
| Proposed backport | `6817552def5bd2932b43a6469eb8c7772b009ff2` |

Co-authored-by: Kelly Guo <kellyg@nvidia.com>
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