Repository navigation
[Backport release/3.0.0] Deprecate legacy physics schema cfgs and writers (#7839) #7908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| Deprecated | ||
| ^^^^^^^^^^ | ||
|
|
||
| * Deprecated the inheritance-based schema cfg classes in favor of the single-namespace schema | ||
| fragments. Each class now raises a ``DeprecationWarning`` on instantiation and will be removed in | ||
| 3.2. The warning names *every* fragment the class's fields need, so following it does not drop | ||
| authored properties. Replace :class:`~isaaclab.sim.schemas.MassPropertiesCfg` with | ||
| :class:`~isaaclab.sim.schemas.MassCfg`; :class:`~isaaclab.sim.schemas.RigidBodyBaseCfg` with | ||
| ``[UsdPhysicsRigidBodyCfg(...), PhysxRigidBodyCfg(...)]``; | ||
| :class:`~isaaclab.sim.schemas.CollisionBaseCfg` with | ||
| ``[UsdPhysicsCollisionCfg(...), PhysxCollisionCfg(...)]``; | ||
| :class:`~isaaclab.sim.schemas.JointDriveBaseCfg` with | ||
| ``[UsdPhysicsDriveCfg(...), PhysxJointCfg(...)]``; | ||
| :class:`~isaaclab.sim.schemas.ArticulationRootBaseCfg` with | ||
| :class:`~isaaclab_physx.sim.schemas.PhysxArticulationCfg`; and | ||
| :class:`~isaaclab.sim.schemas.MeshCollisionBaseCfg`, | ||
| :class:`~isaaclab.sim.schemas.BoundingCubePropertiesCfg` and | ||
| :class:`~isaaclab.sim.schemas.BoundingSpherePropertiesCfg` with | ||
| :class:`~isaaclab.sim.schemas.UsdPhysicsMeshCollisionCfg`. Spawner slots accept fragments | ||
| directly, so ``rigid_props=RigidBodyBaseCfg(...)`` becomes | ||
| ``rigid_props=[UsdPhysicsRigidBodyCfg(...), PhysxRigidBodyCfg(...)]``. Three legacy fields have no | ||
| fragment and move to the spawner cfg instead: ``fix_root_link``, ``ensure_drives_exist`` (both | ||
| also forwarded as arguments of | ||
| :func:`~isaaclab.sim.schemas.apply_articulation_root_properties` and | ||
| :func:`~isaaclab.sim.schemas.apply_joint_drive_properties`) and ``mesh_collision_property``, which | ||
| becomes the spawner's ``mesh_collision_props`` slot. Deformable cfgs are unaffected. | ||
| * Deprecated the ``define_*`` and ``modify_*`` schema writers in favor of the fragment-based | ||
| ``apply_*`` writers, which take a prim-path expression and a list of fragments. Each writer now | ||
| raises a ``DeprecationWarning`` when called and will be removed in 3.2. Replace | ||
| ``define_rigid_body_properties`` / ``modify_rigid_body_properties`` with | ||
| :func:`~isaaclab.sim.schemas.apply_rigid_body_properties`, and likewise for the collision, mass, | ||
| articulation-root, joint-drive, mesh-collision and tendon families. Internal delegation bypasses | ||
| the warning wrapper so each public call warns once. Use ``inspect.unwrap(writer)`` to access the | ||
| raw per-prim writer; ``modify_*.__wrapped__`` now retains subtree traversal. The deformable writers | ||
| are unaffected. | ||
| * 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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
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! |
||
There was a problem hiding this comment.
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 listsapply_mesh_collision_propertiesas the replacement for the mesh-collision writers. That function takes a singleprim_path, resolves it withstage.GetPrimAtPath, and raisesValueErroron an invalid path, so a migrated regex fails and the legacy subtree traversal is lost. Qualify this writer here and in the changelog.