Fix Newton self-collisions being uncontrolled via the deprecated PhysX cfg (#7164) - #7217
Conversation
…X cfg (isaac-sim#7164) ## Summary - `ArticulationRootPropertiesCfg`/`PhysxArticulationRootPropertiesCfg.enabled_self_collisions` only authored `physxArticulation:enabledSelfCollisions`. Newton's schema resolver checks `newton:selfCollisionEnabled` first and only falls back to the PhysX attribute when it's unauthored, so the deprecated cfg's setting silently never reached Newton simulations. - `modify_articulation_root_properties` now mirrors `enabled_self_collisions` onto `newton:selfCollisionEnabled` (applying `NewtonArticulationRootAPI`) whenever it's set, so the deprecated cfg controls self-collisions on both backends. - Migrated `ALLEGRO_HAND_CFG`, `SHADOW_HAND_CFG`, `SHADOW_HAND_NEWTON_CFG`, and `KUKA_ALLEGRO_CFG` off the deprecated cfg to explicit `PhysxArticulationCfg` + `NewtonArticulationCfg` fragments. Several of the reorientation/handover tasks built on these hands (`Isaac-Reorient-Cube-Allegro*`, `Isaac-Reorient-Cube-Shadow-Direct*`, `Isaac-Shadow-Handover-Direct`) default to the `newton_mjwarp` preset, so this was a real training-time gap, not just a hypothetical one. - Adds `isaaclab_physx`/`isaaclab_newton` as declared dependencies of `isaaclab_assets` (needed for the fragment imports above). ## Test plan - [x] `test_physx_articulation_root_writes_self_collisions` extended to assert `newton:selfCollisionEnabled` / `NewtonArticulationRootAPI` are authored; confirmed it fails without the fix and passes with it. - [x] `source/isaaclab/test/sim/test_schemas.py` (43 tests) and `test_articulation_fragments.py` (26 tests) pass. - [x] `source/isaaclab_assets` test suite passes (`test_asset_configs` loads all three migrated robot configs). - [x] `test_initialization_hand_with_tendons` (Shadow Hand, PhysX backend) passes with the fragment-based `articulation_props`. - [x] `uv run isaaclab -f` passes (formatting, changelog fragments). --------- Co-authored-by: Kelly Guo <kellyg@nvidia.com>
Greptile SummaryThe PR backports Newton self-collision handling and fixed-root schema relocation while migrating several hand assets to explicit PhysX/Newton configuration fragments.
Confidence Score: 5/5The PR appears safe to merge, with no concrete changed-code failure identified. The schema relocation, backend-specific asset fragments, dependency ordering, and benchmark initialization are internally consistent, and the investigated compatibility concerns were either contradicted by repository usage or lacked a reachable failing condition. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
AssetCfg["Asset articulation_props"] --> PhysXCfg["PhysxArticulationCfg"]
AssetCfg --> NewtonCfg["NewtonArticulationCfg"]
PhysXCfg --> PhysXSchema["PhysxArticulationAPI"]
NewtonCfg --> NewtonSchema["NewtonArticulationRootAPI"]
LegacyCfg["Deprecated PhysX root cfg"] --> Mirror["Self-collision mirror"]
Mirror --> NewtonSchema
FixRoot["fix_root_link relocation"] --> ParentRoot["Parent articulation root"]
PhysXSchema --> ParentRoot
NewtonSchema --> ParentRoot
Reviews (1): Last reviewed commit: "Fix Newton self-collisions being uncontr..." | Re-trigger Greptile |
There was a problem hiding this comment.
Isaac Lab Review Bot
The backport correctly aligns Newton self-collision authoring, fixed-root relocation, asset dependencies, and install ordering, but two compatibility issues need attention: referenced-layer Newton properties can trigger hard failures during relocation, and public hand configurations now expose a list where callers previously received a single articulation config object.
- Design and architecture: The mirror-after-relocation ordering preserves a single articulation root, and the new
isaaclab_assetsbackend imports are reflected in package dependencies and installation order. However, Newton relocation must account for authored opinions originating outside the current USD edit target rather than treating unsuccessful removal as fatal. - API: The public Allegro, Shadow Hand, and Kuka Allegro configurations change
spawn.articulation_propsfrom a single config object to a fragment list. The assets changelog should explicitly document this type change and provide migration guidance for downstream code that mutates articulation properties in place. - Implementation: The Newton schema state is flattened to the relocated parent, but
IsAuthored()includes referenced-layer opinions whileRemoveProperty()operates on the current edit target. Raising on an unremovable referenced property can therefore abort fixed-root spawning; cleanup should tolerate or explicitly handle properties not authored in the editable layer.
Minor fixes needed. Posted 2 actionable findings inline.
Automated review; human maintainers own approval decisions.
| if not prop.FlattenTo(parent_prim): | ||
| raise RuntimeError(f"Failed to move '{prop.GetPath()}' to '{parent_prim.GetPath()}'.") | ||
| for prop in newton_properties: | ||
| if not articulation_prim.RemoveProperty(prop.GetName()): |
There was a problem hiding this comment.
🟡 Warning · Implementation — Hard failure removing referenced-layer Newton properties
prop.IsAuthored() is true for opinions coming from a referenced robot USD, but RemoveProperty only removes specs in the current edit target. For assets that pre-author newton:* on the root link, fix_root_link=True can abort spawning with RuntimeError, unlike the adjacent PhysX cleanup which tolerates failure. Prefer warning and skipping when the spec is not editable in the current edit target.
| sleep_threshold=0.005, | ||
| stabilization_threshold=0.0005, | ||
| ), | ||
| articulation_props=[ |
There was a problem hiding this comment.
🟡 Warning · Api — articulation_props value type changed to list
ALLEGRO_HAND_CFG.spawn.articulation_props (and the same field in shadow_hand.py and kuka_allegro.py) changes from a single cfg instance to a list of fragments, so downstream in-place overrides such as robot.spawn.articulation_props.solver_position_iteration_count = 4 now fail on a list. Call this type change out explicitly in the isaaclab_assets changelog fragment with migration guidance for such overrides.
Summary
Backports #7164 to
release/3.0.0.isaaclab_assetsand fixes core package installation order.The backport is patch-identical to the merged #7164 diff and contains no unrelated
develophistory.Type of change
Test plan
source/isaaclab/test/sim/test_schemas.py: 44 passeduv run isaaclab -frelease/3.0.0Checklist
CONTRIBUTORS.md