Skip to content

refactor(schemas): migrate rigid_props to fragments; deprecate RigidBodyPropertiesCfg (2/2) - #4

Draft
vidurv-nvidia wants to merge 1 commit into
vidurv/schema-frag-frameworkfrom
vidurv/schema-frag-migration
Draft

refactor(schemas): migrate rigid_props to fragments; deprecate RigidBodyPropertiesCfg (2/2)#4
vidurv-nvidia wants to merge 1 commit into
vidurv/schema-frag-frameworkfrom
vidurv/schema-frag-migration

Conversation

@vidurv-nvidia

@vidurv-nvidia vidurv-nvidia commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Description

Summary (PR 2 of 2 — stacked on the framework PR)

Builds on the additive fragment API (isaac-sim#5976). Flips the legacy name and moves every call site to fragment lists.

  • isaaclab_physx: RigidBodyPropertiesCfg → deprecation factory returning [UsdPhysicsRigidBodyCfg(...), PhysxRigidBodyCfg(...)] (removal in 5.0).
  • Migrate all RigidBodyPropertiesCfg usages across isaaclab_assets, isaaclab_tasks, isaaclab_mimic, and the test suites to fragment lists.
  • Fix consumer sites that treated rigid_props as a single object: disable_gravity mutations, .replace(), attribute reads.

Breaking: RigidBodyPropertiesCfg no longer returns a single cfg object.

This PR targets the fork branch vidurv/schema-frag-framework so the diff shows only the migration (116 files). Once isaac-sim#5976 merges to upstream develop, retarget this PR to isaac-sim/IsaacLab:develop.

Test Plan

  • test_schema_fragments.py 8 · test_schemas 39 · test_schemas_shim 145 · test_spawn_shapes 12 · test_spawn_meshes 10
  • pre-commit clean · docs build clean
  • test_spawn_from_files (Nucleus assets) + full task regression in CI

Fixes # (N/A — part of the staged physics schema-fragment refactor; no tracked public issue)

Type of change

  • Breaking change (existing functionality will not work without user modification)

Screenshots

N/A — no user-facing visual changes.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks (ruff + ruff-format) on the changed files
  • I have made corresponding changes to the documentation (the public API reference is auto-generated via ./isaaclab.sh -d; not separately authored)
  • My changes generate no new warnings
  • I have added tests that prove my feature works
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package
  • I have added my name to CONTRIBUTORS.md

…odyPropertiesCfg

Build on the additive rigid-body fragment API: flip the legacy name and
move every call site to the new fragment-list form.

- isaaclab_physx: RigidBodyPropertiesCfg becomes a deprecation factory
  returning [UsdPhysicsRigidBodyCfg(...), PhysxRigidBodyCfg(...)] (removal in 5.0).
- Migrate all RigidBodyPropertiesCfg usages across isaaclab_assets,
  isaaclab_tasks, isaaclab_mimic and the test suites to fragment lists.
- Update consumer sites that treated rigid_props as a single object:
  disable_gravity mutations, .replace(), and attribute reads.

BREAKING: RigidBodyPropertiesCfg no longer returns a single cfg object.
Pass a fragment list to rigid_props; code mutating attributes on it must
set the field on the PhysxRigidBodyCfg fragment in the list.
vidurv-nvidia added a commit to isaac-sim/IsaacLab that referenced this pull request Jun 24, 2026
# Description

## Summary (PR 1 of 2 — additive, no behavior change)

Introduces single-namespace schema **fragments** so a prim can carry
rigid-body properties from multiple USD namespaces at once (`physics:`,
`physxRigidBody:`, `mjc:`), with core naming no backend. **Purely
additive** — existing cfgs and the deprecated `RigidBodyPropertiesCfg`
class are untouched.

- **core:** `SchemaFragment`, `RigidBodyFragment`,
`UsdPhysicsRigidBodyCfg`; `apply_namespaced` (generic per-fragment
writer) and `apply_rigid_body_properties` (applies a fragment list with
`UsdPhysics.RigidBodyAPI` as the implicit anchor).
- **spawner:** `rigid_props` accepts a fragment list; legacy single cfgs
keep working via a transition bridge
(shapes/meshes/from_files/mesh_converter).
- **backends:** `PhysxRigidBodyCfg` (physx), `MujocoRigidBodyCfg`
(newton).
- new `test_schema_fragments.py` + exports.

**PR 2** (stacked) flips `RigidBodyPropertiesCfg` to a deprecation
factory and migrates all call sites: vidurv-nvidia#4 (review
after this lands).

## Test Plan
- [x] `test_schema_fragments.py` — 7 passed
- [x] pre-commit clean · `./isaaclab.sh -d` docs build clean
- [ ] CI

First slice of the staged physics schema-cfg refactor (collision / mass
/ joint-drive / … follow later). Draft for review of the fragment API
shape.


## Type of change

- New feature (non-breaking change which adds functionality)

## Screenshots

N/A — no user-facing visual changes.

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the pre-commit checks (`ruff` + `ruff-format`) on the
changed files
- [ ] I have made corresponding changes to the documentation (the public
API reference is auto-generated via `./isaaclab.sh -d`; not separately
authored)
- [x] My changes generate no new warnings
- [x] I have added tests that prove my feature works
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package
- [ ] I have added my name to `CONTRIBUTORS.md`

---------

Co-authored-by: ooctipus <zhengyuz@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant