isaaclab.sim.schemas#
Sub-module containing utilities for schemas used in Omniverse.
We wrap the USD schemas for PhysX and USD Physics in a more convenient API for setting the parameters from Python. This is done so that configuration objects can define the schema properties to set and make it easier to tune the physics parameters without requiring to open Omniverse Kit and manually set the parameters into the respective USD attributes.
Caution
Schema properties cannot be applied on prims that are prototypes as they are read-only prims. This particularly affects instanced assets where some of the prims (usually the visual and collision meshes) are prototypes so that the instancing can be done efficiently.
In such cases, it is assumed that the prototypes have sim-ready properties on them that don’t need to be modified. Trying to set properties into prototypes will throw a warning saying that the prim is a prototype and the properties cannot be set.
The schemas are defined in the following links:
Locally, the schemas are defined in the following files:
_isaac_sim/extsPhysics/omni.usd.schema.physics/plugins/UsdPhysics/resources/UsdPhysics/schema.usda_isaac_sim/extsPhysics/omni.usd.schema.physx/plugins/PhysxSchema/resources/generatedSchema.usda
Classes
Deprecated: use |
|
Deprecated: use |
|
Deprecated: use |
|
Properties to define explicit mass properties of a rigid body. |
|
Deprecated: use |
|
Deprecated: use |
Functions
|
Apply the articulation root schema on the input prim and set its properties. |
|
Modify PhysX parameters for an articulation root prim. |
|
Apply the rigid body schema on the input prim and set its properties. |
|
Modify PhysX parameters for a rigid body prim. |
|
Activate the contact sensor on all rigid bodies under a specified prim path. |
|
Apply the collision schema on the input prim and set its properties. |
|
Modify PhysX properties of collider prim. |
|
Apply the mass schema on the input prim and set its properties. |
|
Set properties for the mass of a rigid body prim. |
|
Modify PhysX parameters for a joint prim. |
|
Modify PhysX parameters for a fixed tendon attachment prim. |
Articulation Root#
- class isaaclab.sim.schemas.ArticulationRootPropertiesCfg[source]#
Deprecated: use
PhysxArticulationRootPropertiesCfgor the solver-common base class.Use
PhysxArticulationRootPropertiesCfgfor PhysX-specific properties orArticulationRootBaseCfgfor solver-common properties only.Deprecated since version 4.6.24:
ArticulationRootPropertiesCfghas been split intoArticulationRootBaseCfg(solver-commonfix_root_linkand the PhysX-namespaced but IL-Newton-consumedarticulation_enabled) andPhysxArticulationRootPropertiesCfg(PhysX-specific self-collisions, TGS solver iter / sleep / stabilization thresholds) and relocated toisaaclab_physx.sim.schemas. This alias preserves backwards compatibility and is scheduled for removal in 5.0.Attributes:
Whether to enable or disable the articulation.
Whether to fix the root link of the articulation.
Whether self-collisions between bodies in the same articulation are enabled.
Solver position iteration counts for the body.
Solver velocity iteration counts for the body.
Mass-normalized kinetic energy threshold below which an actor may go to sleep.
The mass-normalized kinetic energy threshold below which an articulation may participate in stabilization.
- articulation_enabled: bool | None#
Whether to enable or disable the articulation.
PhysX honors this per-articulation at sim time via
physxArticulation:articulationEnabled: setting False makes PhysX skip the articulation in its solver passes.On Newton, the field is read by the IsaacLab Newton wrapper at spawn time (
isaaclab_newton/assets/rigid_object/rigid_object.py:1035) as a guard against accidentally spawning aRigidObjectover a prim that still hasArticulationRootAPIapplied; setting False suppresses the guard error. The Newton solver itself does not consult the flag at sim time.Placed on the solver-common class because the user-facing intent is universal and both PhysX (sim-time) and the IL Newton wrapper (spawn-time) honor it.
- fix_root_link: bool | None#
Whether to fix the root link of the articulation.
If set to None, the root link is not modified.
If the articulation already has a fixed root link, this flag will enable or disable the fixed joint.
If the articulation does not have a fixed root link, this flag will create a fixed joint between the world frame and the root link. The joint is created with the name “FixedJoint” under the articulation prim.
Note
This is a non-USD schema property. It is handled by the
modify_articulation_root_properties()function.
- enabled_self_collisions: bool | None#
Whether self-collisions between bodies in the same articulation are enabled.
The conceptual quantity exists in two USD namespaces simultaneously:
physxArticulation:enabledSelfCollisions(PhysX,PhysxArticulationAPI)newton:selfCollisionEnabled(Newton-native, on a futureNewtonArticulationRootAPI)
Newton’s resolver checks the native
newton:*attribute first and falls back to the PhysX namespace. Both backends honor the field end-to-end.Because the conceptual quantity has a dedicated USD attribute in each backend’s namespace, this field is placed on the PhysX subclass (one cfg per namespace). A future
NewtonArticulationRootPropertiesCfgwill carry the same field over thenewton:*namespace.
- isaaclab.sim.schemas.define_articulation_root_properties(prim_path: str, cfg: schemas_cfg.ArticulationRootBaseCfg, stage: Usd.Stage | None = None)[source]#
Apply the articulation root schema on the input prim and set its properties.
See
modify_articulation_root_properties()for more details on how the properties are set.- Parameters:
prim_path – The prim path where to apply the articulation root schema.
cfg – The configuration for the articulation root.
stage – The stage where to find the prim. Defaults to None, in which case the current stage is used.
- Raises:
ValueError – When the prim path is not valid.
TypeError – When the prim already has conflicting API schemas.
- isaaclab.sim.schemas.modify_articulation_root_properties(prim_path: str, cfg: schemas_cfg.ArticulationRootBaseCfg, stage: Usd.Stage | None = None) bool[source]#
Modify PhysX parameters for an articulation root prim.
The articulation root marks the root of an articulation tree. For floating articulations, this should be on the root body. For fixed articulations, this API can be on a direct or indirect parent of the root joint which is fixed to the world.
The schema comprises of attributes that belong to the ArticulationRootAPI and PhysxArticulationAPI. schemas. The latter contains the PhysX parameters for the articulation root.
The properties are applied to the articulation root prim. The common properties (such as solver position and velocity iteration counts, sleep threshold, stabilization threshold) take precedence over those specified in the rigid body schemas for all the rigid bodies in the articulation.
Caution
When the attribute
schemas_cfg.ArticulationRootPropertiesCfg.fix_root_linkis set to True, a fixed joint is created between the root link and the world frame (if it does not already exist). However, to deal with physics parser limitations, the articulation root schema needs to be applied to the parent of the root link.Note
This function is decorated with
apply_nested()that set the properties to all the prims (that have the schema applied on them) under the input prim path.- Parameters:
prim_path – The prim path to the articulation root.
cfg – The configuration for the articulation root.
stage – The stage where to find the prim. Defaults to None, in which case the current stage is used.
- Returns:
True if the properties were successfully set, False otherwise.
- Raises:
NotImplementedError – When the root prim is not a rigid body and a fixed joint is to be created.
Rigid Body#
- class isaaclab.sim.schemas.RigidBodyPropertiesCfg[source]#
Deprecated: use
PhysxRigidBodyPropertiesCfgorRigidBodyBaseCfg.Deprecated since version 4.6.22:
RigidBodyPropertiesCfghas been split intoRigidBodyBaseCfg(solver-common) andPhysxRigidBodyPropertiesCfg(PhysX-specific) and relocated toisaaclab_physx.sim.schemas. This alias preserves backwards compatibility and is scheduled for removal in 5.0.Attributes:
Whether to enable or disable the rigid body.
Determines whether the body is kinematic or not.
Disable gravity for the body.
Linear damping for the body.
Angular damping for the body.
Maximum linear velocity for rigid bodies (in m/s).
Maximum angular velocity for rigid bodies (in deg/s).
Maximum depenetration velocity permitted to be introduced by the solver (in m/s).
The limit on the impulse that may be applied at a contact.
Enables computation of gyroscopic forces on the rigid body.
Carries over forces/accelerations over sub-steps.
Solver position iteration counts for the body.
Solver velocity iteration counts for the body.
Mass-normalized kinetic energy threshold below which an actor may go to sleep.
The mass-normalized kinetic energy threshold below which an actor may participate in stabilization.
- kinematic_enabled: bool | None#
Determines whether the body is kinematic or not.
A kinematic body is a body that is moved through animated poses or through user defined poses. The simulation still derives velocities for the kinematic body based on the external motion.
For more information on kinematic bodies, please refer to the documentation.
- disable_gravity: bool | None#
Disable gravity for the body.
PhysX honors this per-body via
physxRigidBody:disableGravity: setting True excludes the body from world gravity integration.Newton currently consumes the same USD attribute at the scene level – Newton’s importer reads
physxRigidBody:disableGravityon the scene prim and uses it to drive the scene-widebuilder.gravityflag (import_usd.py:1212). Per-body intent is therefore partially honored on Newton: whichever rigid body has the attribute authored ends up controlling scene-wide gravity, and other bodies cannot be selectively excluded.The field is placed on the base because the user-facing intent (per-body gravity exclusion for markers, sensors, kinematic targets) is universal physics and PhysX honors it fully. Closing the Newton gap is a kernel-level fix (introduce
Model.body_disable_gravityboolean array consumed by the integrator) that does not require a cfg-API change.
- max_depenetration_velocity: float | None#
Maximum depenetration velocity permitted to be introduced by the solver (in m/s).
- isaaclab.sim.schemas.define_rigid_body_properties(prim_path: str, cfg: schemas_cfg.RigidBodyBaseCfg, stage: Usd.Stage | None = None)[source]#
Apply the rigid body schema on the input prim and set its properties.
See
modify_rigid_body_properties()for more details on how the properties are set.- Parameters:
prim_path – The prim path where to apply the rigid body schema.
cfg – The configuration for the rigid body.
stage – The stage where to find the prim. Defaults to None, in which case the current stage is used.
- Raises:
ValueError – When the prim path is not valid.
TypeError – When the prim already has conflicting API schemas.
- isaaclab.sim.schemas.modify_rigid_body_properties(prim_path: str, cfg: schemas_cfg.RigidBodyBaseCfg, stage: Usd.Stage | None = None) bool[source]#
Modify PhysX parameters for a rigid body prim.
A rigid body is a single body that can be simulated by PhysX. It can be either dynamic or kinematic. A dynamic body responds to forces and collisions. A kinematic body can be moved by the user, but does not respond to forces. They are similar to having static bodies that can be moved around.
The schema comprises of attributes that belong to the RigidBodyAPI and PhysxRigidBodyAPI. schemas. The latter contains the PhysX parameters for the rigid body.
Note
This function is decorated with
apply_nested()that sets the properties to all the prims (that have the schema applied on them) under the input prim path.- Parameters:
prim_path – The prim path to the rigid body.
cfg – The configuration for the rigid body.
stage – The stage where to find the prim. Defaults to None, in which case the current stage is used.
- Returns:
True if the properties were successfully set, False otherwise.
- isaaclab.sim.schemas.activate_contact_sensors(prim_path: str, threshold: float = 0.0, stage: pxr.Usd.Stage = None)[source]#
Activate the contact sensor on all rigid bodies under a specified prim path.
This function adds the PhysX contact report API to all rigid bodies under the specified prim path. It also sets the force threshold beyond which the contact sensor reports the contact. The contact reporting API can only be added to rigid bodies.
- Parameters:
prim_path – The prim path under which to search and prepare contact sensors.
threshold – The threshold for the contact sensor. Defaults to 0.0.
stage – The stage where to find the prim. Defaults to None, in which case the current stage is used.
- Raises:
ValueError – If the input prim path is not valid.
ValueError – If there are no rigid bodies under the prim path.
Collision#
- class isaaclab.sim.schemas.CollisionPropertiesCfg[source]#
Deprecated: use
PhysxCollisionPropertiesCfgorCollisionBaseCfg.Deprecated since version 4.6.23:
CollisionPropertiesCfghas been split intoCollisionBaseCfg(solver-common) andPhysxCollisionPropertiesCfg(PhysX-specific) and relocated toisaaclab_physx.sim.schemas. This alias preserves backwards compatibility and is scheduled for removal in 5.0.Attributes:
Whether to enable or disable collisions.
Contact offset for the collision shape [m].
Rest offset for the collision shape [m].
Radius of the contact patch for applying torsional friction [m].
Minimum radius of the contact patch for applying torsional friction [m].
- collision_enabled: bool | None#
Whether to enable or disable collisions.
Writes
physics:collisionEnabledviaUsdPhysics.CollisionAPI.
- contact_offset: float | None#
Contact offset for the collision shape [m].
The collision detector generates contact points as soon as two shapes get closer than the sum of their contact offsets. This quantity should be non-negative which means that contact generation can potentially start before the shapes actually penetrate.
Writes
physxCollision:contactOffset. Newton’s USD importer consumes the same attribute via its PhysX-bridge resolver.
- rest_offset: float | None#
Rest offset for the collision shape [m].
The rest offset quantifies how close a shape gets to others at rest, At rest, the distance between two vertically stacked objects is the sum of their rest offsets. If a pair of shapes have a positive rest offset, the shapes will be separated at rest by an air gap.
Writes
physxCollision:restOffset. Newton’s USD importer consumes the same attribute via its PhysX-bridge resolver.
- isaaclab.sim.schemas.define_collision_properties(prim_path: str, cfg: schemas_cfg.CollisionPropertiesCfg, stage: Usd.Stage | None = None)[source]#
Apply the collision schema on the input prim and set its properties.
See
modify_collision_properties()for more details on how the properties are set.- Parameters:
prim_path – The prim path where to apply the rigid body schema.
cfg – The configuration for the collider.
stage – The stage where to find the prim. Defaults to None, in which case the current stage is used.
- Raises:
ValueError – When the prim path is not valid.
- isaaclab.sim.schemas.modify_collision_properties(prim_path: str, cfg: schemas_cfg.CollisionPropertiesCfg, stage: Usd.Stage | None = None) bool[source]#
Modify PhysX properties of collider prim.
These properties are based on the UsdPhysics.CollisionAPI and PhysxSchema.PhysxCollisionAPI schemas. For more information on the properties, please refer to the official documentation.
Tuning these parameters influence the contact behavior of the rigid body. For more information on tune them and their effect on the simulation, please refer to the PhysX documentation.
Note
This function is decorated with
apply_nested()that sets the properties to all the prims (that have the schema applied on them) under the input prim path.- Parameters:
prim_path – The prim path of parent.
cfg – The configuration for the collider.
stage – The stage where to find the prim. Defaults to None, in which case the current stage is used.
- Returns:
True if the properties were successfully set, False otherwise.
Mass#
- class isaaclab.sim.schemas.MassPropertiesCfg[source]#
Properties to define explicit mass properties of a rigid body.
See
modify_mass_properties()for more information.Note
If the values are None, they are not modified. This is useful when you want to set only a subset of the properties and leave the rest as-is.
Attributes:
- isaaclab.sim.schemas.define_mass_properties(prim_path: str, cfg: schemas_cfg.MassPropertiesCfg, stage: Usd.Stage | None = None)[source]#
Apply the mass schema on the input prim and set its properties.
See
modify_mass_properties()for more details on how the properties are set.- Parameters:
prim_path – The prim path where to apply the rigid body schema.
cfg – The configuration for the mass properties.
stage – The stage where to find the prim. Defaults to None, in which case the current stage is used.
- Raises:
ValueError – When the prim path is not valid.
- isaaclab.sim.schemas.modify_mass_properties(prim_path: str, cfg: schemas_cfg.MassPropertiesCfg, stage: Usd.Stage | None = None) bool[source]#
Set properties for the mass of a rigid body prim.
These properties are based on the UsdPhysics.MassAPI schema. If the mass is not defined, the density is used to compute the mass. However, in that case, a collision approximation of the rigid body is used to compute the density. For more information on the properties, please refer to the documentation.
Caution
The mass of an object can be specified in multiple ways and have several conflicting settings that are resolved based on precedence. Please make sure to understand the precedence rules before using this property.
Note
This function is decorated with
apply_nested()that sets the properties to all the prims (that have the schema applied on them) under the input prim path.- Parameters:
prim_path – The prim path of the rigid body.
cfg – The configuration for the mass properties.
stage – The stage where to find the prim. Defaults to None, in which case the current stage is used.
- Returns:
True if the properties were successfully set, False otherwise.
Joint Drive#
- class isaaclab.sim.schemas.JointDrivePropertiesCfg[source]#
Deprecated: use
PhysxJointDrivePropertiesCfgorJointDriveBaseCfg.Deprecated since version 4.6.22:
JointDrivePropertiesCfghas been split intoJointDriveBaseCfg(solver-common) andPhysxJointDrivePropertiesCfg(PhysX-specific) and relocated toisaaclab_physx.sim.schemas. This alias preserves backwards compatibility and is scheduled for removal in 5.0.Attributes:
Joint drive type to apply.
Maximum force/torque that can be applied to the joint [N for linear joints, N-m for angular joints].
Deprecated alias for
max_force.Stiffness of the joint drive.
Damping of the joint drive.
If True, ensure every joint has a non-zero drive so that physics backends (e.g. Newton) create proper actuators for it.
Maximum velocity of the joint [m/s for linear joints, rad/s for angular joints].
Deprecated alias for
max_joint_velocity.- drive_type: Literal['force', 'acceleration'] | None#
Joint drive type to apply.
If the drive type is “force”, then the joint is driven by a force. If the drive type is “acceleration”, then the joint is driven by an acceleration (usually used for kinematic joints).
- max_force: float | None#
Maximum force/torque that can be applied to the joint [N for linear joints, N-m for angular joints].
Writes
drive:<linear|angular>:physics:maxForceviaUsdPhysics.DriveAPI.
- stiffness: float | None#
Stiffness of the joint drive.
The unit depends on the joint model:
For linear joints, the unit is kg-m/s^2 (N/m).
For angular joints, the unit is kg-m^2/s^2/rad (N-m/rad).
- damping: float | None#
Damping of the joint drive.
The unit depends on the joint model:
For linear joints, the unit is kg-m/s (N-s/m).
For angular joints, the unit is kg-m^2/s/rad (N-m-s/rad).
- ensure_drives_exist: bool#
If True, ensure every joint has a non-zero drive so that physics backends (e.g. Newton) create proper actuators for it.
When a USD asset defines
PhysicsDriveAPIwithstiffness=0anddamping=0, some backends treat the joint as passive (no PD control). Enabling this flag writes a minimal stiffness (1e-3) to any drive whose stiffness and damping are both zero, guaranteeing that the backend recognises the drive as active. The actual gains are expected to be overridden later by the actuator model.
- max_joint_velocity: float | None#
Maximum velocity of the joint [m/s for linear joints, rad/s for angular joints].
Notes
Today this writes
physxJoint:maxJointVelocity(a PhysX add-on schema attribute). Newton’s USD importer consumes the same attribute via its PhysX-bridge resolver and populatesModel.joint_velocity_limit; the PhysX engine consumes it natively. The Kamino solver honors the limit at the simulation step. The XPBD, Featherstone, and Semi-implicit Newton solvers import the value but do not consume it in their kernels; the MuJoCo (MJC) solver explicitly drops it. When Newton shipsnewton:maxJointVelocityas a registered applied API, the writer namespace will switch transparently and this docstring caveat will be removed.
- max_velocity: float | None#
Deprecated alias for
max_joint_velocity.Deprecated since version 4.6.25: Use
max_joint_velocityinstead. The cfg field is renamed so its snake_case name maps identity-style to the USD camelCase attribute (physxJoint:maxJointVelocity). The alias is forwarded tomax_joint_velocityin__post_init__()and will be removed in 5.0.
- isaaclab.sim.schemas.modify_joint_drive_properties(prim_path: str, cfg: schemas_cfg.JointDriveBaseCfg, stage: Usd.Stage | None = None) bool[source]#
Modify PhysX parameters for a joint prim.
This function checks if the input prim is a prismatic or revolute joint and applies the joint drive schema on it. If the joint is a tendon (i.e., it has the PhysxTendonAxisAPI schema applied on it), then the joint drive schema is not applied.
Based on the configuration, this method modifies the properties of the joint drive. These properties are based on the UsdPhysics.DriveAPI schema. For more information on the properties, please refer to the official documentation.
Caution
We highly recommend modifying joint properties of articulations through the functionalities in the
isaaclab.actuatorsmodule. The methods here are for setting simulation low-level properties only.- Parameters:
prim_path – The prim path where to apply the joint drive schema.
cfg – The configuration for the joint drive.
stage – The stage where to find the prim. Defaults to None, in which case the current stage is used.
- Returns:
True if the properties were successfully set, False otherwise.
- Raises:
ValueError – If the input prim path is not valid.
Fixed Tendon#
- class isaaclab.sim.schemas.FixedTendonPropertiesCfg[source]#
Deprecated: use
PhysxFixedTendonPropertiesCfg.Deprecated since version 4.6.x:
FixedTendonPropertiesCfgwas relocated toisaaclab_physx.sim.schemasand renamed toPhysxFixedTendonPropertiesCfg. The legacy name remains as a deprecation alias and is scheduled for removal in 5.0.Attributes:
Whether to enable or disable the tendon.
Spring stiffness term acting on the tendon's length.
The damping term acting on both the tendon length and the tendon-length limits.
Limit stiffness term acting on the tendon's length limits.
Length offset term for the tendon.
Spring rest length of the tendon.
- damping: float | None#
The damping term acting on both the tendon length and the tendon-length limits.
- isaaclab.sim.schemas.modify_fixed_tendon_properties(prim_path: str, cfg: schemas_cfg.PhysxFixedTendonPropertiesCfg, stage: Usd.Stage | None = None) bool[source]#
Modify PhysX parameters for a fixed tendon attachment prim.
A fixed tendon can be used to link multiple degrees of freedom of articulation joints through length and limit constraints. For instance, it can be used to set up an equality constraint between a driven and passive revolute joints.
The schema comprises of attributes that belong to the PhysxTendonAxisRootAPI schema.
Note
This function is decorated with
apply_nested()that sets the properties to all the prims (that have the schema applied on them) under the input prim path.- Parameters:
prim_path – The prim path to the tendon attachment.
cfg – The configuration for the tendon attachment.
stage – The stage where to find the prim. Defaults to None, in which case the current stage is used.
- Returns:
True if the properties were successfully set, False otherwise.
- Raises:
ValueError – If the input prim path is not valid.
Deformable Body#
Note
Deformable body schemas have moved to the PhysX backend extension. See
isaaclab_physx.sim.schemas.DeformableBodyPropertiesCfg,
isaaclab_physx.sim.schemas.define_deformable_body_properties(), and
isaaclab_physx.sim.schemas.modify_deformable_body_properties().
For migration details, see Migration of Deformables.