Skip to content

Migrate remaining legacy schema cfg call sites to fragments - #7971

Merged
ooctipus merged 5 commits into
isaac-sim:developfrom
vidurv-nvidia:vidurv/migrate-remaining-legacy-callsites
Sep 24, 2026
Merged

ooctipus merged 5 commits into
isaac-sim:developfrom
vidurv-nvidia:vidurv/migrate-remaining-legacy-callsites

Conversation

@vidurv-nvidia

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

Copy link
Copy Markdown
Contributor

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 DeprecationWarnings 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 Add volume and surface deformable schema fragment families #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)

Release backport

  • Backport this pull request to the active release branch after it merges into develop

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • 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 tutorials still configured physics schemas through the legacy
*PropertiesCfg classes, which now emit DeprecationWarnings and are
removed in 3.2. Since users copy these scripts, switch them to the
single-namespace schema fragments.

Empty legacy cfgs map to the core UsdPhysics fragment only, so no
backend API schema is added that the legacy writers never applied.
The Dofbot articulation keeps both halves of the self-collision
setting: PhysxArticulationCfg and NewtonArticulationCfg, matching the
Newton attribute the legacy writer mirrored.

(cherry picked from commit c356dbf)
The demos configured physics schemas through the deprecated
*PropertiesCfg classes and, in bin_packing and teapot_fill, called the
deprecated define_* writers directly. Switch them to schema fragments
and the apply_*_properties writers.

Each field moves to the fragment of the USD namespace that owns it:
disable_gravity and the solver/damping knobs to PhysxRigidBodyCfg,
contact margins to NewtonCollisionCfg, and self-collision to both
PhysxArticulationCfg and NewtonArticulationCfg. Empty legacy cfgs map
to the core UsdPhysics fragment only, and mesh approximations use
UsdPhysicsMeshCollisionCfg, so no backend API schema is added that the
legacy writers never applied. The define_* calls become apply_* calls
with create_if_missing=True, which also applies the defining API.

The teapot_fill kitchen visuals only disable physics the asset already
carries, so they use explicit target mappings: a user-supplied asset
without physics keeps no body, as before.

(cherry picked from commit 84a6e96)
The mesh conversion tools and the view/raycast benchmarks built their
physics schemas from the deprecated *PropertiesCfg classes. Switch them
to schema fragments.

convert_mesh now maps each collision approximation choice to its
physics:approximation token on UsdPhysicsMeshCollisionCfg. The legacy
cooking cfgs were default-constructed, which authors only that token,
so this keeps the converted USD free of PhysX cooking schemas the tool
never applied. For triangleMesh the "none" token is now left at its
schema fallback rather than authored; the resolved value is unchanged.

(cherry picked from commit 2b040e8)
The reach table collider, the UR10 particle-push colliders, and the
NIST factory Newton Franka rigid-body properties still used the
deprecated legacy schema cfgs, which warn today and are removed in 3.2.
Replace them with the fragments that own each field:

- CollisionBaseCfg() -> UsdPhysicsCollisionCfg()
- NewtonCollisionPropertiesCfg(collision_enabled, contact_margin,
  contact_gap) -> [UsdPhysicsCollisionCfg(collision_enabled),
  NewtonCollisionCfg(contact_margin, contact_gap)]
- MujocoRigidBodyPropertiesCfg(gravcomp=1.0)
  -> MujocoRigidBodyCfg(gravcomp=1.0)

The authored USD is unchanged: spawning each entity from the develop
and the migrated task cfgs yields identical applied schemas and
attribute values.

The NIST collision sites stay on the legacy cfgs. Their nested mesh
collision approximation and Newton SDF cooking attributes live on
mesh-collision fragments, and the USD file spawner has no slot that
reaches the same collider prims with them.

(cherry picked from commit dae234d)
Several sensor, asset, and physics tests still spawned their helper
bodies with the deprecated legacy schema cfgs. Replace them with the
fragments that author the same USD:

- empty RigidBodyBaseCfg / RigidBodyPropertiesCfg /
  PhysxRigidBodyPropertiesCfg -> UsdPhysicsRigidBodyCfg()
- MassPropertiesCfg(mass=m) -> MassCfg(mass=m)
- empty CollisionBaseCfg / CollisionPropertiesCfg /
  PhysxCollisionPropertiesCfg -> UsdPhysicsCollisionCfg()
- NewtonRigidBodyPropertiesCfg(rigid_body_enabled, kinematic_enabled,
  disable_gravity) -> [UsdPhysicsRigidBodyCfg(rigid_body_enabled,
  kinematic_enabled), PhysxRigidBodyCfg(disable_gravity)]
- NewtonCollisionPropertiesCfg(collision_enabled=True)
  -> UsdPhysicsCollisionCfg(collision_enabled=True)

Empty legacy cfgs applied only the UsdPhysics anchor schema, so the
replacements deliberately avoid the PhysX and Newton fragments, which
would add their applied schemas.

(cherry picked from commit 0010f2d)
@vidurv-nvidia
vidurv-nvidia requested a review from a team September 23, 2026 05:19
@vidurv-nvidia vidurv-nvidia added the ci:run-docker Trigger the on-demand Docker and GPU CI workflow label Sep 23, 2026
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Sep 23, 2026
@greptile-apps

greptile-apps Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable regressions were established in the migrated schema configurations.

Summary

This PR migrates remaining scripts, task configurations, and tests from deprecated aggregate physics-schema configurations to composable schema fragments.

  • Splits backend-neutral and backend-specific fields into the appropriate USD Physics, PhysX, Newton, and MuJoCo fragments.
  • Preserves schema creation in custom spawners through fragment-family apply_* writers.
  • Updates mesh conversion approximation routing and task-facing changelog documentation.
  • Migrates affected test fixtures without changing their intended physics setup.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[Legacy aggregate schema cfg] --> B{Field ownership}
    B --> C[USD Physics fragment]
    B --> D[PhysX fragment]
    B --> E[Newton or MuJoCo fragment]
    C --> F[Spawner schema-family writer]
    D --> F
    E --> F
    F --> G[Apply core API if required]
    G --> H[Author backend-specific attributes]
    H --> I[Equivalent spawned USD physics configuration]
Loading

Reviews (1) · Last reviewed commit: "Migrate test scene configs to schema fra..."

@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 migration generally preserves legacy schema behavior across scripts, tasks, converters, and tests, but one Newton MPM bath-collider migration omits the core USD collision fragment that the legacy configuration applied.

  • Design and architecture: The fragment split is otherwise applied consistently: bare fragments are used for single-schema ownership, lists combine core and backend fragments, explicit target mappings avoid creating physics on file-spawned visuals, and writer migrations preserve creation semantics. The bath-collider configuration is inconsistent with this pattern.
  • API: No public API definition is removed or renamed. Task configuration slots that now contain multiple fragments have corresponding migration guidance explaining that callers must select the owning fragment before tuning its fields.
  • Implementation: In newton_mpm_twoway_coupling.py, bath_collider replaces NewtonCollisionPropertiesCfg(contact_margin=...) with NewtonCollisionCfg alone. Comparable migrations in this patch pair NewtonCollisionCfg with UsdPhysicsCollisionCfg, so this site may stop authoring UsdPhysicsCollisionAPI and lose collider behavior. Add the core collision fragment alongside the Newton fragment.

Minor fixes needed. Posted 1 actionable finding inline.

Automated review; human maintainers own approval decisions.

),
size=size,
collision_props=sim_utils.NewtonCollisionPropertiesCfg(contact_margin=COLLIDER_MARGIN),
collision_props=NewtonCollisionCfg(contact_margin=COLLIDER_MARGIN),

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 · Implementation — Bath collider may lose core collision schema

Elsewhere in this diff the legacy Newton collision cfg maps to the core fragment plus the Newton one (line 207 maps an empty cfg to UsdPhysicsCollisionCfg(); granular and teapot_fill emit both). Here only NewtonCollisionCfg(contact_margin=...) is emitted, so the UsdPhysicsCollisionAPI the legacy class applied may no longer be authored, leaving the bath and chute panels without a collider. Pair it with UsdPhysicsCollisionCfg() as at the other sites.

@ooctipus
ooctipus merged commit 1370bb6 into isaac-sim:develop Sep 24, 2026
54 checks passed
ooctipus pushed a commit to ooctipus/IsaacLab that referenced this pull request Sep 24, 2026
…m#7971)

Backport the merged change unchanged to release/3.0.0.

(cherry picked from commit 1370bb6)
ooctipus added a commit that referenced this pull request Sep 24, 2026
…#7536, #7971) (#7993)

## Description

Backports two merged changes to `release/3.0.0`:

- #7536 — Move external wrench frame selection into `WrenchComposer`
(`726f045a7dd2052311bf64099b096391468f0292`). Avoid unnecessary pose
reads and composition for local wrenches and supported world-frame
wrenches at the center of mass; preserve current-pose composition for
mixed or positioned global forces. Includes the PhysX, Newton, and
OvPhysX writers and regression tests.
- #7971 — Migrate remaining legacy schema configuration call sites to
fragments (`1370bb6f7ce1ab57b8939dd9e9b8bfde6f425000`). Updates
tutorials, demos, conversion tools, benchmarks, task configurations, and
test fixtures while retaining the original migration's exclusions.

Both backports apply unchanged, with no conflicts. All source changelog
fragments are included.

## Validation

- #7536: 375 composer tests and 24 backend writer tests passed before
adding #7971.
- #7971: 9 schema parity tests, 14 schema fragment tests, and the
OvPhysX gravity integration test passed on the combined branch.
- All 38 Python files changed by #7971 compile; the migrated NIST, UR10
particle-push, and reach task configurations import and instantiate
successfully.
- `uv run --no-sync isaaclab -f` and `git diff --check` passed on the
combined branch.
- Full Docker/GPU CI requested for the updated head.

---------

Co-authored-by: Antoine RICHARD <antoiner@nvidia.com>
Co-authored-by: vidurv-nvidia <vidurv@nvidia.com>
@ooctipus ooctipus self-assigned this Sep 25, 2026
@ooctipus ooctipus added this to the Isaac Lab 3.0 GA milestone Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run-docker Trigger the on-demand Docker and GPU CI workflow isaac-lab Related to Isaac Lab team

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants