Repository navigation
Conversation
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)
|
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
🟡 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.
…#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>
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 coveredscripts/, and its grep missed the*BaseCfgspellings. 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 ondevelop. 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.core/reach/reach_env_cfg.py,contrib/ur10_particle_push, and one of the fivecontrib/nistsites.test_ovphysx_gravity.Mapping rules
Every one of these has caused a real regression in an earlier migration:
cfg.rigid_props.disable_gravity = Trueworking downstream.UsdPhysics*fragment. A fragment applies its schema even when all of its fields areNone.RigidBodyPropertiesCfg()therefore becomesUsdPhysicsRigidBodyCfg()alone. AddingPhysxRigidBodyCfg()would add aPhysxRigidBodyAPIthe legacy class never applied.enabled_self_collisionskeeps its Newton mirror. The legacy writer also authorsnewton:selfCollisionEnabled, so these sites emitNewtonArticulationCfgnext toPhysxArticulationCfg.disable_gravitygoes toPhysxRigidBodyCfg, including on Newton-flavoured cfgs.define_*writer calls becomeapply_*(..., 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 authoredphysics: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_pointon bothdevelopand 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_meshwas 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
newtonthan was installed locally. Also theomni.replicator, ovrtx, and Haply scripts. CI covers the rest.Deliberately left on the legacy API
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 itsdisable_gravityhas no non-PhysX fragment home.contrib/nistsites. They nest a mesh-collision cfg insidecollision_props. The deprecation messages point users to a spawnermesh_collision_propsslot, but that slot exists only onMeshConverterCfg, not onUsdFileCfgor 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
RigidBodyMaterialCfgis deprecated too, and 8 scripts still use it.convert_instanceable.py's mesh branch is already broken ondevelop: it passescollision_approximation=toMeshConverterCfg, which raisesTypeError.docs/source/how-to/write_articulation_cfg.rststill describes the legacy names.Type of change
Release backport
developChecklist
pre-commitchecks with./isaaclab.sh --formatsource/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.mdor my name already exists there