Skip to content

Deprecate the legacy physics schema cfgs and writers - #7839

Merged
ooctipus merged 13 commits into
isaac-sim:developfrom
vidurv-nvidia:vidurv/schema-deprecate-legacy
Sep 20, 2026
Merged

ooctipus merged 13 commits into
isaac-sim:developfrom
vidurv-nvidia:vidurv/schema-deprecate-legacy

Conversation

@vidurv-nvidia

@vidurv-nvidia vidurv-nvidia commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

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 #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 DeprecationWarnings 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 #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

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

The composable schema fragments (one configclass per USD applied schema,
each writing a single attribute namespace) now cover every non-deformable
schema family, so the inheritance-based cfg classes and the define_* /
modify_* writers they feed are superseded. Mark them deprecated ahead of
removal in 4.0. Nothing is removed here and both APIs keep working.

Warn on instantiation rather than at class definition or import, so only
callers that actually construct a legacy cfg are told. The warning wraps
the dataclass __init__ instead of __post_init__: dataclasses regenerate
__init__ for every decorated class, so a legacy subclass of a legacy base
warns exactly once and names the concrete class the caller wrote, whereas
configclass chains __post_init__ along the inheritance graph and would
warn once per level. Each message names that class's own replacement.

The legacy writers warn through a depth-guarded decorator applied above
apply_nested, so a define_* that delegates to its modify_* counterpart
still produces a single warning naming the entry point the caller used,
and the traversal warns once rather than once per visited prim. The
decorator keeps __wrapped__ pointing at the undecorated writer, which
callers already use to bypass the apply_nested traversal.

The pre-existing 2.x aliases previously pointed users at the
Physx*PropertiesCfg classes, which are themselves now legacy; repoint
them at the fragments. Their announced removal also moves from 5.0 to
4.0, matching the migration guide, the VERSION file and the rest of this
module, so the whole legacy schema cfg surface retires together. The
material and tendon aliases keep their 5.0 target.

Deformable cfgs and writers are excluded: their fragment families do not
exist yet, so there is nothing to migrate to.
The legacy physics schema deprecation surface announced removal in
4.0, but 4.0 is stale -- the next major release is 5.0. Correct every
removal-version reference this deprecation work introduced (warning
messages, deprecated:: directives, changelog fragments, the 3.0
migration guide section, and test assertions) to say 5.0, and revert
the pre-existing aliases that were changed from 5.0 down to 4.0.

Also harmonize a handful of pre-existing "removed in 4.0" strings
that belong to the same deprecated classes (the max_effort/
max_velocity field aliases on JointDriveBaseCfg and PhysxJointCfg,
the usd_api/physx_api attribute shim on MeshCollisionBaseCfg, and the
adjacent migration-guide prose) so the published removal promise is
internally consistent. Material and tendon deprecations, and the
unrelated actuator-limit migration note, are left untouched.
@vidurv-nvidia
vidurv-nvidia requested a review from a team September 15, 2026 23:31
@vidurv-nvidia vidurv-nvidia added the ci:run-docker Trigger the on-demand Docker and GPU CI workflow label Sep 15, 2026
@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Sep 15, 2026
The forwarding shims for the moved PhysX and Newton schema cfgs still named
4.0, while the classes they forward to are deprecated for 5.0. A user hitting
the shim's ImportError would read a different removal release than the one
the class itself advertises.
@greptile-apps

greptile-apps Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

The PR should not merge until the Newton deprecation guidance preserves inherited schema fields; the remaining findings concern warning filtering, test isolation, and concurrent warning delivery.

Findings

  1. P1 Migration Drops Inherited Fields ▶
  2. P2 Warning Filter Cannot Match ▶
  3. P2 Reload Leaks Class Identities ▶
  4. P2 Concurrent Calls Lose Warnings ▶

Summary

This PR introduces instantiation- and call-time deprecation warnings for legacy physics schema cfgs and writers, updates their removal target to 5.0, and documents migration to schema fragments.

  • Adds reusable deprecation decorators for legacy cfg classes and schema writers.
  • Deprecates core, PhysX, and Newton inheritance-based schema cfg families while preserving behavior.
  • Adds coverage for warning count, replacement text, configclass compatibility, writer behavior, and deformable exclusions.
  • Expands the 3.0 migration guide and package changelogs with fragment-based migration guidance.
  • Some Newton migration mappings omit fragments required to preserve inherited fields.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[Legacy PropertiesCfg instance] -->|DeprecationWarning| B[Fragment list]
    C[Legacy define/modify writer] -->|DeprecationWarning| D[apply_* family writer]
    B --> D
    D --> E[USD schema namespaces]
    E --> F[Core physics:*]
    E --> G[PhysX physx*:*]
    E --> H[Newton newton:* / mjc:*]
Loading

Reviews (1) · Last reviewed commit: "Fix removal version in legacy schema dep..."

_usd_field_exceptions: ClassVar[dict] = {}


@_deprecated_schema_cfg("MujocoRigidBodyCfg")

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.

P1 Migration Drops Inherited Fields

The replacement guidance omits fragments needed to preserve inherited fields. For example, MujocoRigidBodyPropertiesCfg(kinematic_enabled=True, gravcomp=1.0) recommends only MujocoRigidBodyCfg, which has no kinematic_enabled. The mappings for NewtonMeshCollisionPropertiesCfg and NewtonSDFCollisionPropertiesCfg likewise omit NewtonCollisionCfg and the standard collision fragments that carry inherited collision fields. Users following these warnings or the migration table can therefore silently lose authored physics properties. Please update the warnings, docstrings, and table entries to name every fragment and slot required to preserve those fields.


import warnings

warnings.filterwarnings("ignore", category=DeprecationWarning, module="isaaclab.sim.schemas.*")

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 Warning Filter Cannot Match

This module filter does not silence the new warnings. Both decorators use stacklevel=2, so Python attributes each warning to the caller's module rather than isaaclab.sim.schemas.*. A user copying this incremental-migration snippet will continue receiving warnings. Please use a message-based filter, omit the module constraint, or document a caller-module pattern instead.


with warnings.catch_warnings(record=True) as caught:
warnings.simplefilter("always")
importlib.reload(schemas_cfg)

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 Reload Leaks Class Identities

This test reloads the globally shared cfg module without restoring it. Backend modules imported by earlier parameterized cases retain the old core base-class objects, while schemas_cfg and writer-side type checks begin using newly created classes. This leaves later tests with two incompatible generations of the hierarchy and makes results order-dependent. Restore the module during cleanup or verify import-time silence in an isolated subprocess.

# delegate to their ``modify_*`` counterpart, so only the outermost call warns and the caller
# sees exactly one deprecation naming the entry point they used. Stage authoring is
# single-threaded, so a plain module-level counter is sufficient.
_legacy_writer_depth = 0

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 Concurrent Calls Lose Warnings

The warning-suppression depth is process-global even though stage context supports concurrent access through thread-local state. If two threads independently call legacy writers at the same time, the second call can observe the first call's nonzero depth and skip its deprecation warning. Make the nesting depth thread-local or context-local so suppression applies only to actual delegation within one call chain.

@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 deprecation mechanism preserves the legacy APIs while adding one warning per concrete cfg instantiation or top-level writer call. Two migration-documentation issues need correction: the warning-filter example cannot match warnings attributed to caller modules, and several Newton replacement mappings omit inherited core fragments.

  • Design and architecture: Wrapping generated config-class initializers and placing the writer decorator above apply_nested appropriately avoids duplicate warnings across inheritance, traversal, and define-to-modify delegation. Preserving the raw writer through wrapped maintains the existing traversal-bypass contract.
  • API: No public symbols are removed, and the compatibility surface remains available. However, the migration table and some warning replacement strings name only backend fragments for legacy Newton and PhysX classes that also expose inherited physics fields; migration guidance must list the complete fragment composition needed to preserve those fields.
  • Implementation: The warning decorators preserve generated signatures and dataclass/configclass helpers, while the writer depth guard suppresses nested duplicate warnings. The documented module-based filter is incompatible with stacklevel=2 because warnings are attributed to the caller’s module, so the example should use a message/category filter or explicitly explain caller-module filtering.

Minor fixes needed. Posted 2 actionable findings inline.

Automated review; human maintainers own approval decisions.


import warnings

warnings.filterwarnings("ignore", category=DeprecationWarning, module="isaaclab.sim.schemas.*")

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 — Documented warning filter cannot match

filterwarnings(module=...) is matched against the __name__ of the frame selected by stacklevel. Both new decorators use stacklevel=2, so each warning is attributed to the caller's module (e.g. the user's asset cfg), never isaaclab.sim.schemas.*. Following this snippet silences nothing. Filter on message= (or category= alone) instead, or document the caller-module semantics.

:class:`~isaaclab_physx.sim.schemas.PhysxTriangleMeshCfg`,
:class:`~isaaclab_physx.sim.schemas.PhysxTriangleMeshSimplificationCfg`,
:class:`~isaaclab_physx.sim.schemas.PhysxSDFMeshCfg`)
* - ``NewtonRigidBodyPropertiesCfg``, ``MujocoRigidBodyPropertiesCfg``

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.

🔵 Suggestion · Api — Newton mappings omit inherited fields

These rows map NewtonRigidBodyPropertiesCfg / MujocoRigidBodyPropertiesCfg to MujocoRigidBodyCfg alone, but those classes inherit rigid_body_enabled, kinematic_enabled and disable_gravity from RigidBodyBaseCfg, which MujocoRigidBodyCfg (only gravcomp) cannot carry; the joint and collision rows are similarly terse. The runtime warnings for PhysxRigidBodyPropertiesCfg and MujocoRigidBodyPropertiesCfg have the same omission. List the full fragment composition, as the PhysX table row already does.

The migration section is introduced by a bold paragraph rather than a
section title, so a bare ``:ref:`` had no title to resolve and the docs
build failed under warnings-as-errors.

@StafaH StafaH left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's drop the tests that were added, they would only be relevant during the temporary transition during deprecation

The deprecation warnings and docs named only one fragment where a legacy cfg
bundles several USD namespaces, so a user following the guidance silently
dropped the properties the class inherits. For example
MujocoRigidBodyPropertiesCfg pointed only at MujocoRigidBodyCfg, losing
rigid_body_enabled, kinematic_enabled and disable_gravity.

Every warning now names the complete fragment set derived from the class's
dataclass fields, written uniformly as a spawner-slot list. Fields with no
fragment home are called out instead of being dropped: fix_root_link,
ensure_drives_exist and mesh_collision_property move to the spawner cfg.

The tests now assert the whole set per class rather than a single substring.
The migration guide suggested filtering the schema deprecations with
module="isaaclab.sim.schemas.*". warnings matches module= against the __name__
of the frame chosen by stacklevel, and these warnings deliberately point at the
caller, so the filter matched the user's own asset cfg module and silenced
nothing.

Document message= regexes instead, one per warning shape, and warn against the
module= form. Add tests that assert the documented filters suppress and that
the module= filter does not.
The test reloaded the shared schema cfg module and never restored it. Backend
modules imported by earlier parametrized cases kept references to the old base
classes while later code saw freshly created ones, leaving two incompatible
generations of the hierarchy in one interpreter and making results depend on
test order.

Import the cfg modules for the first time in a fresh interpreter instead, which
is also a stronger check: it covers the PhysX and Newton cfg modules and
asserts they were not already imported.
The nesting depth that suppresses duplicate warnings from nested define_*/
modify_* writers was a plain module global. Stage context is thread-local and
supports concurrent access, so two threads authoring at once could have the
second observe the first's nonzero depth and skip a deprecation the caller was
entitled to.

Store the depth in threading.local, mirroring the thread-local stage context in
isaaclab.sim.utils.stage. These writers are synchronous with no await points,
so a ContextVar's extra per-task isolation would buy nothing.
@vidurv-nvidia

Copy link
Copy Markdown
Contributor Author

All four addressed — 897add260ba, 8639bd6ed93, e2fd8c5e3cd, 3f213d387d6. Every one reproduced first; details below.

Migration drops inherited fields — confirmed and worse than reported. I re-derived the true replacement per class by set-covering each legacy class's dataclasses.fields() against the concrete fragments. MujocoRigidBodyPropertiesCfg needed three fragments and named one; NewtonMeshCollisionPropertiesCfg needed five. One entry was not merely incomplete but wrong: NewtonJointDrivePropertiesCfg pointed at MujocoJointCfg, which carries actuatorgravcomp — a field that class does not have.

Also surfaced a third spawner-bound field the guidance never mentioned: mesh_collision_property, which becomes the spawner's mesh_collision_props slot, alongside fix_root_link and ensure_drives_exist.

Warnings, docstrings and the guide table now all use one format — the spawner-slot list plus a parenthetical for spawner-bound fields — and a verifier parses the fragment names back out of the live warning text and asserts they equal the derived cover: OK: 35 deprecated classes. The suite previously used a single-substring check that would have passed on the buggy strings; it now asserts the complete set.

Warning filter cannot match — correct, and measured rather than assumed:

filter                                   | legacy cfg | writer | alias
module='isaaclab.sim.schemas.*'  (OLD)   |     1      |   1    |   3     <- silences nothing
message=r'\w+ is deprecated\. Use '      |     0      |   0    |   2
category=DeprecationWarning only         |     0      |   0    |   0

Guide now shows three working message= recipes plus a .. warning:: explaining why module= cannot match under stacklevel=2, with a regression test pinning it.

Reload leaks class identities — reproduced exactly: after the reload, issubclass(physx_cfg.RigidBodyPropertiesCfg, schemas_cfg.RigidBodyBaseCfg) is False. Fixed by moving the check into an isolated subprocess rather than restoring the module, which removes the reload entirely and additionally covers the PhysX and Newton cfg modules. Order independence checked three ways: default, -p no:randomly, and fully reversed collection order — 87 passed each.

Concurrent calls lose warnings — now threading.local(), matching sim/utils/stage.py:24, which already uses thread-local state for the stage context these writers are scoped to. The writers are synchronous with no await points, so a ContextVar would add the token dance for no isolation gain. The test holds two threads inside a decorated writer on a barrier so the race is deterministic: with the global counter it fails expected one warning per calling thread, got 1; with thread-local it passes.

Docs build clean under -W. test_schemas_deprecation.py 87 passed, test_schemas_shim.py 142 passed; test_schemas.py has 2 failures that also reproduce on the pre-change tip.

Two things I'd flag rather than fix here: the Newton replacement lists necessarily contain PhysX fragments, because disable_gravity, max_joint_velocity and the collision offsets have no non-PhysX home today — so a Newton-only user is told to import from isaaclab_physx. I documented why, but it's an API-shape wart worth its own follow-up. And the older 2.x tendon rename shims warn without naming any fragment; that predates this PR and I left it alone.

The deprecation notices named 5.0, which came from an older package
numbering. The next major after the 3.0 release in progress is 4.0, which
is what the existing actuator deprecations and the 3.0 migration guide
already promise for this family.
Match the removal release the repository is already promising for symbols
deprecated in the 3.0 cycle: isaaclab.sh and the legacy RSL-RL configs both
name 3.1. The earlier 4.0 wording followed an older convention.
The legacy schema cfgs and writers ship deprecated in 3.1, not 3.0, which
is already in beta and cannot carry a new deprecation. Removal follows one
release later in 3.2.

Also replaces the stale 4.6.x package-version markers, which predate the
current release numbering, with the same 3.1.
@ooctipus

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 19, 2026
@ooctipus
ooctipus merged commit 5889bae into isaac-sim:develop Sep 20, 2026
83 of 84 checks passed
ooctipus added a commit that referenced this pull request Sep 20, 2026
…ters (#7839) (#7908)

## 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.

Co-authored-by: vidurv-nvidia <[email protected]>
ooctipus added a commit that referenced this pull request Sep 21, 2026
…7530, #7899) (#7926)

## Description

Backports the two changes merged into `develop` since September 19 that
are still missing from `release/3.0.0`:

| Source PR | Change | Source commit |
| --- | --- | --- |
| #7530 | Validate camera outputs against renderer capabilities before
simulator startup | `31d1c53510490c76841e9c35a329574b357d9900` |
| #7899 | Share native resources by construction cfg and centralize
ownership and teardown | `c90c3a1097a0a669a823b880b1c8d0654d7fd267` |

Includes the original regression tests, API documentation, and changelog
fragments. #7530 applied without changes. #7899 required two conflict
resolutions to retain the release branch's OVRTX mapping API,
documentation, and tests. Of its 62 files, 59 match the merged source
exactly; the other three retain those existing release additions.
Release versions, lockfile entries, compiled changelogs, and
documentation routing are preserved.

## Audit

Checked all **33 PRs** merged from September 19, 2026 00:00
America/Los_Angeles through `develop` commit `c90c3a1097` (September 20,
21:29 Pacific), against release base `75e9c8ce12`. **31 are already
backported; the remaining two are included here.** Git first-parent
history and GitHub's merged PR list agree. Automatic changelog/version
compilation remains branch-specific.

<details>
<summary>31 PRs already recorded in release</summary>

| Source PRs | Existing release commit |
| --- | --- |
| #7777, #7608, #7895, #7872, #7831, #7834, #7838, #7840, #7903, #7674 |
[`ff22c52891`](ff22c52)
|
| #7886 |
[`41bfaee5f0`](41bfaee)
|
| #7042 |
[`970d21ef48`](970d21e)
|
| #7905 |
[`f0563d1f9e`](f0563d1)
|
| #7604 |
[`dca7cfe984`](dca7cfe)
|
| #7610, #7603 |
[`5dd2220243`](5dd2220)
|
| #7839 |
[`b8b93bb96e`](b8b93bb)
|
| #6851 |
[`baa025ad90`](baa025a)
|
| #7250 |
[`f86b33e6b1`](f86b33e)
|
| #7910 |
[`24f7b4842b`](24f7b48)
|
| #7810 |
[`9738e096c8`](9738e09)
|
| #7832 |
[`be270ed88b`](be270ed)
|
| #4679 |
[`80157aa22d`](80157aa)
|
| #7914 |
[`01b59b5a22`](01b59b5)
|
| #7502 |
[`db7db61f60`](db7db61)
|
| #7918 |
[`bca9dba8bb`](bca9dba)
|
| #7919 |
[`ef1514c97c`](ef1514c)
|
| #7922 |
[`7d6979a19e`](7d6979a)
|
| #7923 |
[`a1dd560b98`](a1dd560)
|
| #7924 |
[`892e51dc1d`](892e51d)
|
| #7925 |
[`75e9c8ce12`](75e9c8c)
|

</details>

## Validation

**745 tests passed** on the combined backport:

- Core registry, configclass, replication, camera contracts, and task
presets: 158 passed.
- Newton manager/model/reset and coupling suites: 299 passed.
- OVPhysX/OVRTX lifecycle, scene data, bindings, and material contracts:
141 passed on CPU.
- Clone-plan algebra: 83 passed.
- All 8 OV CUDA cases skipped in the CPU run: 8 passed on GPU.
- OVPhysX ray-caster regression: 1 passed.
- Kit simulation-context and PhysX scene-data tests: 54 passed.
- Newton solver reset integration: 1 passed.

The registry-identity and borrowed-config-field regressions both fail
with the pre-backport implementations and pass with this change.
Backport file-scope validation, source-file comparison, `git diff
--check`, and `uv run isaaclab -f` passed.

Local validation used PyTorch 2.12.0/CUDA 13.0, Isaac Sim 6.0.1.0,
Newton 1.6.0rc1, and an RTX 5090. Existing deprecation/runtime warnings
occurred. Full Docker CI is requested separately against the pinned
environment; local checks do not claim a startup or runtime speedup.

## Checklist

- [x] Read the contribution guidelines and ran formatting/changelog
checks.
- [x] Included source tests, documentation, and changelog fragments.
- [x] Verified regression behavior and preserved release-specific
changes.
- [x] Recorded source commit hashes and audited the requested merge
window.

---------

Co-authored-by: Antoine RICHARD <[email protected]>
Co-authored-by: ooctipus <[email protected]>
ooctipus pushed a commit that referenced this pull request Sep 24, 2026
# Description

Migrates the remaining in-repo users of the legacy physics schema cfgs
to schema fragments. These classes are deprecated in 3.1 and removed in
3.2 (#7839), so every site here currently emits `DeprecationWarning`s
and would break at removal.

The earlier migration (#7838) converted `source/` but never covered
`scripts/`, and its grep missed the `*BaseCfg` spellings. On top of
that, some new legacy usage has landed since. An AST scan (comments and
docstrings excluded) finds **144 live legacy constructions or writer
calls in 37 files on `develop`. This PR brings that to 0**, outside the
deliberate exclusions listed below.

**Scope**
- **`scripts/` (29 files):** all tutorials, demos (including the MPM
demos), `convert_mesh` / `convert_instanceable`, and three benchmarks.
- **Task configs:** `core/reach/reach_env_cfg.py`,
`contrib/ur10_particle_push`, and one of the five `contrib/nist` sites.
- **Tests:** the camera-pose, first-frame-rendering and
OpenCV-distortion sensor tests; the rigid/mass/collision parts of the
cable and MPM tests; `test_ovphysx_gravity`.

## Mapping rules

Every one of these has caused a real regression in an earlier migration:
- **A bare fragment when one covers the fields.** This keeps in-place
tuning such as `cfg.rigid_props.disable_gravity = True` working
downstream.
- **Empty legacy cfgs map only to the core `UsdPhysics*` fragment.** A
fragment applies its schema even when all of its fields are `None`.
`RigidBodyPropertiesCfg()` therefore becomes `UsdPhysicsRigidBodyCfg()`
alone. Adding `PhysxRigidBodyCfg()` would add a `PhysxRigidBodyAPI` the
legacy class never applied.
- **`enabled_self_collisions` keeps its Newton mirror.** The legacy
writer also authors `newton:selfCollisionEnabled`, so these sites emit
`NewtonArticulationCfg` next to `PhysxArticulationCfg`.
- **`disable_gravity` goes to `PhysxRigidBodyCfg`**, including on
Newton-flavoured cfgs.
- **`define_*` writer calls become `apply_*(...,
create_if_missing=True)`**, which preserves creation.

## Verification

**USD-attribute parity at every site, with negative controls.** Legacy
and fragment forms are authored through the real spawners on sibling
prims, and the harness diffs `GetPrimTypeInfo().GetAppliedAPISchemas()`,
every authored attribute, and relationships.
- `scripts/`: 64 groups. 60 are identical. The other 4 differ only in
that legacy authored `physics:approximation="none"` explicitly, while
the fragment leaves it unset and it resolves to the same `"none"`. 8 of
8 negative controls are flagged.
- `source/`: every site is identical, and every negative control is
flagged.

**Task configs** are also checked end to end. Each task is loaded
through its gym `env_cfg_entry_point` on both `develop` and this branch,
across presets. All 22 affected spawned entities author identical USD,
including the nist Franka on the real asset. A task-level negative
control produces a diff.

**Execution:** 13 scripts ran headless for 100–300 steps with no schema
deprecations: the tutorials, bin_packing, multi_asset, the sensor demos,
and tacsl. `convert_mesh` was run end to end for 6 approximations. All
29 scripts compile. The migrated test files pass.

**Not runnable in the dev environment, so covered by parity only:** the
Newton-physics script paths, including the MPM demos, which need a newer
`newton` than was installed locally. Also the `omni.replicator`, ovrtx,
and Haply scripts. CI covers the rest.

## Deliberately left on the legacy API

- **Spawner, converter, and schema routing internals.** They *are* the
legacy path, which must keep working until 3.2.
- **Tests that exercise or compare the legacy path**, such as
`test_schemas*`, the parity tests, and the legacy arms of the fragment
tests.
- **`integration_scene_cfgs.py`.** It is a backend-neutral core module,
and its `disable_gravity` has no non-PhysX fragment home.
- **Everything deformable.** The deformable deprecation PR, stacked on
#6673, handles it.
- **4 of the 5 `contrib/nist` sites.** They nest a mesh-collision cfg
inside `collision_props`. The deprecation messages point users to a
spawner `mesh_collision_props` slot, but that slot exists only on
`MeshConverterCfg`, not on `UsdFileCfg` or the shape and mesh spawners.
There is no supported fragment path for these sites yet. That gap needs
its own fix before 3.2.

## Found along the way, not changed here

- `RigidBodyMaterialCfg` is deprecated too, and 8 scripts still use it.
- `convert_instanceable.py`'s mesh branch is already broken on
`develop`: it passes `collision_approximation=` to `MeshConverterCfg`,
which raises `TypeError`.
- `docs/source/how-to/write_articulation_cfg.rst` still describes the
legacy names.

## Type of change

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

## Checklist

- [x] I have read and understood the contribution guidelines
- [x] I have run the `pre-commit` checks with `./isaaclab.sh --format`
- [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
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