Repository navigation
Skip empty PhysX rigid-body view creation - #8473
kellyguo11 merged 2 commits into
Conversation
|
run-ci |
|
There was a problem hiding this comment.
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_primsvariable contains every traversed prim, obscuring the predicate; inline the range intoany(...)and retain onlyhas_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()) |
There was a problem hiding this comment.
🟡 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>
|
run-ci |
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>
Description
Skip the PhysX scene-data rigid-body tensor view when the stage has no rigid bodies.
Since #8021,
PhysxManagerrequests a globalcreate_rigid_body_view("/**")at warmup to back the scene-datatransforms.
omni.physics.tensorslogs an error whenever a pattern matches no rigid bodies, so every static scene,for example
scripts/tutorials/00_sim/launch_app.py, starts with:The manager now checks the loaded USD stage, including instance proxies, for
UsdPhysics.RigidBodyAPIbeforerequesting the view. Rigid-body scenes keep the existing tensor-view and articulation-alias behavior.
UsdReplicateContext, and PhysX replication copies from USD sources.any()stops at the first rigid body, so only static scenes walk the whole stage.omni.physics.tensors.SimulationViewcannot list bodies or silence the no-match error fromPython. The tensors C++ layer has a per-view
setNoMatchLoggingQuiet, which the OVPhysX tensor binding uses forwildcard bindings. Once it is exposed in Python, this stage walk can be replaced.
test_reset_without_rigid_bodies_skips_rigid_body_viewresets a scene whose only physics prim is a static colliderand checks that no rigid-body view is requested or published. It fails on the pre-fix code with the
/**request.test_timeline_play_stopcovers the rigid-body branch; no existing test had a static scene.No additional dependencies or public API changes are required.
Type of change
Release backport
developrelease/3.0.0has 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).launch_app.py --visualizer kit,viser,rerun,newton_glcommand 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-benchmarksfails on theg1-newtonleg (Warp LTO build directoryPermission denied). Thisis unrelated; the same workflow fails on
develop.Checklist
uv run isaaclab --formatsource/isaaclab_physx/changelog.d/CONTRIBUTORS.md