isaaclab_physx.sim.spawners#

Sub-module containing utilities for creating prims in Omniverse for the PhysX backend.

Submodules

materials

Sub-module for spawners that spawn PhysX-based materials.

Classes

DeformableObjectSpawnerCfg

Configuration parameters for spawning a deformable asset.

Spawners#

class isaaclab_physx.sim.spawners.DeformableObjectSpawnerCfg[source]#

Bases: SpawnerCfg

Configuration parameters for spawning a deformable asset.

Unlike rigid objects, deformable objects are affected by forces and can deform when subjected to external forces. This class is used to configure the properties of the deformable object.

Deformable bodies don’t have a separate collision mesh. The collision mesh is the same as the visual mesh. The collision properties such as rest and collision offsets are specified in the deformable_props.

Note

By default, all properties are set to None. This means that no properties will be added or modified to the prim outside of the properties available by default when spawning the prim.

Attributes:

mass_props

Mass properties.

func

Function to use for spawning the asset.

visible

Whether the spawned asset should be visible.

semantic_tags

List of semantic tags to add to the spawned asset.

copy_from_source

Whether to copy the asset from the source prim or inherit it.

spawn_path

Path where the prototype is spawned.

deformable_props

Deformable body properties.

mass_props: schemas.MassPropertiesCfg | None#

Mass properties.

func: Callable[..., Usd.Prim]#

Function to use for spawning the asset.

The function takes in the prim path (or expression) to spawn the asset at, the configuration instance and transformation, and returns the source prim spawned.

visible: bool#

Whether the spawned asset should be visible. Defaults to True.

semantic_tags: list[tuple[str, str]] | None#

List of semantic tags to add to the spawned asset. Defaults to None, which means no semantic tags will be added.

The semantic tags follow the Replicator Semantic tagging system. Each tag is a tuple of the form (type, data), where type is the type of the tag and data is the semantic label associated with the tag. For example, to annotate a spawned asset in the class avocado, the semantic tag would be [("class", "avocado")].

You can specify multiple semantic tags by passing in a list of tags. For example, to annotate a spawned asset in the class avocado and the color green, the semantic tags would be [("class", "avocado"), ("color", "green")].

See also

For more information on the semantics filter, see the documentation for the semantics schema editor.

copy_from_source: bool#

Whether to copy the asset from the source prim or inherit it. Defaults to True.

This parameter is only used when cloning prims. If False, then the asset will be inherited from the source prim, i.e. all USD changes to the source prim will be reflected in the cloned prims.

spawn_path: str | None#

Path where the prototype is spawned. Defaults to None.

deformable_props: DeformableBodyPropertiesCfg | None#

Deformable body properties. Only supported on PhysX backend for now.

Materials#

Sub-module for spawners that spawn PhysX-based materials.

Classes

DeformableBodyMaterialCfg

Physics material parameters for deformable bodies.

SurfaceDeformableBodyMaterialCfg

Physics material parameters for surface deformable bodies, extending on DeformableBodyMaterialCfg with additional parameters for surface deformable bodies.

isaaclab_physx.sim.spawners.materials.spawn_deformable_body_material(prim_path: str, cfg: DeformableBodyMaterialCfg) pxr.Usd.Prim[source]#

Create material with deformable-body physics properties.

Deformable body materials are used to define the physical properties to meshes of a deformable body. These include the friction and deformable body properties. For more information on deformable body material, please refer to the documentation on PxFEMSoftBodyMaterial.

Note

This function is decorated with clone() that resolves prim path into list of paths if the input prim path is a regex pattern. This is done to support spawning multiple assets from a single and cloning the USD prim at the given path expression.

Parameters:
  • prim_path – The prim path or pattern to spawn the asset at. If the prim path is a regex pattern, then the asset is spawned at all the matching prim paths.

  • cfg – The configuration for the physics material.

Returns:

The spawned deformable body material prim.

Raises:

ValueError – When a prim already exists at the specified prim path and is not a material.

class isaaclab_physx.sim.spawners.materials.DeformableBodyMaterialCfg[source]#

Bases: PhysicsMaterialCfg, OmniPhysicsDeformableMaterialCfg, PhysXDeformableMaterialCfg

Physics material parameters for deformable bodies.

See spawn_deformable_body_material() for more information.

Attributes:

elasticity_damping

The elasticity damping for the deformable material.

density

The material density in [kg/m^3].

static_friction

The static friction.

dynamic_friction

The dynamic friction.

youngs_modulus

The Young's modulus, which defines the body's stiffness.

poissons_ratio

The Poisson's ratio which defines the body's volume preservation.

elasticity_damping: float#

The elasticity damping for the deformable material. Defaults to 0.005.

density: float | None#

The material density in [kg/m^3]. Defaults to None, in which case the simulation decides the default density.

static_friction: float#

The static friction. Defaults to 0.25.

dynamic_friction: float#

The dynamic friction. Defaults to 0.25.

youngs_modulus: float#

The Young’s modulus, which defines the body’s stiffness. Defaults to 1[MPa].

The Young’s modulus is a measure of the material’s ability to deform under stress. It is measured in Pascals ([Pa]).

poissons_ratio: float#

The Poisson’s ratio which defines the body’s volume preservation. Defaults to 0.45.

The Poisson’s ratio is a measure of the material’s ability to expand in the lateral direction when compressed in the axial direction. It is a dimensionless number between 0 and 0.5. Using a value of 0.5 will make the material incompressible.

class isaaclab_physx.sim.spawners.materials.SurfaceDeformableBodyMaterialCfg[source]#

Bases: DeformableBodyMaterialCfg, OmniPhysicsSurfaceDeformableMaterialCfg

Physics material parameters for surface deformable bodies, extending on DeformableBodyMaterialCfg with additional parameters for surface deformable bodies.

See spawn_deformable_body_material() for more information.

Attributes:

elasticity_damping

The elasticity damping for the deformable material.

density

The material density in [kg/m^3].

static_friction

The static friction.

dynamic_friction

The dynamic friction.

youngs_modulus

The Young's modulus, which defines the body's stiffness.

poissons_ratio

The Poisson's ratio which defines the body's volume preservation.

surface_thickness

The thickness of the deformable body's surface.

surface_stretch_stiffness

The stretch stiffness of the deformable body's surface.

surface_shear_stiffness

The shear stiffness of the deformable body's surface.

surface_bend_stiffness

The bend stiffness of the deformable body's surface.

bend_damping

The bend damping for the deformable body's surface.

elasticity_damping: float#

The elasticity damping for the deformable material. Defaults to 0.005.

density: float | None#

The material density in [kg/m^3]. Defaults to None, in which case the simulation decides the default density.

static_friction: float#

The static friction. Defaults to 0.25.

dynamic_friction: float#

The dynamic friction. Defaults to 0.25.

youngs_modulus: float#

The Young’s modulus, which defines the body’s stiffness. Defaults to 1[MPa].

The Young’s modulus is a measure of the material’s ability to deform under stress. It is measured in Pascals ([Pa]).

poissons_ratio: float#

The Poisson’s ratio which defines the body’s volume preservation. Defaults to 0.45.

The Poisson’s ratio is a measure of the material’s ability to expand in the lateral direction when compressed in the axial direction. It is a dimensionless number between 0 and 0.5. Using a value of 0.5 will make the material incompressible.

surface_thickness: float#

The thickness of the deformable body’s surface. Defaults to 0.01 meters ([m]).

surface_stretch_stiffness: float#

The stretch stiffness of the deformable body’s surface. Defaults to 0.0.

surface_shear_stiffness: float#

The shear stiffness of the deformable body’s surface. Defaults to 0.0.

surface_bend_stiffness: float#

The bend stiffness of the deformable body’s surface. Defaults to 0.0.

bend_damping: float#

The bend damping for the deformable body’s surface. Defaults to 0.0.