Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
bc714ac
Refactor schema cfgs to separate solver-common from PhysX-specific fi…
vidurv-nvidia Apr 15, 2026
7aa505d
Address review feedback on schema refactor
vidurv-nvidia Apr 15, 2026
591cf40
Relocate PhysX schema cfgs to isaaclab_physx
vidurv-nvidia Apr 30, 2026
6192fee
Add submodule-level shim for relocated PhysX schema cfgs
vidurv-nvidia Apr 30, 2026
b440df7
Rebalance schema-cfg placement; fix schema-app gating
vidurv-nvidia May 5, 2026
4e2ce6e
Address review: clarify base-class metadata exception
vidurv-nvidia May 5, 2026
c9c578c
Migrate PR A changelog to fragment-based system
vidurv-nvidia May 5, 2026
c10d809
Split RigidBodyMaterialCfg into base + PhysX subclass
vidurv-nvidia May 5, 2026
24c4351
Split CollisionPropertiesCfg; rename deformable alias
vidurv-nvidia May 5, 2026
421535b
Split ArticulationRootPropertiesCfg into base + PhysX subclass
vidurv-nvidia May 5, 2026
5a1e300
Split MeshCollisionPropertiesCfg family
vidurv-nvidia May 5, 2026
8f08bbe
Relocate tendon cfgs to isaaclab_physx
vidurv-nvidia May 5, 2026
dd6288d
Refactor schema cfgs to use exception-table for PhysX overrides
vidurv-nvidia May 5, 2026
acb418f
Rename max_velocity to max_joint_velocity; drop _usd_attr_name_map
vidurv-nvidia May 5, 2026
0e8351e
Rename max_effort to max_force; drop cfg_to_usd_map
vidurv-nvidia May 5, 2026
c31a770
Route cfg fields per declaring class; collapse typed-API loops
vidurv-nvidia May 6, 2026
e0312cc
Address Octi review nits
vidurv-nvidia May 6, 2026
8a98d98
Rename changelog fragments to .minor.rst tier
vidurv-nvidia May 6, 2026
915dd1d
Revert direct CHANGELOG.rst and extension.toml edits
vidurv-nvidia May 6, 2026
fbde2f9
Merge branch 'develop' into vidur/feature/usd-proprties-refactor
ooctipus May 6, 2026
ca9122e
Add skip fragment for isaaclab_newton
vidurv-nvidia May 6, 2026
9c2bd6c
Add MuJoCo gravity compensation schema classes
vidurv-nvidia Apr 15, 2026
e00f5ac
Add gravcomp docstrings, auto-enable body gravcomp, and schema tests
vidurv-nvidia Apr 15, 2026
e0ab910
Update modify function docstrings to list all supported cfg types
vidurv-nvidia Apr 15, 2026
9b34dc5
Rename MuJoCo gravcomp fields to follow snake=camelCase convention
vidurv-nvidia May 7, 2026
70e41b5
Relocate MuJoCo cfgs to isaaclab_newton; add Newton schema cfgs
vidurv-nvidia May 7, 2026
a04ae72
Add missing __init__.py for isaaclab_newton.sim.schemas package
vidurv-nvidia May 7, 2026
7f2ddcc
Add Newton and MuJoCo schema cfg tests in isaaclab_newton
vidurv-nvidia May 7, 2026
1b012a7
Add stub file for isaaclab_newton.sim.schemas public API
vidurv-nvidia May 7, 2026
34adc18
Add changelog fragments for PR 5276
vidurv-nvidia May 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions source/isaaclab/changelog.d/vidur-add-mujoco-gravcomp.minor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Changed
^^^^^^^

* Deprecated :attr:`~isaaclab_newton.sim.schemas.MujocoRigidBodyPropertiesCfg.gravity_compensation_scale`
in favour of :attr:`~isaaclab_newton.sim.schemas.MujocoRigidBodyPropertiesCfg.gravcomp`. Forwarded
via ``__post_init__``. Removal in 5.0.
* Deprecated :attr:`~isaaclab_newton.sim.schemas.MujocoJointDrivePropertiesCfg.gravity_compensation`
in favour of :attr:`~isaaclab_newton.sim.schemas.MujocoJointDrivePropertiesCfg.actuatorgravcomp`.
Forwarded via ``__post_init__``. Removal in 5.0.
* Relocated :class:`MujocoRigidBodyPropertiesCfg` and :class:`MujocoJointDrivePropertiesCfg`
to :mod:`isaaclab_newton.sim.schemas`. Forwarding shims on :mod:`isaaclab.sim.schemas` and
:mod:`isaaclab.sim` preserve existing imports. Shims scheduled for removal in 5.0.
27 changes: 27 additions & 0 deletions source/isaaclab/changelog.d/vidur-cfg-exception-table.minor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Changed
^^^^^^^

* Cleaned up the schema-cfg base classes to no longer carry PhysX namespace metadata.
:class:`~isaaclab.sim.schemas.RigidBodyBaseCfg`,
:class:`~isaaclab.sim.schemas.CollisionBaseCfg`,
:class:`~isaaclab.sim.schemas.ArticulationRootBaseCfg`, and
:class:`~isaaclab.sim.schemas.JointDriveBaseCfg` now declare ``_usd_namespace = None`` and
``_usd_applied_schema = None``. Per-field PhysX overrides for fields whose only USD path
today is the ``physx*:*`` namespace (``disable_gravity``, ``contact_offset``,
``rest_offset``, ``articulation_enabled``, ``max_velocity``) are declared via a new
``_usd_field_exceptions`` mapping ``applied_schema -> (namespace, {cfg_field: usd_attr})``.
When any listed field is non-None at write time, the writer applies that schema and writes
the attribute under the exception namespace; otherwise the schema is not stamped onto the
prim. PhysX subclasses (:class:`PhysxRigidBodyPropertiesCfg`,
:class:`PhysxCollisionPropertiesCfg`, :class:`PhysxArticulationRootPropertiesCfg`,
:class:`PhysxJointDrivePropertiesCfg`) now self-declare ``_usd_namespace`` and
``_usd_applied_schema`` for their own fields. Observable behavior on standard inputs is
unchanged.
* Consolidated the per-writer schema-application loop in
:mod:`isaaclab.sim.schemas` into a single shared helper ``_apply_namespaced_schemas``.
``modify_articulation_root_properties``, ``modify_rigid_body_properties``,
``modify_collision_properties``, ``modify_joint_drive_properties``,
``modify_mesh_collision_properties``, and ``spawn_rigid_body_material`` all delegate to the
helper after writing their typed-API ``UsdPhysics`` fields. The canonical exception-table
+ main-namespace gating logic now lives in one place instead of being duplicated across
six call sites.
122 changes: 122 additions & 0 deletions source/isaaclab/changelog.d/vidur-rebalance-cfg-placement.minor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
Added
^^^^^

* Added :class:`~isaaclab.sim.spawners.materials.RigidBodyMaterialBaseCfg`, the solver-common
base class for rigid-body physics materials. Carries the ``UsdPhysics.MaterialAPI`` standard
fields (``static_friction``, ``dynamic_friction``, ``restitution``). The PhysX-specific
compliant-contact and combine-mode fields moved to
:class:`~isaaclab_physx.sim.spawners.materials.PhysxRigidBodyMaterialCfg`.
* Added :class:`~isaaclab.sim.schemas.CollisionBaseCfg`, the solver-common base class for
collision properties. Carries :attr:`collision_enabled` (``UsdPhysics.CollisionAPI``) plus
:attr:`contact_offset` and :attr:`rest_offset` whose USD attributes are PhysX-namespaced
but are consumed by Newton's importer via the PhysX bridge resolver
(``import_usd.py:2104, 2111``).
* Added :class:`~isaaclab.sim.schemas.ArticulationRootBaseCfg`, the solver-common base class
for articulation root properties (``fix_root_link``, ``articulation_enabled``).
* Added :class:`~isaaclab.sim.schemas.MeshCollisionBaseCfg`, the solver-common base class for
mesh collision properties carrying ``mesh_approximation_name`` (writes
``physics:approximation`` via :class:`UsdPhysics.MeshCollisionAPI`). The class-level
``_usd_applied_schema`` metadata replaces the deprecated ``usd_api`` / ``physx_api``
instance-field dispatch.

Changed
^^^^^^^

* Moved the ``max_velocity`` field from :class:`~isaaclab_physx.sim.schemas.PhysxJointDrivePropertiesCfg`
to :class:`~isaaclab.sim.schemas.JointDriveBaseCfg`. The field is the only USD path to set
Newton's ``Model.joint_velocity_limit`` and is consumed by Newton's importer. The USD
attribute written is unchanged (``physxJoint:maxJointVelocity``); existing code using
``PhysxJointDrivePropertiesCfg(max_velocity=...)`` continues to work because the field
is inherited.
* Moved the ``disable_gravity`` field from :class:`~isaaclab_physx.sim.schemas.PhysxRigidBodyPropertiesCfg`
to :class:`~isaaclab.sim.schemas.RigidBodyBaseCfg`. PhysX honors per-body via
``physxRigidBody:disableGravity``; Newton currently honors at scene level (partial),
documented in the field docstring. Existing code using
``PhysxRigidBodyPropertiesCfg(disable_gravity=...)`` continues to work via inheritance.
* Documented :attr:`~isaaclab.sim.schemas.ArticulationRootPropertiesCfg.articulation_enabled`
and :attr:`~isaaclab.sim.schemas.ArticulationRootPropertiesCfg.enabled_self_collisions`
to lock their placement for the future :class:`ArticulationRootBaseCfg` /
``PhysxArticulationRootPropertiesCfg`` split: ``articulation_enabled`` stays on the base
(single-namespace USD with verified Newton consumer); ``enabled_self_collisions`` moves
to the PhysX subclass (dual-namespace USD, with a future Newton sibling cfg owning the
``newton:*`` namespace).
* Changed the defaults of :attr:`~isaaclab_physx.sim.spawners.materials.PhysxRigidBodyMaterialCfg.compliant_contact_stiffness`,
:attr:`compliant_contact_damping`, :attr:`friction_combine_mode`, and
:attr:`restitution_combine_mode` from concrete values (``0.0``, ``0.0``, ``"average"``,
``"average"``) to ``None``. PhysX engine defaults match the previous concrete values, so
user-observable simulation behavior is unchanged; the difference is that these attributes
are now authored on the prim only when the user explicitly sets them (consistent with the
rest of the consumption-gated cfg layer).
* Relocated :class:`RigidBodyMaterialCfg` to :mod:`isaaclab_physx.sim.spawners.materials` and
split its fields between the new :class:`~isaaclab.sim.spawners.materials.RigidBodyMaterialBaseCfg`
(UsdPhysics-standard friction/restitution) and
:class:`~isaaclab_physx.sim.spawners.materials.PhysxRigidBodyMaterialCfg`
(PhysX-specific compliant-contact and combine-mode fields). A forwarding shim on
:mod:`isaaclab.sim.spawners.materials` and :mod:`isaaclab.sim` preserves existing imports.
* Refactored :func:`~isaaclab.sim.spawners.materials.spawn_rigid_body_material` to be
metadata-driven: it reads ``_usd_applied_schema``, ``_usd_namespace``, and
``_usd_attr_name_map`` from the cfg class and gates ``PhysxMaterialAPI`` application on
whether the user authored at least one PhysX-namespaced field with a non-``None`` value.
Previously, the writer applied ``PhysxMaterialAPI`` unconditionally on every material spawn.
* Relocated :class:`CollisionPropertiesCfg` to :mod:`isaaclab_physx.sim.schemas` and split
its fields between the new :class:`~isaaclab.sim.schemas.CollisionBaseCfg` (solver-common
``collision_enabled`` plus the PhysX-namespaced but Newton-consumed
``contact_offset`` / ``rest_offset``) and
:class:`~isaaclab_physx.sim.schemas.PhysxCollisionPropertiesCfg` (PhysX-only
``torsional_patch_radius`` / ``min_torsional_patch_radius``). A forwarding shim on
:mod:`isaaclab.sim.schemas`, :mod:`isaaclab.sim.schemas.schemas_cfg`, and
:mod:`isaaclab.sim` preserves existing imports.
* Refactored :func:`~isaaclab.sim.schemas.modify_collision_properties` to be metadata-driven
and to gate ``PhysxCollisionAPI`` application on whether the user authored at least one
PhysX-namespaced field with a non-``None`` value. Previously, the writer applied
``PhysxCollisionAPI`` unconditionally on every collision prim, stamping the schema onto
Newton-targeted prims that only set ``collision_enabled``.
* Relocated :class:`ArticulationRootPropertiesCfg` to :mod:`isaaclab_physx.sim.schemas` and
split its fields between the new :class:`~isaaclab.sim.schemas.ArticulationRootBaseCfg`
(solver-common ``fix_root_link`` plus the PhysX-namespaced ``articulation_enabled`` which
is consumed by the IL Newton wrapper as a spawn-time guard) and
:class:`~isaaclab_physx.sim.schemas.PhysxArticulationRootPropertiesCfg`
(``enabled_self_collisions`` and PhysX TGS solver iter / sleep / stabilization thresholds).
A forwarding shim on :mod:`isaaclab.sim.schemas`,
:mod:`isaaclab.sim.schemas.schemas_cfg`, and :mod:`isaaclab.sim` preserves existing imports.
* Refactored :func:`~isaaclab.sim.schemas.modify_articulation_root_properties` to be
metadata-driven and to gate ``PhysxArticulationAPI`` application on whether the user
authored at least one PhysX-namespaced field with a non-``None`` value. Previously, the
writer applied ``PhysxArticulationAPI`` unconditionally on every articulation root,
stamping the schema onto Newton-targeted prims that only set ``fix_root_link``.
* Relocated :class:`MeshCollisionPropertiesCfg`, :class:`ConvexHullPropertiesCfg`,
:class:`ConvexDecompositionPropertiesCfg`, :class:`TriangleMeshPropertiesCfg`,
:class:`TriangleMeshSimplificationPropertiesCfg`, and :class:`SDFMeshPropertiesCfg` to
:mod:`isaaclab_physx.sim.schemas`. :class:`BoundingCubePropertiesCfg` and
:class:`BoundingSpherePropertiesCfg` stay in core because they author no PhysX schema.
A forwarding shim preserves existing imports.
* Refactored :func:`~isaaclab.sim.schemas.modify_mesh_collision_properties` to be
metadata-driven. The writer now reads ``_usd_applied_schema`` and ``_usd_namespace`` from
the cfg class instead of consulting instance-level ``usd_api`` / ``physx_api`` fields.
The standard :class:`UsdPhysics.MeshCollisionAPI` is always applied; PhysX cooking
schemas (``PhysxConvexHullCollisionAPI`` etc.) are gated on at least one
PhysX-namespaced tuning field being set.
* Relocated :class:`FixedTendonPropertiesCfg` and :class:`SpatialTendonPropertiesCfg` to
:mod:`isaaclab_physx.sim.schemas` as :class:`PhysxFixedTendonPropertiesCfg` and
:class:`PhysxSpatialTendonPropertiesCfg`. Tendons are a PhysX-only feature; no Newton
equivalent exists. A forwarding shim on :mod:`isaaclab.sim.schemas`,
:mod:`isaaclab.sim.schemas.schemas_cfg`, and :mod:`isaaclab.sim` preserves existing
imports.

Deprecated
^^^^^^^^^^

* Deprecated the ``usd_api`` and ``physx_api`` instance attributes on the mesh-collision
cfg classes in favor of class-level ``_usd_applied_schema`` metadata. Reading these
attributes still works through one minor version but emits a ``DeprecationWarning``.
Scheduled for removal in 5.0.

Fixed
^^^^^

* Fixed :meth:`~isaaclab.sim.schemas.modify_joint_drive_properties` and
:meth:`~isaaclab.sim.schemas.modify_rigid_body_properties` so that ``PhysxJointAPI`` and
``PhysxRigidBodyAPI`` are applied only when the user authored at least one PhysX-namespaced
field with a non-``None`` value. Previously, schema application was gated on class-level
metadata being defined, which caused Newton-targeted prims to receive PhysX schemas even
when the user only set base ``UsdPhysics``-standard fields.
91 changes: 90 additions & 1 deletion source/isaaclab/isaaclab/sim/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,93 @@

from isaaclab.utils.module import lazy_export

lazy_export()
_stub_getattr, _stub_dir, __all__ = lazy_export()

# Names that moved out of this package into ``isaaclab_physx.sim.schemas``.
# Resolved lazily on first access so importing ``isaaclab.sim`` does not
# require ``isaaclab_physx`` to be installed.
_PHYSX_FORWARDS_SCHEMAS = frozenset({
"RigidBodyPropertiesCfg",
"JointDrivePropertiesCfg",
"PhysxRigidBodyPropertiesCfg",
"PhysxJointDrivePropertiesCfg",
"CollisionPropertiesCfg",
"PhysxCollisionPropertiesCfg",
"PhysXCollisionPropertiesCfg",
"PhysxDeformableCollisionPropertiesCfg",
"ArticulationRootPropertiesCfg",
"PhysxArticulationRootPropertiesCfg",
"MeshCollisionPropertiesCfg",
"ConvexHullPropertiesCfg",
"ConvexDecompositionPropertiesCfg",
"TriangleMeshPropertiesCfg",
"TriangleMeshSimplificationPropertiesCfg",
"SDFMeshPropertiesCfg",
"PhysxConvexHullPropertiesCfg",
"PhysxConvexDecompositionPropertiesCfg",
"PhysxTriangleMeshPropertiesCfg",
"PhysxTriangleMeshSimplificationPropertiesCfg",
"PhysxSDFMeshPropertiesCfg",
"FixedTendonPropertiesCfg",
"SpatialTendonPropertiesCfg",
"PhysxFixedTendonPropertiesCfg",
"PhysxSpatialTendonPropertiesCfg",
})

# Names that moved out of this package into ``isaaclab_physx.sim.spawners.materials``.
_PHYSX_FORWARDS_MATERIALS = frozenset({
"RigidBodyMaterialCfg",
"PhysxRigidBodyMaterialCfg",
})

_PHYSX_FORWARDS = _PHYSX_FORWARDS_SCHEMAS | _PHYSX_FORWARDS_MATERIALS

# Names that moved out of this package into ``isaaclab_newton.sim.schemas``.
# Resolved lazily on first access so importing ``isaaclab.sim`` does not
# require ``isaaclab_newton`` to be installed.
_NEWTON_FORWARDS = frozenset({
"MujocoRigidBodyPropertiesCfg",
"MujocoJointDrivePropertiesCfg",
"NewtonCollisionPropertiesCfg",
"NewtonMeshCollisionPropertiesCfg",
"NewtonMaterialPropertiesCfg",
"NewtonArticulationRootPropertiesCfg",
})


def __getattr__(name):
if name in _PHYSX_FORWARDS_SCHEMAS:
try:
from isaaclab_physx.sim.schemas import schemas_cfg as _physx_cfg
except ImportError as e:
raise ImportError(
f"'isaaclab.sim.{name}' has moved to 'isaaclab_physx.sim.schemas'."
" Install the isaaclab_physx extension or update your import. This forwarding"
" shim is scheduled for removal in 5.0."
) from e
return getattr(_physx_cfg, name)
if name in _PHYSX_FORWARDS_MATERIALS:
try:
from isaaclab_physx.sim.spawners.materials import physics_materials_cfg as _physx_mat_cfg
except ImportError as e:
raise ImportError(
f"'isaaclab.sim.{name}' has moved to 'isaaclab_physx.sim.spawners.materials'."
" Install the isaaclab_physx extension or update your import. This forwarding"
" shim is scheduled for removal in 5.0."
) from e
return getattr(_physx_mat_cfg, name)
if name in _NEWTON_FORWARDS:
try:
from isaaclab_newton.sim.schemas import schemas_cfg as _newton_cfg
except ImportError as e:
raise ImportError(
f"'isaaclab.sim.{name}' has moved to 'isaaclab_newton.sim.schemas'."
" Install the isaaclab_newton extension or update your import. This forwarding"
" shim is scheduled for removal in 5.0."
) from e
return getattr(_newton_cfg, name)
return _stub_getattr(name)


def __dir__():
return sorted(set(_stub_dir()) | _PHYSX_FORWARDS | _NEWTON_FORWARDS)
30 changes: 24 additions & 6 deletions source/isaaclab/isaaclab/sim/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,22 @@ __all__ = [
"ArticulationRootPropertiesCfg",
"BoundingCubePropertiesCfg",
"BoundingSpherePropertiesCfg",
"CollisionPropertiesCfg",
"CollisionBaseCfg",
"ConvexDecompositionPropertiesCfg",
"ConvexHullPropertiesCfg",
"FixedTendonPropertiesCfg",
"JointDrivePropertiesCfg",
"JointDriveBaseCfg",
"MassPropertiesCfg",
"MeshCollisionPropertiesCfg",
"RigidBodyPropertiesCfg",
"MujocoJointDrivePropertiesCfg",
"MujocoRigidBodyPropertiesCfg",
"NewtonArticulationRootPropertiesCfg",
"NewtonCollisionPropertiesCfg",
"NewtonMaterialPropertiesCfg",
"NewtonMeshCollisionPropertiesCfg",
"PhysxJointDrivePropertiesCfg",
"PhysxRigidBodyPropertiesCfg",
"RigidBodyBaseCfg",
"SDFMeshPropertiesCfg",
"SpatialTendonPropertiesCfg",
"TriangleMeshPropertiesCfg",
Expand Down Expand Up @@ -202,19 +210,29 @@ from .schemas import (
ArticulationRootPropertiesCfg,
BoundingCubePropertiesCfg,
BoundingSpherePropertiesCfg,
CollisionPropertiesCfg,
CollisionBaseCfg,
ConvexDecompositionPropertiesCfg,
ConvexHullPropertiesCfg,
FixedTendonPropertiesCfg,
JointDrivePropertiesCfg,
JointDriveBaseCfg,
MassPropertiesCfg,
MeshCollisionPropertiesCfg,
RigidBodyPropertiesCfg,
PhysxJointDrivePropertiesCfg,
PhysxRigidBodyPropertiesCfg,
RigidBodyBaseCfg,
SDFMeshPropertiesCfg,
SpatialTendonPropertiesCfg,
TriangleMeshPropertiesCfg,
TriangleMeshSimplificationPropertiesCfg,
)

# Forwarded to isaaclab_newton.sim.schemas via __getattr__ shim
MujocoJointDrivePropertiesCfg = ...
MujocoRigidBodyPropertiesCfg = ...
NewtonArticulationRootPropertiesCfg = ...
NewtonCollisionPropertiesCfg = ...
NewtonMaterialPropertiesCfg = ...
NewtonMeshCollisionPropertiesCfg = ...
from .spawners import (
SpawnerCfg,
RigidObjectSpawnerCfg,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class MeshConverterCfg(AssetConverterBaseCfg):
If None, then no mass properties will be added.
"""

rigid_props: schemas_cfg.RigidBodyPropertiesCfg = None
rigid_props: schemas_cfg.RigidBodyBaseCfg = None
"""Rigid body properties to apply to the USD. Defaults to None.

Note:
Expand All @@ -32,7 +32,7 @@ class MeshConverterCfg(AssetConverterBaseCfg):
Note:
If None, then no collision properties will be added.
"""
mesh_collision_props: schemas_cfg.MeshCollisionPropertiesCfg = None
mesh_collision_props: schemas_cfg.MeshCollisionBaseCfg = None
"""Mesh approximation properties to apply to all collision meshes in the USD.
Note:
If None, then no mesh approximation properties will be added.
Expand Down
Loading
Loading