Skip to content

[Backport release/3.0.0] Deprecate legacy physics schema cfgs and writers (#7839) - #7908

Merged
ooctipus merged 1 commit into
isaac-sim:release/3.0.0from
ooctipus:backport/schema-deprecation-7839-release-3.0
Sep 20, 2026
Merged

ooctipus merged 1 commit into
isaac-sim:release/3.0.0from
ooctipus:backport/schema-deprecation-7839-release-3.0

Conversation

@ooctipus

Copy link
Copy Markdown
Collaborator

Description

Backports #7839 to release/3.0.0. Legacy physics schema configs and writers emit deprecation warnings naming their schema-fragment replacements, while the existing APIs continue to work. Includes the migration guide, the standard typing_extensions.deprecated implementation, and the original changelog fragments. The fragment-consumer migration from #7838 is already in the release through #7904.

Exact cherry-pick of 5889bae6e8de7a2b5a6e3ff099f82236d251cd19 onto release commit ff22c52891, with no conflicts or source changes. Preserves the source removal target of 3.2, release package versions, and dependency pins.

Validation

292 tests passed locally with PyTorch 2.12:

  • Schema deprecation and compatibility tests: 230 passed.
  • Schema integration tests: 44 passed.
  • Tendon fragment tests: 18 passed.
  • uv run --no-sync isaaclab -f: all checks passed with changelog validation against the release base.
  • All 13 changed files match the merged source commit; git diff --check passed.

Kit integration tests ran in separate processes on RTX 5090 with Isaac Sim 6.0.1. Release CI uses its pinned Isaac Sim 6.1 image.

Release backport

Targets release/3.0.0 directly; no further backport requested.

# Description

Marks the legacy physics schema config classes and writers deprecated,
with per-symbol migration guidance. **Nothing is removed.** Per
`AGENTS.md`, this is the prior-release deprecation that a later removal
requires.

Best reviewed after isaac-sim#7838, which converts the repo's own call sites to
fragments. This PR does not depend on it to build or pass — verified
that importing shipped asset configs emits the same 8
`DeprecationWarning`s on this branch and on clean `develop`, so it adds
no new import-time noise — but landing the migration first keeps our own
configs off the deprecated path.

## Scope

**35 classes.** Core: `MassPropertiesCfg`, `RigidBodyBaseCfg`,
`CollisionBaseCfg`, `JointDriveBaseCfg`, `ArticulationRootBaseCfg`,
`MeshCollisionBaseCfg`, `BoundingCube/BoundingSpherePropertiesCfg`.
PhysX: the 9 `Physx*PropertiesCfg` classes plus the 10 2.x aliases.
Newton: 8 `Newton*`/`Mujoco*PropertiesCfg`.

**13 writers.** `define_`/`modify_` × {articulation_root, rigid_body,
collision, mass}, plus `modify_joint_drive_properties`, the two tendon
writers, and `define_`/`modify_mesh_collision_properties`.

**Excluded: everything deformable.** Its fragment families are still in
isaac-sim#6673, so there is nothing to point users at yet. A test asserts the
deformable symbols stay undeprecated so this cannot drift.

## Mechanism

Uses `typing_extensions.deprecated`, which is already a dependency. A
small config-class helper applies it to the generated `__init__` above
`@configclass`, so construction warns once for the concrete class while
importing and defining subclasses remain silent. Signatures, field
aliases, `to_dict()`, `copy()`, `replace()`, and `dataclasses.replace()`
remain intact.

Writers use the standard decorator above `@apply_nested`. Six internal
delegation calls bypass only the deprecation wrapper through
`__wrapped__`, retaining subtree traversal and emitting one warning
naming the public entry point. There is no custom writer decorator or
nesting state. Tests that need the raw per-prim writer use
`inspect.unwrap(writer)` to bypass all decorators;
`modify_*.__wrapped__` now refers to the traversal wrapper.

## Removal version

The legacy cfgs and writers are deprecated in **3.1** and scheduled for
removal in **3.2**.

## Documentation

New migration-guide section in
`docs/source/migration/migrating_to_isaaclab_3-0.rst`: full
deprecated→fragment table, before/after code, the two non-USD flags that
moved to the spawner (`fix_root_link`, `ensure_drives_exist`), the
writer table, and a warning-filter snippet for migrating incrementally.

Also corrects that guide's existing "Class moves and renames" section,
which still recommended `Physx*PropertiesCfg` / `*BaseCfg` as the
"Recommended 3.0 pattern" — exactly what this PR deprecates.

## Type of change

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

## Testing

**292 tests passed** locally:

- `test_schemas_deprecation.py`: 88 passed.
- `test_schemas_shim.py`: 142 passed.
- `test_schemas.py`: 44 passed.
- `test_tendon_fragments.py`: 18 passed.

Covered warning messages and caller locations, construction without
import-time warnings, inherited configs, direct and delegated writers,
nested mesh collision, child traversal, and raw-writer access. A
regression check rejects the removed custom writer decorator and depth
state; it fails on the preceding implementation and passes here.

All 13 writer warning messages are unchanged. An AST comparison verified
that the writer bodies are unchanged apart from the six delegation
calls. `uv run isaaclab -f` passed with the changelog checker configured
against the PR base.

## Checklist

- [x] I have read and understood the contribution guidelines
- [x] I have run the `pre-commit` checks with `uv run isaaclab -f`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

---------

Co-authored-by: Octi Zhang <zhengyuz@nvidia.com>
(cherry picked from commit 5889bae)
@ooctipus
ooctipus requested a review from a team September 20, 2026 01:52
@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Sep 20, 2026
@greptile-apps

greptile-apps Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

The implementation appears safe to merge after correcting the non-blocking but misleading changelog description of existing alias schedule changes.

Findings

  1. P2 Changelog Misstates Alias Changes

Summary

This backport deprecates inheritance-based physics schema configurations and legacy schema writers while retaining their behavior, directs users to composable schema fragments, and adds migration and compatibility coverage.

  • Adds construction-time warnings for legacy core, PhysX, and Newton schema configurations.
  • Adds call-time warnings for legacy schema writers while preserving nested traversal and internal delegation.
  • Documents complete fragment replacements and spawner-level replacements for non-USD fields.
  • Adds kitless and integration tests for warning behavior, compatibility, shims, and tendon fragments.
  • The changelog currently misstates that several aliases are unaffected even though their removal warnings change.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[Legacy PropertiesCfg construction] --> B[DeprecationWarning]
    B --> C[Existing legacy behavior retained]
    B --> D[Migration guidance]
    D --> E[Core USD schema fragments]
    D --> F[PhysX schema fragments]
    D --> G[Newton and MuJoCo fragments]
    E --> H[Spawner fragment lists]
    F --> H
    G --> H
    I[Legacy define or modify writer] --> J[DeprecationWarning]
    J --> K[Existing nested writer behavior]
    J --> L[Fragment-based apply writer]
Loading

Reviews (1) · Last reviewed commit: "Deprecate the legacy physics schema cfgs..."

* Reworded the deprecation notices on the previously deprecated ``*PropertiesCfg`` schema aliases
to point at the new fragment replacements instead of the intermediate split classes, so the
whole legacy schema cfg surface is documented to be removed in the same release as the classes
it forwards to. The material and tendon aliases are unaffected.

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.

P2 Changelog Misstates Alias Changes

The changelog says material and tendon aliases are unaffected, but this PR changes their runtime removal warnings from 3.1 to 3.2. It similarly calls deformable configs unaffected while changing the warnings for three deformable aliases. Please document these schedule changes or revert them so users receive an accurate account of the existing deprecations modified by this release.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@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

The backport preserves the legacy schema cfg and writer implementations while adding deprecation warnings and fragment migration guidance. Two migration instructions need correction: mesh-collision’s replacement writer does not accept prim-path expressions or preserve subtree traversal, and single-fragment spawner replacements should not be presented as lists.

  • Design and architecture: The decorator ordering keeps the existing apply_nested traversal inside deprecated writer wrappers, while internal calls through __wrapped__ avoid duplicate warnings. The shared cfg deprecation helper is consistently reused across core, PhysX, and Newton; the remaining concerns are confined to migration guidance rather than the compatibility architecture.
  • API: The migration guide incorrectly generalizes all replacement apply_* writers as accepting prim-path expressions: apply_mesh_collision_properties resolves one exact path with GetPrimAtPath. Deprecation messages also advertise list-wrapped replacements such as [MassCfg(...)] where the repository contract requires a bare fragment for a single-fragment spawner slot.
  • Implementation: The compatibility paths retain dataclass constructors and helpers, field-alias forwarding, and legacy subtree traversal, with tests consistently using inspect.unwrap. Documentation and warning text should be aligned with the actual mesh-collision writer signature and single-fragment slot representation before merge.

Minor fixes needed. Posted 2 actionable findings inline.

Automated review; human maintainers own approval decisions.

**Schema writers**

The ``define_*`` and ``modify_*`` writers are deprecated alongside the cfgs and
will be removed in 3.2. Each has an ``apply_*`` counterpart that takes a

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 · Api — Mesh-collision writer takes exact prim path

This states every apply_* replacement takes a prim-path expression that can author a whole subtree, and the table lists apply_mesh_collision_properties as the replacement for the mesh-collision writers. That function takes a single prim_path, resolves it with stage.GetPrimAtPath, and raises ValueError on an invalid path, so a migrated regex fails and the legacy subtree traversal is lost. Qualify this writer here and in the changelog.

"""


@_deprecated_schema_cfg("[MassCfg(...)]")

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 · Api — Single-fragment replacements advertised as lists

The new warnings wrap a single replacement fragment in a list ([MassCfg(...)], and likewise for MeshCollisionBaseCfg, ArticulationRootBaseCfg, and the Physx*Mesh cooking classes). The repository fragment rule is a bare fragment for a single instance and a list only for multiple fragments; list form forces callers to select the owning fragment before field access or replace(). This changelog also says "Replace MassPropertiesCfg with MassCfg". Emit the bare form for single-fragment replacements.

@StafaH

StafaH commented Sep 20, 2026

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 Sep 20, 2026
@ooctipus
ooctipus merged commit b8b93bb into isaac-sim:release/3.0.0 Sep 20, 2026
54 checks passed
@ooctipus
ooctipus deleted the backport/schema-deprecation-7839-release-3.0 branch September 20, 2026 02:55
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.

3 participants