omni.isaac.lab.sim.spawners

Contents

omni.isaac.lab.sim.spawners#

Sub-module containing utilities for creating prims in Omniverse.

Spawners are used to create prims into Omniverse simulator. At their core, they are calling the USD Python API or Omniverse Kit Commands to create prims. However, they also provide a convenient interface for creating prims from their respective config classes.

There are two main ways of using the spawners:

  1. Using the function from the module

    import omni.isaac.lab.sim as sim_utils
    from omni.isaac.lab.utils.assets import ISAACLAB_NUCLEUS_DIR
    
    # spawn from USD file
    cfg = sim_utils.UsdFileCfg(usd_path=f"{ISAACLAB_NUCLEUS_DIR}/Robots/FrankaEmika/panda_instanceable.usd")
    prim_path = "/World/myAsset"
    
    # spawn using the function from the module
    sim_utils.spawn_from_usd(prim_path, cfg)
    
  2. Using the func reference in the config class

    import omni.isaac.lab.sim as sim_utils
    from omni.isaac.lab.utils.assets import ISAACLAB_NUCLEUS_DIR
    
    # spawn from USD file
    cfg = sim_utils.UsdFileCfg(usd_path=f"{ISAACLAB_NUCLEUS_DIR}/Robots/FrankaEmika/panda_instanceable.usd")
    prim_path = "/World/myAsset"
    
    # use the `func` reference in the config class
    cfg.func(prim_path, cfg)
    

For convenience, we recommend using the second approach, as it allows to easily change the config class and the function call in a single line of code.

Depending on the type of prim, the spawning-functions can also deal with the creation of prims over multiple prim path. These need to be provided as a regex prim path expressions, which are resolved based on the parent prim paths using the omni.isaac.lab.sim.utils.clone() function decorator. For example:

  • /World/Table_[1,2]/Robot will create the prims /World/Table_1/Robot and /World/Table_2/Robot only if the parent prim /World/Table_1 and /World/Table_2 exist.

  • /World/Robot_[1,2] will NOT create the prims /World/Robot_1 and /World/Robot_2 as the prim path expression can be resolved to multiple prims.

Submodules

shapes

Sub-module for spawning primitive shapes in the simulation.

meshes

Sub-module for spawning meshes in the simulation.

lights

Sub-module for spawners that spawn lights in the simulation.

sensors

Sub-module for spawners that spawn sensors in the simulation.

from_files

Sub-module for spawners that spawn assets from files.

materials

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

Classes

SpawnerCfg

Configuration parameters for spawning an asset.

RigidObjectSpawnerCfg

Configuration parameters for spawning a rigid asset.

DeformableObjectSpawnerCfg

Configuration parameters for spawning a deformable asset.

Spawners#

class omni.isaac.lab.sim.spawners.SpawnerCfg[source]#

Configuration parameters for spawning an asset.

Spawning an asset is done by calling the func function. The function takes in the prim path to spawn the asset at, the configuration instance and transformation, and returns the prim path of the spawned asset.

The function is typically decorated with omni.isaac.lab.sim.spawner.utils.clone() decorator that checks if input prim path is a regex expression and spawns the asset at all matching prims. For this, the decorator uses the Cloner API from Isaac Sim and handles the copy_from_source parameter.

Attributes:

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.

func: Callable[[...], pxr.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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

class omni.isaac.lab.sim.spawners.RigidObjectSpawnerCfg[source]#

Bases: SpawnerCfg

Configuration parameters for spawning a rigid asset.

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.

rigid_props

Rigid body properties.

collision_props

Properties to apply to all collision meshes.

activate_contact_sensors

Activate contact reporting on all rigid bodies.

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

rigid_props: schemas.RigidBodyPropertiesCfg | None#

Rigid body properties.

For making a rigid object static, set the schemas.RigidBodyPropertiesCfg.kinematic_enabled as True. This will make the object static and will not be affected by gravity or other forces.

collision_props: schemas.CollisionPropertiesCfg | None#

Properties to apply to all collision meshes.

activate_contact_sensors: bool#

Activate contact reporting on all rigid bodies. Defaults to False.

This adds the PhysxContactReporter API to all the rigid bodies in the given prim path and its children.

class omni.isaac.lab.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.

deformable_props

Deformable body 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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

mass_props: schemas.MassPropertiesCfg | None#

Mass properties.

deformable_props: schemas.DeformableBodyPropertiesCfg | None#

Deformable body properties.

Shapes#

Sub-module for spawning primitive shapes in the simulation.

NVIDIA Omniverse provides various primitive shapes that can be used to create USDGeom prims. Based on the configuration, the spawned prim can be:

  • a visual mesh (no physics)

  • a static collider (no rigid body)

  • a rigid body (with collision and rigid body properties).

Classes

ShapeCfg

Configuration parameters for a USD Geometry or Geom prim.

CapsuleCfg

Configuration parameters for a capsule prim.

ConeCfg

Configuration parameters for a cone prim.

CuboidCfg

Configuration parameters for a cuboid prim.

CylinderCfg

Configuration parameters for a cylinder prim.

SphereCfg

Configuration parameters for a sphere prim.

class omni.isaac.lab.sim.spawners.shapes.ShapeCfg[source]#

Configuration parameters for a USD Geometry or Geom prim.

Attributes:

visual_material_path

Path to the visual material to use for the prim.

visual_material

Visual material properties.

physics_material_path

Path to the physics material to use for the prim.

physics_material

Physics material properties.

visual_material_path: str#

Path to the visual material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if visual_material is not None.

visual_material: VisualMaterialCfg | None#

Visual material properties.

Note

If None, then no visual material will be added.

physics_material_path: str#

Path to the physics material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if physics_material is not None.

physics_material: PhysicsMaterialCfg | None#

Physics material properties.

Note

If None, then no physics material will be added.

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

mass_props: schemas.MassPropertiesCfg | None#

Mass properties.

rigid_props: schemas.RigidBodyPropertiesCfg | None#

Rigid body properties.

For making a rigid object static, set the schemas.RigidBodyPropertiesCfg.kinematic_enabled as True. This will make the object static and will not be affected by gravity or other forces.

collision_props: schemas.CollisionPropertiesCfg | None#

Properties to apply to all collision meshes.

activate_contact_sensors: bool#

Activate contact reporting on all rigid bodies. Defaults to False.

This adds the PhysxContactReporter API to all the rigid bodies in the given prim path and its children.

omni.isaac.lab.sim.spawners.shapes.spawn_capsule(prim_path: str, cfg: shapes_cfg.CapsuleCfg, translation: tuple[float, float, float] | None = None, orientation: tuple[float, float, float, float] | None = None) Usd.Prim[source]#

Create a USDGeom-based capsule prim with the given attributes.

For more information, see USDGeomCapsule.

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 instance.

  • translation – The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to the origin.

  • orientation – The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to identity.

Returns:

The created prim.

Raises:

ValueError – If a prim already exists at the given path.

class omni.isaac.lab.sim.spawners.shapes.CapsuleCfg[source]#

Bases: ShapeCfg

Configuration parameters for a capsule prim.

See spawn_capsule() for more information.

Attributes:

radius

Radius of the capsule (in m).

height

Height of the capsule (in m).

axis

Axis of the capsule.

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

mass_props: schemas.MassPropertiesCfg | None#

Mass properties.

rigid_props: schemas.RigidBodyPropertiesCfg | None#

Rigid body properties.

For making a rigid object static, set the schemas.RigidBodyPropertiesCfg.kinematic_enabled as True. This will make the object static and will not be affected by gravity or other forces.

collision_props: schemas.CollisionPropertiesCfg | None#

Properties to apply to all collision meshes.

activate_contact_sensors: bool#

Activate contact reporting on all rigid bodies. Defaults to False.

This adds the PhysxContactReporter API to all the rigid bodies in the given prim path and its children.

visual_material_path: str#

Path to the visual material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if visual_material is not None.

visual_material: VisualMaterialCfg | None#

Visual material properties.

Note

If None, then no visual material will be added.

physics_material_path: str#

Path to the physics material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if physics_material is not None.

physics_material: PhysicsMaterialCfg | None#

Physics material properties.

Note

If None, then no physics material will be added.

radius: float#

Radius of the capsule (in m).

height: float#

Height of the capsule (in m).

axis: Literal['X', 'Y', 'Z']#

Axis of the capsule. Defaults to “Z”.

omni.isaac.lab.sim.spawners.shapes.spawn_cone(prim_path: str, cfg: shapes_cfg.ConeCfg, translation: tuple[float, float, float] | None = None, orientation: tuple[float, float, float, float] | None = None) Usd.Prim[source]#

Create a USDGeom-based cone prim with the given attributes.

For more information, see USDGeomCone.

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 instance.

  • translation – The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to the origin.

  • orientation – The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to identity.

Returns:

The created prim.

Raises:

ValueError – If a prim already exists at the given path.

class omni.isaac.lab.sim.spawners.shapes.ConeCfg[source]#

Bases: ShapeCfg

Configuration parameters for a cone prim.

See spawn_cone() for more information.

Attributes:

radius

Radius of the cone (in m).

height

Height of the v (in m).

axis

Axis of the cone.

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

mass_props: schemas.MassPropertiesCfg | None#

Mass properties.

rigid_props: schemas.RigidBodyPropertiesCfg | None#

Rigid body properties.

For making a rigid object static, set the schemas.RigidBodyPropertiesCfg.kinematic_enabled as True. This will make the object static and will not be affected by gravity or other forces.

collision_props: schemas.CollisionPropertiesCfg | None#

Properties to apply to all collision meshes.

activate_contact_sensors: bool#

Activate contact reporting on all rigid bodies. Defaults to False.

This adds the PhysxContactReporter API to all the rigid bodies in the given prim path and its children.

visual_material_path: str#

Path to the visual material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if visual_material is not None.

visual_material: VisualMaterialCfg | None#

Visual material properties.

Note

If None, then no visual material will be added.

physics_material_path: str#

Path to the physics material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if physics_material is not None.

physics_material: PhysicsMaterialCfg | None#

Physics material properties.

Note

If None, then no physics material will be added.

radius: float#

Radius of the cone (in m).

height: float#

Height of the v (in m).

axis: Literal['X', 'Y', 'Z']#

Axis of the cone. Defaults to “Z”.

omni.isaac.lab.sim.spawners.shapes.spawn_cuboid(prim_path: str, cfg: shapes_cfg.CuboidCfg, translation: tuple[float, float, float] | None = None, orientation: tuple[float, float, float, float] | None = None) Usd.Prim[source]#

Create a USDGeom-based cuboid prim with the given attributes.

For more information, see USDGeomCube.

Note

Since USD only supports cubes, we set the size of the cube to the minimum of the given size and scale the cube accordingly.

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 instance.

  • translation – The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to the origin.

  • orientation – The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to identity.

Returns:

The created prim.

Raises:

If a prim already exists at the given path.

class omni.isaac.lab.sim.spawners.shapes.CuboidCfg[source]#

Bases: ShapeCfg

Configuration parameters for a cuboid prim.

See spawn_cuboid() for more information.

Attributes:

size

Size of the cuboid.

size: tuple[float, float, float]#

Size of the cuboid.

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

mass_props: schemas.MassPropertiesCfg | None#

Mass properties.

rigid_props: schemas.RigidBodyPropertiesCfg | None#

Rigid body properties.

For making a rigid object static, set the schemas.RigidBodyPropertiesCfg.kinematic_enabled as True. This will make the object static and will not be affected by gravity or other forces.

collision_props: schemas.CollisionPropertiesCfg | None#

Properties to apply to all collision meshes.

activate_contact_sensors: bool#

Activate contact reporting on all rigid bodies. Defaults to False.

This adds the PhysxContactReporter API to all the rigid bodies in the given prim path and its children.

visual_material_path: str#

Path to the visual material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if visual_material is not None.

visual_material: VisualMaterialCfg | None#

Visual material properties.

Note

If None, then no visual material will be added.

physics_material_path: str#

Path to the physics material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if physics_material is not None.

physics_material: PhysicsMaterialCfg | None#

Physics material properties.

Note

If None, then no physics material will be added.

omni.isaac.lab.sim.spawners.shapes.spawn_cylinder(prim_path: str, cfg: shapes_cfg.CylinderCfg, translation: tuple[float, float, float] | None = None, orientation: tuple[float, float, float, float] | None = None) Usd.Prim[source]#

Create a USDGeom-based cylinder prim with the given attributes.

For more information, see USDGeomCylinder.

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 instance.

  • translation – The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to the origin.

  • orientation – The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to identity.

Returns:

The created prim.

Raises:

ValueError – If a prim already exists at the given path.

class omni.isaac.lab.sim.spawners.shapes.CylinderCfg[source]#

Bases: ShapeCfg

Configuration parameters for a cylinder prim.

See spawn_cylinder() for more information.

Attributes:

radius

Radius of the cylinder (in m).

height

Height of the cylinder (in m).

axis

Axis of the cylinder.

radius: float#

Radius of the cylinder (in m).

height: float#

Height of the cylinder (in m).

axis: Literal['X', 'Y', 'Z']#

Axis of the cylinder. Defaults to “Z”.

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

mass_props: schemas.MassPropertiesCfg | None#

Mass properties.

rigid_props: schemas.RigidBodyPropertiesCfg | None#

Rigid body properties.

For making a rigid object static, set the schemas.RigidBodyPropertiesCfg.kinematic_enabled as True. This will make the object static and will not be affected by gravity or other forces.

collision_props: schemas.CollisionPropertiesCfg | None#

Properties to apply to all collision meshes.

activate_contact_sensors: bool#

Activate contact reporting on all rigid bodies. Defaults to False.

This adds the PhysxContactReporter API to all the rigid bodies in the given prim path and its children.

visual_material_path: str#

Path to the visual material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if visual_material is not None.

visual_material: VisualMaterialCfg | None#

Visual material properties.

Note

If None, then no visual material will be added.

physics_material_path: str#

Path to the physics material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if physics_material is not None.

physics_material: PhysicsMaterialCfg | None#

Physics material properties.

Note

If None, then no physics material will be added.

omni.isaac.lab.sim.spawners.shapes.spawn_sphere(prim_path: str, cfg: shapes_cfg.SphereCfg, translation: tuple[float, float, float] | None = None, orientation: tuple[float, float, float, float] | None = None) Usd.Prim[source]#

Create a USDGeom-based sphere prim with the given attributes.

For more information, see USDGeomSphere.

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 instance.

  • translation – The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to the origin.

  • orientation – The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to identity.

Returns:

The created prim.

Raises:

ValueError – If a prim already exists at the given path.

class omni.isaac.lab.sim.spawners.shapes.SphereCfg[source]#

Bases: ShapeCfg

Configuration parameters for a sphere prim.

See spawn_sphere() for more information.

Attributes:

radius

Radius of the sphere (in m).

radius: float#

Radius of the sphere (in m).

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

mass_props: schemas.MassPropertiesCfg | None#

Mass properties.

rigid_props: schemas.RigidBodyPropertiesCfg | None#

Rigid body properties.

For making a rigid object static, set the schemas.RigidBodyPropertiesCfg.kinematic_enabled as True. This will make the object static and will not be affected by gravity or other forces.

collision_props: schemas.CollisionPropertiesCfg | None#

Properties to apply to all collision meshes.

activate_contact_sensors: bool#

Activate contact reporting on all rigid bodies. Defaults to False.

This adds the PhysxContactReporter API to all the rigid bodies in the given prim path and its children.

visual_material_path: str#

Path to the visual material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if visual_material is not None.

visual_material: VisualMaterialCfg | None#

Visual material properties.

Note

If None, then no visual material will be added.

physics_material_path: str#

Path to the physics material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if physics_material is not None.

physics_material: PhysicsMaterialCfg | None#

Physics material properties.

Note

If None, then no physics material will be added.

Meshes#

Sub-module for spawning meshes in the simulation.

NVIDIA Omniverse deals with meshes as USDGeomMesh prims. This sub-module provides various configurations to spawn different types of meshes. Based on the configuration, the spawned prim can be:

  • a visual mesh (no physics)

  • a static collider (no rigid or deformable body)

  • a deformable body (with deformable properties)

Note

While rigid body properties can be set on a mesh, it is recommended to use the omni.isaac.lab.sim.spawners.shapes module to spawn rigid bodies. This is because USD shapes are more optimized for physics simulations.

Classes

MeshCfg

Configuration parameters for a USD Geometry or Geom prim.

MeshCapsuleCfg

Configuration parameters for a capsule mesh prim.

MeshConeCfg

Configuration parameters for a cone mesh prim.

MeshCuboidCfg

Configuration parameters for a cuboid mesh prim with deformable properties.

MeshCylinderCfg

Configuration parameters for a cylinder mesh prim with deformable properties.

MeshSphereCfg

Configuration parameters for a sphere mesh prim with deformable properties.

class omni.isaac.lab.sim.spawners.meshes.MeshCfg[source]#

Configuration parameters for a USD Geometry or Geom prim.

This class is similar to ShapeCfg but is specifically for meshes.

Meshes support both rigid and deformable properties. However, their schemas are applied at different levels in the USD hierarchy based on the type of the object. These are described below:

  • Deformable body properties: Applied to the mesh prim: {prim_path}/geometry/mesh.

  • Collision properties: Applied to the mesh prim: {prim_path}/geometry/mesh.

  • Rigid body properties: Applied to the parent prim: {prim_path}.

where {prim_path} is the path to the prim in the USD stage and {prim_path}/geometry/mesh is the path to the mesh prim.

Note

There are mututally exclusive parameters for rigid and deformable properties. If both are set, then an error will be raised. This also holds if collision and deformable properties are set together.

Attributes:

visual_material_path

Path to the visual material to use for the prim.

visual_material

Visual material properties.

physics_material_path

Path to the physics material to use for the prim.

physics_material

Physics material properties.

visual_material_path: str#

Path to the visual material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if visual_material is not None.

visual_material: materials.VisualMaterialCfg | None#

Visual material properties.

Note

If None, then no visual material will be added.

physics_material_path: str#

Path to the physics material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if physics_material is not None.

physics_material: materials.PhysicsMaterialCfg | None#

Physics material properties.

Note

If None, then no physics material will be added.

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

mass_props: schemas.MassPropertiesCfg | None#

Mass properties.

deformable_props: schemas.DeformableBodyPropertiesCfg | None#

Deformable body properties.

rigid_props: schemas.RigidBodyPropertiesCfg | None#

Rigid body properties.

For making a rigid object static, set the schemas.RigidBodyPropertiesCfg.kinematic_enabled as True. This will make the object static and will not be affected by gravity or other forces.

collision_props: schemas.CollisionPropertiesCfg | None#

Properties to apply to all collision meshes.

activate_contact_sensors: bool#

Activate contact reporting on all rigid bodies. Defaults to False.

This adds the PhysxContactReporter API to all the rigid bodies in the given prim path and its children.

omni.isaac.lab.sim.spawners.meshes.spawn_mesh_capsule(prim_path: str, cfg: meshes_cfg.MeshCapsuleCfg, translation: tuple[float, float, float] | None = None, orientation: tuple[float, float, float, float] | None = None) Usd.Prim[source]#

Create a USD-Mesh capsule prim with the given attributes.

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 instance.

  • translation – The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to the origin.

  • orientation – The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to identity.

Returns:

The created prim.

Raises:

ValueError – If a prim already exists at the given path.

class omni.isaac.lab.sim.spawners.meshes.MeshCapsuleCfg[source]#

Bases: MeshCfg

Configuration parameters for a capsule mesh prim.

See spawn_capsule() for more information.

Attributes:

radius

Radius of the capsule (in m).

height

Height of the capsule (in m).

axis

Axis of the capsule.

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

mass_props: schemas.MassPropertiesCfg | None#

Mass properties.

deformable_props: schemas.DeformableBodyPropertiesCfg | None#

Deformable body properties.

rigid_props: schemas.RigidBodyPropertiesCfg | None#

Rigid body properties.

For making a rigid object static, set the schemas.RigidBodyPropertiesCfg.kinematic_enabled as True. This will make the object static and will not be affected by gravity or other forces.

collision_props: schemas.CollisionPropertiesCfg | None#

Properties to apply to all collision meshes.

activate_contact_sensors: bool#

Activate contact reporting on all rigid bodies. Defaults to False.

This adds the PhysxContactReporter API to all the rigid bodies in the given prim path and its children.

visual_material_path: str#

Path to the visual material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if visual_material is not None.

visual_material: materials.VisualMaterialCfg | None#

Visual material properties.

Note

If None, then no visual material will be added.

physics_material_path: str#

Path to the physics material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if physics_material is not None.

physics_material: materials.PhysicsMaterialCfg | None#

Physics material properties.

Note

If None, then no physics material will be added.

radius: float#

Radius of the capsule (in m).

height: float#

Height of the capsule (in m).

axis: Literal['X', 'Y', 'Z']#

Axis of the capsule. Defaults to “Z”.

omni.isaac.lab.sim.spawners.meshes.spawn_mesh_cone(prim_path: str, cfg: meshes_cfg.MeshConeCfg, translation: tuple[float, float, float] | None = None, orientation: tuple[float, float, float, float] | None = None) Usd.Prim[source]#

Create a USD-Mesh cone prim with the given attributes.

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 instance.

  • translation – The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to the origin.

  • orientation – The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to identity.

Returns:

The created prim.

Raises:

ValueError – If a prim already exists at the given path.

class omni.isaac.lab.sim.spawners.meshes.MeshConeCfg[source]#

Bases: MeshCfg

Configuration parameters for a cone mesh prim.

See spawn_cone() for more information.

Attributes:

radius

Radius of the cone (in m).

height

Height of the v (in m).

axis

Axis of the cone.

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

mass_props: schemas.MassPropertiesCfg | None#

Mass properties.

deformable_props: schemas.DeformableBodyPropertiesCfg | None#

Deformable body properties.

rigid_props: schemas.RigidBodyPropertiesCfg | None#

Rigid body properties.

For making a rigid object static, set the schemas.RigidBodyPropertiesCfg.kinematic_enabled as True. This will make the object static and will not be affected by gravity or other forces.

collision_props: schemas.CollisionPropertiesCfg | None#

Properties to apply to all collision meshes.

activate_contact_sensors: bool#

Activate contact reporting on all rigid bodies. Defaults to False.

This adds the PhysxContactReporter API to all the rigid bodies in the given prim path and its children.

visual_material_path: str#

Path to the visual material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if visual_material is not None.

visual_material: materials.VisualMaterialCfg | None#

Visual material properties.

Note

If None, then no visual material will be added.

physics_material_path: str#

Path to the physics material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if physics_material is not None.

physics_material: materials.PhysicsMaterialCfg | None#

Physics material properties.

Note

If None, then no physics material will be added.

radius: float#

Radius of the cone (in m).

height: float#

Height of the v (in m).

axis: Literal['X', 'Y', 'Z']#

Axis of the cone. Defaults to “Z”.

omni.isaac.lab.sim.spawners.meshes.spawn_mesh_cuboid(prim_path: str, cfg: meshes_cfg.MeshCuboidCfg, translation: tuple[float, float, float] | None = None, orientation: tuple[float, float, float, float] | None = None) Usd.Prim[source]#

Create a USD-Mesh cuboid prim with the given attributes.

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 instance.

  • translation – The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to the origin.

  • orientation – The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to identity.

Returns:

The created prim.

Raises:

ValueError – If a prim already exists at the given path.

class omni.isaac.lab.sim.spawners.meshes.MeshCuboidCfg[source]#

Bases: MeshCfg

Configuration parameters for a cuboid mesh prim with deformable properties.

See spawn_mesh_cuboid() for more information.

Attributes:

size

Size of the cuboid (in m).

size: tuple[float, float, float]#

Size of the cuboid (in m).

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

mass_props: schemas.MassPropertiesCfg | None#

Mass properties.

deformable_props: schemas.DeformableBodyPropertiesCfg | None#

Deformable body properties.

rigid_props: schemas.RigidBodyPropertiesCfg | None#

Rigid body properties.

For making a rigid object static, set the schemas.RigidBodyPropertiesCfg.kinematic_enabled as True. This will make the object static and will not be affected by gravity or other forces.

collision_props: schemas.CollisionPropertiesCfg | None#

Properties to apply to all collision meshes.

activate_contact_sensors: bool#

Activate contact reporting on all rigid bodies. Defaults to False.

This adds the PhysxContactReporter API to all the rigid bodies in the given prim path and its children.

visual_material_path: str#

Path to the visual material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if visual_material is not None.

visual_material: materials.VisualMaterialCfg | None#

Visual material properties.

Note

If None, then no visual material will be added.

physics_material_path: str#

Path to the physics material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if physics_material is not None.

physics_material: materials.PhysicsMaterialCfg | None#

Physics material properties.

Note

If None, then no physics material will be added.

omni.isaac.lab.sim.spawners.meshes.spawn_mesh_cylinder(prim_path: str, cfg: meshes_cfg.MeshCylinderCfg, translation: tuple[float, float, float] | None = None, orientation: tuple[float, float, float, float] | None = None) Usd.Prim[source]#

Create a USD-Mesh cylinder prim with the given attributes.

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 instance.

  • translation – The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to the origin.

  • orientation – The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to identity.

Returns:

The created prim.

Raises:

ValueError – If a prim already exists at the given path.

class omni.isaac.lab.sim.spawners.meshes.MeshCylinderCfg[source]#

Bases: MeshCfg

Configuration parameters for a cylinder mesh prim with deformable properties.

See spawn_cylinder() for more information.

Attributes:

radius

Radius of the cylinder (in m).

height

Height of the cylinder (in m).

axis

Axis of the cylinder.

radius: float#

Radius of the cylinder (in m).

height: float#

Height of the cylinder (in m).

axis: Literal['X', 'Y', 'Z']#

Axis of the cylinder. Defaults to “Z”.

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

mass_props: schemas.MassPropertiesCfg | None#

Mass properties.

deformable_props: schemas.DeformableBodyPropertiesCfg | None#

Deformable body properties.

rigid_props: schemas.RigidBodyPropertiesCfg | None#

Rigid body properties.

For making a rigid object static, set the schemas.RigidBodyPropertiesCfg.kinematic_enabled as True. This will make the object static and will not be affected by gravity or other forces.

collision_props: schemas.CollisionPropertiesCfg | None#

Properties to apply to all collision meshes.

activate_contact_sensors: bool#

Activate contact reporting on all rigid bodies. Defaults to False.

This adds the PhysxContactReporter API to all the rigid bodies in the given prim path and its children.

visual_material_path: str#

Path to the visual material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if visual_material is not None.

visual_material: materials.VisualMaterialCfg | None#

Visual material properties.

Note

If None, then no visual material will be added.

physics_material_path: str#

Path to the physics material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if physics_material is not None.

physics_material: materials.PhysicsMaterialCfg | None#

Physics material properties.

Note

If None, then no physics material will be added.

omni.isaac.lab.sim.spawners.meshes.spawn_mesh_sphere(prim_path: str, cfg: meshes_cfg.MeshSphereCfg, translation: tuple[float, float, float] | None = None, orientation: tuple[float, float, float, float] | None = None) Usd.Prim[source]#

Create a USD-Mesh sphere prim with the given attributes.

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 instance.

  • translation – The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to the origin.

  • orientation – The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to identity.

Returns:

The created prim.

Raises:

ValueError – If a prim already exists at the given path.

class omni.isaac.lab.sim.spawners.meshes.MeshSphereCfg[source]#

Bases: MeshCfg

Configuration parameters for a sphere mesh prim with deformable properties.

See spawn_mesh_sphere() for more information.

Attributes:

radius

Radius of the sphere (in m).

radius: float#

Radius of the sphere (in m).

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

mass_props: schemas.MassPropertiesCfg | None#

Mass properties.

deformable_props: schemas.DeformableBodyPropertiesCfg | None#

Deformable body properties.

rigid_props: schemas.RigidBodyPropertiesCfg | None#

Rigid body properties.

For making a rigid object static, set the schemas.RigidBodyPropertiesCfg.kinematic_enabled as True. This will make the object static and will not be affected by gravity or other forces.

collision_props: schemas.CollisionPropertiesCfg | None#

Properties to apply to all collision meshes.

activate_contact_sensors: bool#

Activate contact reporting on all rigid bodies. Defaults to False.

This adds the PhysxContactReporter API to all the rigid bodies in the given prim path and its children.

visual_material_path: str#

Path to the visual material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if visual_material is not None.

visual_material: materials.VisualMaterialCfg | None#

Visual material properties.

Note

If None, then no visual material will be added.

physics_material_path: str#

Path to the physics material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if physics_material is not None.

physics_material: materials.PhysicsMaterialCfg | None#

Physics material properties.

Note

If None, then no physics material will be added.

Lights#

Sub-module for spawners that spawn lights in the simulation.

There are various different kinds of lights that can be spawned into the USD stage. Please check the Omniverse documentation for lighting overview.

Classes

LightCfg

Configuration parameters for creating a light in the scene.

CylinderLightCfg

Configuration parameters for creating a cylinder light in the scene.

DiskLightCfg

Configuration parameters for creating a disk light in the scene.

DistantLightCfg

Configuration parameters for creating a distant light in the scene.

DomeLightCfg

Configuration parameters for creating a dome light in the scene.

SphereLightCfg

Configuration parameters for creating a sphere light in the scene.

omni.isaac.lab.sim.spawners.lights.spawn_light(prim_path: str, cfg: lights_cfg.LightCfg, translation: tuple[float, float, float] | None = None, orientation: tuple[float, float, float, float] | None = None) Usd.Prim[source]#

Create a light prim at the specified prim path with the specified configuration.

The created prim is based on the USD.LuxLight API.

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 light source.

  • translation – The translation of the prim. Defaults to None, in which case this is set to the origin.

  • orientation – The orientation of the prim as (w, x, y, z). Defaults to None, in which case this is set to identity.

Raises:

ValueError – When a prim already exists at the specified prim path.

class omni.isaac.lab.sim.spawners.lights.LightCfg[source]#

Configuration parameters for creating a light in the scene.

Please refer to the documentation on USD LuxLight for more information.

Note

The default values for the attributes are those specified in the their official documentation.

Attributes:

prim_type

The prim type name for the light prim.

color

The color of emitted light, in energy-linear terms.

enable_color_temperature

Enables color temperature.

color_temperature

Color temperature (in Kelvin) representing the white point.

normalize

Normalizes power by the surface area of the light.

exposure

Scales the power of the light exponentially as a power of 2.

intensity

Scales the power of the light linearly.

prim_type: str#

The prim type name for the light prim.

color: tuple[float, float, float]#

The color of emitted light, in energy-linear terms. Defaults to white.

enable_color_temperature: bool#

Enables color temperature. Defaults to false.

color_temperature: float#

Color temperature (in Kelvin) representing the white point. The valid range is [1000, 10000]. Defaults to 6500K.

The color temperature corresponds to the warmth or coolness of light. Warmer light has a lower color temperature, while cooler light has a higher color temperature.

Note

It only takes effect when enable_color_temperature is true.

normalize: bool#

Normalizes power by the surface area of the light. Defaults to false.

This makes it easier to independently adjust the power and shape of the light, by causing the power to not vary with the area or angular size of the light.

exposure: float#

Scales the power of the light exponentially as a power of 2. Defaults to 0.0.

The result is multiplied against the intensity.

intensity: float#

Scales the power of the light linearly. Defaults to 1.0.

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

class omni.isaac.lab.sim.spawners.lights.CylinderLightCfg[source]#

Configuration parameters for creating a cylinder light in the scene.

A cylinder light is a light source that emits light from a cylinder. It is useful for simulating fluorescent lights. For more information, please refer to the documentation on USDLux CylinderLight.

Note

The default values for the attributes are those specified in the their official documentation.

Attributes:

length

Length of the cylinder (in m).

radius

Radius of the cylinder (in m).

treat_as_line

Treats the cylinder as a line source, i.e. a zero-radius cylinder.

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

color: tuple[float, float, float]#

The color of emitted light, in energy-linear terms. Defaults to white.

enable_color_temperature: bool#

Enables color temperature. Defaults to false.

color_temperature: float#

Color temperature (in Kelvin) representing the white point. The valid range is [1000, 10000]. Defaults to 6500K.

The color temperature corresponds to the warmth or coolness of light. Warmer light has a lower color temperature, while cooler light has a higher color temperature.

Note

It only takes effect when enable_color_temperature is true.

normalize: bool#

Normalizes power by the surface area of the light. Defaults to false.

This makes it easier to independently adjust the power and shape of the light, by causing the power to not vary with the area or angular size of the light.

exposure: float#

Scales the power of the light exponentially as a power of 2. Defaults to 0.0.

The result is multiplied against the intensity.

intensity: float#

Scales the power of the light linearly. Defaults to 1.0.

prim_type: str#

The prim type name for the light prim.

length: float#

Length of the cylinder (in m). Defaults to 1.0m.

radius: float#

Radius of the cylinder (in m). Defaults to 0.5m.

treat_as_line: bool#

Treats the cylinder as a line source, i.e. a zero-radius cylinder. Defaults to false.

class omni.isaac.lab.sim.spawners.lights.DiskLightCfg[source]#

Configuration parameters for creating a disk light in the scene.

A disk light is a light source that emits light from a disk. It is useful for simulating fluorescent lights. For more information, please refer to the documentation on USDLux DiskLight.

Note

The default values for the attributes are those specified in the their official documentation.

Attributes:

radius

Radius of the disk (in m).

prim_type: str#

The prim type name for the light prim.

radius: float#

Radius of the disk (in m). Defaults to 0.5m.

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

color: tuple[float, float, float]#

The color of emitted light, in energy-linear terms. Defaults to white.

enable_color_temperature: bool#

Enables color temperature. Defaults to false.

color_temperature: float#

Color temperature (in Kelvin) representing the white point. The valid range is [1000, 10000]. Defaults to 6500K.

The color temperature corresponds to the warmth or coolness of light. Warmer light has a lower color temperature, while cooler light has a higher color temperature.

Note

It only takes effect when enable_color_temperature is true.

normalize: bool#

Normalizes power by the surface area of the light. Defaults to false.

This makes it easier to independently adjust the power and shape of the light, by causing the power to not vary with the area or angular size of the light.

exposure: float#

Scales the power of the light exponentially as a power of 2. Defaults to 0.0.

The result is multiplied against the intensity.

intensity: float#

Scales the power of the light linearly. Defaults to 1.0.

class omni.isaac.lab.sim.spawners.lights.DistantLightCfg[source]#

Configuration parameters for creating a distant light in the scene.

A distant light is a light source that is infinitely far away, and emits parallel rays of light. It is useful for simulating sun/moon light. For more information, please refer to the documentation on USDLux DistantLight.

Note

The default values for the attributes are those specified in the their official documentation.

Attributes:

angle

Angular size of the light (in degrees).

prim_type: str#

The prim type name for the light prim.

angle: float#

Angular size of the light (in degrees). Defaults to 0.53 degrees.

As an example, the Sun is approximately 0.53 degrees as seen from Earth. Higher values broaden the light and therefore soften shadow edges.

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

color: tuple[float, float, float]#

The color of emitted light, in energy-linear terms. Defaults to white.

enable_color_temperature: bool#

Enables color temperature. Defaults to false.

color_temperature: float#

Color temperature (in Kelvin) representing the white point. The valid range is [1000, 10000]. Defaults to 6500K.

The color temperature corresponds to the warmth or coolness of light. Warmer light has a lower color temperature, while cooler light has a higher color temperature.

Note

It only takes effect when enable_color_temperature is true.

normalize: bool#

Normalizes power by the surface area of the light. Defaults to false.

This makes it easier to independently adjust the power and shape of the light, by causing the power to not vary with the area or angular size of the light.

exposure: float#

Scales the power of the light exponentially as a power of 2. Defaults to 0.0.

The result is multiplied against the intensity.

intensity: float#

Scales the power of the light linearly. Defaults to 1.0.

class omni.isaac.lab.sim.spawners.lights.DomeLightCfg[source]#

Configuration parameters for creating a dome light in the scene.

A dome light is a light source that emits light inwards from all directions. It is also possible to attach a texture to the dome light, which will be used to emit light. For more information, please refer to the documentation on USDLux DomeLight.

Note

The default values for the attributes are those specified in the their official documentation.

Attributes:

texture_file

A color texture to use on the dome, such as an HDR (high dynamic range) texture intended for IBL (image based lighting).

texture_format

The parametrization format of the color map file.

visible_in_primary_ray

Whether the dome light is visible in the primary ray.

prim_type: str#

The prim type name for the light prim.

texture_file: str | None#

A color texture to use on the dome, such as an HDR (high dynamic range) texture intended for IBL (image based lighting). Defaults to None.

If None, the dome will emit a uniform color.

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

color: tuple[float, float, float]#

The color of emitted light, in energy-linear terms. Defaults to white.

enable_color_temperature: bool#

Enables color temperature. Defaults to false.

color_temperature: float#

Color temperature (in Kelvin) representing the white point. The valid range is [1000, 10000]. Defaults to 6500K.

The color temperature corresponds to the warmth or coolness of light. Warmer light has a lower color temperature, while cooler light has a higher color temperature.

Note

It only takes effect when enable_color_temperature is true.

normalize: bool#

Normalizes power by the surface area of the light. Defaults to false.

This makes it easier to independently adjust the power and shape of the light, by causing the power to not vary with the area or angular size of the light.

exposure: float#

Scales the power of the light exponentially as a power of 2. Defaults to 0.0.

The result is multiplied against the intensity.

intensity: float#

Scales the power of the light linearly. Defaults to 1.0.

texture_format: Literal['automatic', 'latlong', 'mirroredBall', 'angular', 'cubeMapVerticalCross']#

The parametrization format of the color map file. Defaults to “automatic”.

Valid values are:

  • "automatic": Tries to determine the layout from the file itself. For example, Renderman texture files embed an explicit parameterization.

  • "latlong": Latitude as X, longitude as Y.

  • "mirroredBall": An image of the environment reflected in a sphere, using an implicitly orthogonal projection.

  • "angular": Similar to mirroredBall but the radial dimension is mapped linearly to the angle, providing better sampling at the edges.

  • "cubeMapVerticalCross": A cube map with faces laid out as a vertical cross.

visible_in_primary_ray: bool#

Whether the dome light is visible in the primary ray. Defaults to True.

If true, the texture in the sky is visible, otherwise the sky is black.

class omni.isaac.lab.sim.spawners.lights.SphereLightCfg[source]#

Configuration parameters for creating a sphere light in the scene.

A sphere light is a light source that emits light outward from a sphere. For more information, please refer to the documentation on USDLux SphereLight.

Note

The default values for the attributes are those specified in the their official documentation.

Attributes:

radius

Radius of the sphere.

treat_as_point

Treats the sphere as a point source, i.e. a zero-radius sphere.

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

color: tuple[float, float, float]#

The color of emitted light, in energy-linear terms. Defaults to white.

enable_color_temperature: bool#

Enables color temperature. Defaults to false.

color_temperature: float#

Color temperature (in Kelvin) representing the white point. The valid range is [1000, 10000]. Defaults to 6500K.

The color temperature corresponds to the warmth or coolness of light. Warmer light has a lower color temperature, while cooler light has a higher color temperature.

Note

It only takes effect when enable_color_temperature is true.

normalize: bool#

Normalizes power by the surface area of the light. Defaults to false.

This makes it easier to independently adjust the power and shape of the light, by causing the power to not vary with the area or angular size of the light.

exposure: float#

Scales the power of the light exponentially as a power of 2. Defaults to 0.0.

The result is multiplied against the intensity.

intensity: float#

Scales the power of the light linearly. Defaults to 1.0.

prim_type: str#

The prim type name for the light prim.

radius: float#

Radius of the sphere. Defaults to 0.5m.

treat_as_point: bool#

Treats the sphere as a point source, i.e. a zero-radius sphere. Defaults to false.

Sensors#

Sub-module for spawners that spawn sensors in the simulation.

Currently, the following sensors are supported:

  • Camera: A USD camera prim with settings for pinhole or fisheye projections.

Classes

PinholeCameraCfg

Configuration parameters for a USD camera prim with pinhole camera settings.

FisheyeCameraCfg

Configuration parameters for a USD camera prim with fish-eye camera settings.

omni.isaac.lab.sim.spawners.sensors.spawn_camera(prim_path: str, cfg: sensors_cfg.PinholeCameraCfg | sensors_cfg.FisheyeCameraCfg, translation: tuple[float, float, float] | None = None, orientation: tuple[float, float, float, float] | None = None) Usd.Prim[source]#

Create a USD camera prim with given projection type.

The function creates various attributes on the camera prim that specify the camera’s properties. These are later used by omni.replicator.core to render the scene with the given camera.

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 instance.

  • translation – The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to the origin.

  • orientation – The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None, in which case this is set to identity.

Returns:

The created prim.

Raises:

ValueError – If a prim already exists at the given path.

class omni.isaac.lab.sim.spawners.sensors.PinholeCameraCfg[source]#

Configuration parameters for a USD camera prim with pinhole camera settings.

For more information on the parameters, please refer to the camera documentation.

Note

The default values are taken from the Replicator camera function.

Attributes:

projection_type

Type of projection to use for the camera.

clipping_range

Near and far clipping distances (in m).

focal_length

Perspective focal length (in cm).

focus_distance

Distance from the camera to the focus plane (in m).

f_stop

Lens aperture.

horizontal_aperture

Horizontal aperture (in mm).

horizontal_aperture_offset

Offsets Resolution/Film gate horizontally.

vertical_aperture_offset

Offsets Resolution/Film gate vertically.

lock_camera

Locks the camera in the Omniverse viewport.

projection_type: str#

Type of projection to use for the camera. Defaults to “pinhole”.

Note

Currently only “pinhole” is supported.

clipping_range: tuple[float, float]#

Near and far clipping distances (in m). Defaults to (0.01, 1e6).

The minimum clipping range will shift the camera forward by the specified distance. Don’t set it too high to avoid issues for distance related data types (e.g., distance_to_image_plane).

focal_length: float#

Perspective focal length (in cm). Defaults to 24.0cm.

Longer lens lengths narrower FOV, shorter lens lengths wider FOV.

focus_distance: float#

Distance from the camera to the focus plane (in m). Defaults to 400.0.

The distance at which perfect sharpness is achieved.

f_stop: float#

Lens aperture. Defaults to 0.0, which turns off focusing.

Controls Distance Blurring. Lower Numbers decrease focus range, larger numbers increase it.

horizontal_aperture: float#

Horizontal aperture (in mm). Defaults to 20.955mm.

Emulates sensor/film width on a camera.

Note

The default value is the horizontal aperture of a 35 mm spherical projector.

horizontal_aperture_offset: float#

Offsets Resolution/Film gate horizontally. Defaults to 0.0.

vertical_aperture_offset: float#

Offsets Resolution/Film gate vertically. Defaults to 0.0.

lock_camera: bool#

Locks the camera in the Omniverse viewport. Defaults to True.

If True, then the camera remains fixed at its configured transform. This is useful when wanting to view the camera output on the GUI and not accidentally moving the camera through the GUI interactions.

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

class omni.isaac.lab.sim.spawners.sensors.FisheyeCameraCfg[source]#

Configuration parameters for a USD camera prim with fish-eye camera settings.

For more information on the parameters, please refer to the camera documentation.

Note

The default values are taken from the Replicator camera function.

Attributes:

projection_type

Type of projection to use for the camera.

fisheye_nominal_width

Nominal width of fisheye lens model (in pixels).

fisheye_nominal_height

Nominal height of fisheye lens model (in pixels).

fisheye_optical_centre_x

Horizontal optical centre position of fisheye lens model (in pixels).

fisheye_optical_centre_y

Vertical optical centre position of fisheye lens model (in pixels).

fisheye_max_fov

Maximum field of view of fisheye lens model (in degrees).

fisheye_polynomial_a

First component of fisheye polynomial.

fisheye_polynomial_b

Second component of fisheye polynomial.

fisheye_polynomial_c

Third component of fisheye polynomial.

fisheye_polynomial_d

Fourth component of fisheye polynomial.

fisheye_polynomial_e

Fifth component of fisheye polynomial.

fisheye_polynomial_f

Sixth component of fisheye polynomial.

projection_type: Literal['fisheye_orthographic', 'fisheye_equidistant', 'fisheye_equisolid', 'fisheye_polynomial', 'fisheye_spherical']#

Type of projection to use for the camera. Defaults to “fisheye_polynomial”.

Available options:

  • "fisheye_orthographic": Fisheye camera model using orthographic correction.

  • "fisheye_equidistant": Fisheye camera model using equidistant correction.

  • "fisheye_equisolid": Fisheye camera model using equisolid correction.

  • "fisheye_polynomial": Fisheye camera model with \(360^{\circ}\) spherical projection.

  • "fisheye_spherical": Fisheye camera model with \(360^{\circ}\) full-frame projection.

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

clipping_range: tuple[float, float]#

Near and far clipping distances (in m). Defaults to (0.01, 1e6).

The minimum clipping range will shift the camera forward by the specified distance. Don’t set it too high to avoid issues for distance related data types (e.g., distance_to_image_plane).

focal_length: float#

Perspective focal length (in cm). Defaults to 24.0cm.

Longer lens lengths narrower FOV, shorter lens lengths wider FOV.

focus_distance: float#

Distance from the camera to the focus plane (in m). Defaults to 400.0.

The distance at which perfect sharpness is achieved.

f_stop: float#

Lens aperture. Defaults to 0.0, which turns off focusing.

Controls Distance Blurring. Lower Numbers decrease focus range, larger numbers increase it.

horizontal_aperture: float#

Horizontal aperture (in mm). Defaults to 20.955mm.

Emulates sensor/film width on a camera.

Note

The default value is the horizontal aperture of a 35 mm spherical projector.

horizontal_aperture_offset: float#

Offsets Resolution/Film gate horizontally. Defaults to 0.0.

vertical_aperture_offset: float#

Offsets Resolution/Film gate vertically. Defaults to 0.0.

lock_camera: bool#

Locks the camera in the Omniverse viewport. Defaults to True.

If True, then the camera remains fixed at its configured transform. This is useful when wanting to view the camera output on the GUI and not accidentally moving the camera through the GUI interactions.

fisheye_nominal_width: float#

Nominal width of fisheye lens model (in pixels). Defaults to 1936.0.

fisheye_nominal_height: float#

Nominal height of fisheye lens model (in pixels). Defaults to 1216.0.

fisheye_optical_centre_x: float#

Horizontal optical centre position of fisheye lens model (in pixels). Defaults to 970.94244.

fisheye_optical_centre_y: float#

Vertical optical centre position of fisheye lens model (in pixels). Defaults to 600.37482.

fisheye_max_fov: float#

Maximum field of view of fisheye lens model (in degrees). Defaults to 200.0 degrees.

fisheye_polynomial_a: float#

First component of fisheye polynomial. Defaults to 0.0.

fisheye_polynomial_b: float#

Second component of fisheye polynomial. Defaults to 0.00245.

fisheye_polynomial_c: float#

Third component of fisheye polynomial. Defaults to 0.0.

fisheye_polynomial_d: float#

Fourth component of fisheye polynomial. Defaults to 0.0.

fisheye_polynomial_e: float#

Fifth component of fisheye polynomial. Defaults to 0.0.

fisheye_polynomial_f: float#

Sixth component of fisheye polynomial. Defaults to 0.0.

From Files#

Sub-module for spawners that spawn assets from files.

Currently, the following spawners are supported:

Classes

UrdfFileCfg

URDF file to spawn asset from.

UsdFileCfg

USD file to spawn asset from.

GroundPlaneCfg

Create a ground plane prim.

omni.isaac.lab.sim.spawners.from_files.spawn_from_urdf(prim_path: str, cfg: from_files_cfg.UrdfFileCfg, translation: tuple[float, float, float] | None = None, orientation: tuple[float, float, float, float] | None = None) Usd.Prim[source]#

Spawn an asset from a URDF file and override the settings with the given config.

It uses the UrdfConverter class to create a USD file from URDF. This file is then imported at the specified prim path.

In case a prim already exists at the given prim path, then the function does not create a new prim or throw an error that the prim already exists. Instead, it just takes the existing prim and overrides the settings with the given config.

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 instance.

  • translation – The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which case the translation specified in the generated USD file is used.

  • orientation – The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None, in which case the orientation specified in the generated USD file is used.

Returns:

The prim of the spawned asset.

Raises:

FileNotFoundError – If the URDF file does not exist at the given path.

class omni.isaac.lab.sim.spawners.from_files.UrdfFileCfg[source]#

URDF file to spawn asset from.

It uses the UrdfConverter class to create a USD file from URDF and spawns the imported USD file. Similar to the UsdFileCfg, the generated USD file can be modified by specifying the respective properties in the configuration class.

See spawn_from_urdf() for more information.

Note

The configuration parameters include various properties. If not None, these properties are modified on the spawned prim in a nested manner.

If they are set to a value, then the properties are modified on the spawned prim in a nested manner. This is done by calling the respective function with the specified properties.

asset_path: str#

The absolute path to the asset file to convert into USD.

usd_dir: str | None#

The output directory path to store the generated USD file. Defaults to None.

If None, it is resolved as /tmp/IsaacLab/usd_{date}_{time}_{random}, where the parameters in braces are runtime generated.

usd_file_name: str | None#

The name of the generated usd file. Defaults to None.

If None, it is resolved from the asset file name. For example, if the asset file name is "my_asset.urdf", then the generated USD file name is "my_asset.usd".

If the providing file name does not end with “.usd” or “.usda”, then the extension “.usd” is appended to the file name.

force_usd_conversion: bool#

Force the conversion of the asset file to usd. Defaults to False.

If True, then the USD file is always generated. It will overwrite the existing USD file if it exists.

make_instanceable: bool#

Make the generated USD file instanceable. Defaults to True.

Note

Instancing helps reduce the memory footprint of the asset when multiple copies of the asset are used in the scene. For more information, please check the USD documentation on scene-graph instancing.

import_inertia_tensor: bool#

Import the inertia tensor from urdf. Defaults to True.

If the "inertial" tag is missing, then it is imported as an identity.

fix_base: bool#

Create a fix joint to the root/base link. Defaults to True.

merge_fixed_joints: bool#

Consolidate links that are connected by fixed joints. Defaults to False.

self_collision: bool#

Activate self-collisions between links of the articulation. Defaults to False.

default_drive_type: Literal['none', 'position', 'velocity']#

The drive type used for joints. Defaults to "none".

The drive type dictates the loaded joint PD gains and USD attributes for joint control:

  • "none": The joint stiffness and damping are set to 0.0.

  • "position": The joint stiff and damping are set based on the URDF file or provided configuration.

  • "velocity": The joint stiff is set to zero and damping is based on the URDF file or provided configuration.

override_joint_dynamics: bool#

Override the joint dynamics parsed from the URDF file. Defaults to False.

default_drive_stiffness: float#

The default stiffness of the joint drive. Defaults to 0.0.

default_drive_damping: float#

The default damping of the joint drive. Defaults to 0.0.

Note

If override_joint_dynamics is True, the values parsed from the URDF joint tag "<dynamics><damping>" are used. Otherwise, it is overridden by the configured value.

Default density used for links. Defaults to 0.

This setting is only effective if "inertial" properties are missing in the URDF.

convex_decompose_mesh: bool#

Decompose a convex mesh into smaller pieces for a closer fit. Defaults to False.

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

mass_props: schemas.MassPropertiesCfg | None#

Mass properties.

deformable_props: schemas.DeformableBodyPropertiesCfg | None#

Deformable body properties.

rigid_props: schemas.RigidBodyPropertiesCfg | None#

Rigid body properties.

For making a rigid object static, set the schemas.RigidBodyPropertiesCfg.kinematic_enabled as True. This will make the object static and will not be affected by gravity or other forces.

collision_props: schemas.CollisionPropertiesCfg | None#

Properties to apply to all collision meshes.

activate_contact_sensors: bool#

Activate contact reporting on all rigid bodies. Defaults to False.

This adds the PhysxContactReporter API to all the rigid bodies in the given prim path and its children.

scale: tuple[float, float, float] | None#

Scale of the asset. Defaults to None, in which case the scale is not modified.

articulation_props: schemas.ArticulationRootPropertiesCfg | None#

Properties to apply to the articulation root.

fixed_tendons_props: schemas.FixedTendonsPropertiesCfg | None#

Properties to apply to the fixed tendons (if any).

joint_drive_props: schemas.JointDrivePropertiesCfg | None#

Properties to apply to a joint.

visual_material_path: str#

Path to the visual material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if visual_material is not None.

visual_material: materials.VisualMaterialCfg | None#

Visual material properties to override the visual material properties in the URDF file.

Note

If None, then no visual material will be added.

omni.isaac.lab.sim.spawners.from_files.spawn_from_usd(prim_path: str, cfg: from_files_cfg.UsdFileCfg, translation: tuple[float, float, float] | None = None, orientation: tuple[float, float, float, float] | None = None) Usd.Prim[source]#

Spawn an asset from a USD file and override the settings with the given config.

In the case of a USD file, the asset is spawned at the default prim specified in the USD file. If a default prim is not specified, then the asset is spawned at the root prim.

In case a prim already exists at the given prim path, then the function does not create a new prim or throw an error that the prim already exists. Instead, it just takes the existing prim and overrides the settings with the given config.

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 instance.

  • translation – The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which case the translation specified in the USD file is used.

  • orientation – The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None, in which case the orientation specified in the USD file is used.

Returns:

The prim of the spawned asset.

Raises:

FileNotFoundError – If the USD file does not exist at the given path.

class omni.isaac.lab.sim.spawners.from_files.UsdFileCfg[source]#

USD file to spawn asset from.

USD files are imported directly into the scene. However, given their complexity, there are various different operations that can be performed on them. For example, selecting variants, applying materials, or modifying existing properties.

To prevent the explosion of configuration parameters, the available operations are limited to the most common ones. These include:

  • Selecting variants: This is done by specifying the variants parameter.

  • Creating and applying materials: This is done by specifying the visual_material and physics_material parameters.

  • Modifying existing properties: This is done by specifying the respective properties in the configuration class. For instance, to modify the scale of the imported prim, set the scale parameter.

See spawn_from_usd() for more information.

Note

The configuration parameters include various properties. If not None, these properties are modified on the spawned prim in a nested manner.

If they are set to a value, then the properties are modified on the spawned prim in a nested manner. This is done by calling the respective function with the specified properties.

Attributes:

usd_path

Path to the USD file to spawn asset from.

variants

Variants to select from in the input USD file.

usd_path: str#

Path to the USD file to spawn asset from.

variants: object | dict[str, str] | None#

Variants to select from in the input USD file. Defaults to None, in which case no variants are applied.

This can either be a configclass object, in which case each attribute is used as a variant set name and its specified value, or a dictionary mapping between the two. Please check the select_usd_variants() function for more information.

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

mass_props: schemas.MassPropertiesCfg | None#

Mass properties.

deformable_props: schemas.DeformableBodyPropertiesCfg | None#

Deformable body properties.

rigid_props: schemas.RigidBodyPropertiesCfg | None#

Rigid body properties.

For making a rigid object static, set the schemas.RigidBodyPropertiesCfg.kinematic_enabled as True. This will make the object static and will not be affected by gravity or other forces.

collision_props: schemas.CollisionPropertiesCfg | None#

Properties to apply to all collision meshes.

activate_contact_sensors: bool#

Activate contact reporting on all rigid bodies. Defaults to False.

This adds the PhysxContactReporter API to all the rigid bodies in the given prim path and its children.

scale: tuple[float, float, float] | None#

Scale of the asset. Defaults to None, in which case the scale is not modified.

articulation_props: schemas.ArticulationRootPropertiesCfg | None#

Properties to apply to the articulation root.

fixed_tendons_props: schemas.FixedTendonsPropertiesCfg | None#

Properties to apply to the fixed tendons (if any).

joint_drive_props: schemas.JointDrivePropertiesCfg | None#

Properties to apply to a joint.

visual_material_path: str#

Path to the visual material to use for the prim. Defaults to “material”.

If the path is relative, then it will be relative to the prim’s path. This parameter is ignored if visual_material is not None.

visual_material: materials.VisualMaterialCfg | None#

Visual material properties to override the visual material properties in the URDF file.

Note

If None, then no visual material will be added.

omni.isaac.lab.sim.spawners.from_files.spawn_ground_plane(prim_path: str, cfg: from_files_cfg.GroundPlaneCfg, translation: tuple[float, float, float] | None = None, orientation: tuple[float, float, float, float] | None = None) Usd.Prim[source]#

Spawns a ground plane into the scene.

This function loads the USD file containing the grid plane asset from Isaac Sim. It may not work with other assets for ground planes. In those cases, please use the spawn_from_usd function.

Note

This function takes keyword arguments to be compatible with other spawners. However, it does not use any of the kwargs.

Parameters:
  • prim_path – The path to spawn the asset at.

  • cfg – The configuration instance.

  • translation – The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which case the translation specified in the USD file is used.

  • orientation – The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None, in which case the orientation specified in the USD file is used.

Returns:

The prim of the spawned asset.

Raises:

ValueError – If the prim path already exists.

class omni.isaac.lab.sim.spawners.from_files.GroundPlaneCfg[source]#

Create a ground plane prim.

This uses the USD for the standard grid-world ground plane from Isaac Sim by default.

Attributes:

usd_path

Path to the USD file to spawn asset from.

color

The color of the ground plane.

size

The size of the ground plane.

physics_material

Physics material properties.

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.

New in version 2023.1: This parameter is only supported from Isaac Sim 2023.1 onwards. If you are using an older version of Isaac Sim, this parameter will be ignored.

usd_path: str#

Path to the USD file to spawn asset from. Defaults to the grid-world ground plane.

color: tuple[float, float, float] | None#

The color of the ground plane. Defaults to (0.0, 0.0, 0.0).

If None, then the color remains unchanged.

size: tuple[float, float]#

The size of the ground plane. Defaults to 100 m x 100 m.

physics_material: RigidBodyMaterialCfg#

Physics material properties. Defaults to the default rigid body material.

Materials#

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

Materials are used to define the appearance and physical properties of objects in the simulation. In Omniverse, they are defined using NVIDIA’s Material Definition Language (MDL). MDL is based on the physically-based rendering (PBR) model, which is a set of equations that describe how light interacts with a surface. The PBR model is used to create realistic-looking materials.

While MDL is primarily used for defining the appearance of objects, it can be extended to define the physical properties of objects. For example, the friction and restitution coefficients of a rubber material. A physics material can be assigned to a physics object to define its physical properties. There are different kinds of physics materials, such as rigid body material, deformable material, and fluid material.

In order to apply a material to an object, we “bind” the geometry of the object to the material. For this, we use the USD Material Binding API. The material binding API takes in the path to the geometry and the path to the material, and binds them together.

For physics material, the material is bound to the physics object with the ‘physics’ purpose. When parsing physics material properties on an object, the following priority is used:

  1. Material binding with a ‘physics’ purpose (physics material)

  2. Material binding with no purpose (visual material)

  3. Material binding with a ‘physics’ purpose on the Physics Scene prim.

  4. Default values of material properties inside PhysX.

Usage:
import omni.isaac.core.utils.prims as prim_utils

import omni.isaac.lab.sim as sim_utils

# create a visual material
visual_material_cfg = sim_utils.GlassMdlCfg(glass_ior=1.0, thin_walled=True)
visual_material_cfg.func("/World/Looks/glassMaterial", visual_material_cfg)

# create a mesh prim
cube_cfg = sim_utils.CubeCfg(size=[1.0, 1.0, 1.0])
cube_cfg.func("/World/Primitives/Cube", cube_cfg)

# bind the cube to the visual material
sim_utils.bind_visual_material("/World/Primitives/Cube", "/World/Looks/glassMaterial")

Classes

VisualMaterialCfg

Configuration parameters for creating a visual material.

PreviewSurfaceCfg

Configuration parameters for creating a preview surface.

MdlFileCfg

Configuration parameters for loading an MDL material from a file.

GlassMdlCfg

Configuration parameters for loading a glass MDL material.

PhysicsMaterialCfg

Configuration parameters for creating a physics material.

RigidBodyMaterialCfg

Physics material parameters for rigid bodies.

DeformableBodyMaterialCfg

Physics material parameters for deformable bodies.

Visual Materials#

class omni.isaac.lab.sim.spawners.materials.VisualMaterialCfg[source]#

Configuration parameters for creating a visual material.

omni.isaac.lab.sim.spawners.materials.spawn_preview_surface(prim_path: str, cfg: visual_materials_cfg.PreviewSurfaceCfg) Usd.Prim[source]#

Create a preview surface prim and override the settings with the given config.

A preview surface is a physically-based surface that handles simple shaders while supporting both specular and metallic workflows. All color inputs are in linear color space (RGB). For more information, see the documentation.

The function calls the USD command CreatePreviewSurfaceMaterialPrim to create the prim.

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 instance.

Returns:

The created prim.

Raises:

ValueError – If a prim already exists at the given path.

class omni.isaac.lab.sim.spawners.materials.PreviewSurfaceCfg[source]#

Configuration parameters for creating a preview surface.

See spawn_preview_surface() for more information.

Attributes:

diffuse_color

The RGB diffusion color.

emissive_color

The RGB emission component of the surface.

roughness

The roughness for specular lobe.

metallic

The metallic component.

opacity

The opacity of the surface.

diffuse_color: tuple[float, float, float]#

The RGB diffusion color. This is the base color of the surface. Defaults to a dark gray.

emissive_color: tuple[float, float, float]#

The RGB emission component of the surface. Defaults to black.

roughness: float#

The roughness for specular lobe. Ranges from 0 (smooth) to 1 (rough). Defaults to 0.5.

metallic: float#

The metallic component. Ranges from 0 (dielectric) to 1 (metal). Defaults to 0.

opacity: float#

The opacity of the surface. Ranges from 0 (transparent) to 1 (opaque). Defaults to 1.

Note

Opacity only affects the surface’s appearance during interactive rendering.

omni.isaac.lab.sim.spawners.materials.spawn_from_mdl_file(prim_path: str, cfg: visual_materials_cfg.MdlMaterialCfg) Usd.Prim[source]#

Load a material from its MDL file and override the settings with the given config.

NVIDIA’s Material Definition Language (MDL) is a language for defining physically-based materials. The MDL file format is a binary format that can be loaded by Omniverse and other applications such as Adobe Substance Designer. To learn more about MDL, see the documentation.

The function calls the USD command CreateMdlMaterialPrim to create the prim.

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 instance.

Returns:

The created prim.

Raises:

ValueError – If a prim already exists at the given path.

class omni.isaac.lab.sim.spawners.materials.MdlFileCfg[source]#

Configuration parameters for loading an MDL material from a file.

See spawn_from_mdl_file() for more information.

Attributes:

mdl_path

The path to the MDL material.

project_uvw

Whether to project the UVW coordinates of the material.

albedo_brightness

Multiplier for the diffuse color of the material.

texture_scale

The scale of the texture.

mdl_path: str#

The path to the MDL material.

NVIDIA Omniverse provides various MDL materials in the NVIDIA Nucleus. To use these materials, you can set the path of the material in the nucleus directory using the {NVIDIA_NUCLEUS_DIR} variable. This is internally resolved to the path of the NVIDIA Nucleus directory on the host machine through the attribute omni.isaac.lab.utils.assets.NVIDIA_NUCLEUS_DIR.

For example, to use the “Aluminum_Anodized” material, you can set the path to: {NVIDIA_NUCLEUS_DIR}/Materials/Base/Metals/Aluminum_Anodized.mdl.

project_uvw: bool | None#

Whether to project the UVW coordinates of the material. Defaults to None.

If None, then the default setting in the MDL material will be used.

albedo_brightness: float | None#

Multiplier for the diffuse color of the material. Defaults to None.

If None, then the default setting in the MDL material will be used.

texture_scale: tuple[float, float] | None#

The scale of the texture. Defaults to None.

If None, then the default setting in the MDL material will be used.

class omni.isaac.lab.sim.spawners.materials.GlassMdlCfg[source]#

Configuration parameters for loading a glass MDL material.

This is a convenience class for loading a glass MDL material. For more information on glass materials, see the documentation.

Note

The default values are taken from the glass material in the NVIDIA Nucleus.

Attributes:

mdl_path

The path to the MDL material.

glass_color

The RGB color or tint of the glass.

frosting_roughness

The amount of reflectivity of the surface.

thin_walled

Whether to perform thin-walled refraction.

glass_ior

The incidence of refraction to control how much light is bent when passing through the glass.

mdl_path: str#

The path to the MDL material. Defaults to the glass material in the NVIDIA Nucleus.

glass_color: tuple[float, float, float]#

The RGB color or tint of the glass. Defaults to white.

frosting_roughness: float#

The amount of reflectivity of the surface. Ranges from 0 (perfectly clear) to 1 (frosted). Defaults to 0.

thin_walled: bool#

Whether to perform thin-walled refraction. Defaults to False.

glass_ior: float#

The incidence of refraction to control how much light is bent when passing through the glass. Defaults to 1.491, which is the IOR of glass.

Physical Materials#

class omni.isaac.lab.sim.spawners.materials.PhysicsMaterialCfg[source]#

Configuration parameters for creating a physics material.

Physics material are PhysX schemas that can be applied to a USD material prim to define the physical properties related to the material. For example, the friction coefficient, restitution coefficient, etc. For more information on physics material, please refer to the PhysX documentation.

omni.isaac.lab.sim.spawners.materials.spawn_rigid_body_material(prim_path: str, cfg: physics_materials_cfg.RigidBodyMaterialCfg) Usd.Prim[source]#

Create material with rigid-body physics properties.

Rigid body materials are used to define the physical properties to meshes of a rigid body. These include the friction, restitution, and their respective combination modes. For more information on rigid body material, please refer to the documentation on PxMaterial.

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 rigid body material prim.

Raises:

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

class omni.isaac.lab.sim.spawners.materials.RigidBodyMaterialCfg[source]#

Physics material parameters for rigid bodies.

See spawn_rigid_body_material() for more information.

Note

The default values are the default values used by PhysX 5.

Attributes:

static_friction

The static friction coefficient.

dynamic_friction

The dynamic friction coefficient.

restitution

The restitution coefficient.

improve_patch_friction

Whether to enable patch friction.

friction_combine_mode

Determines the way friction will be combined during collisions.

restitution_combine_mode

Determines the way restitution coefficient will be combined during collisions.

compliant_contact_stiffness

Spring stiffness for a compliant contact model using implicit springs.

compliant_contact_damping

Damping coefficient for a compliant contact model using implicit springs.

static_friction: float#

The static friction coefficient. Defaults to 0.5.

dynamic_friction: float#

The dynamic friction coefficient. Defaults to 0.5.

restitution: float#

The restitution coefficient. Defaults to 0.0.

improve_patch_friction: bool#

Whether to enable patch friction. Defaults to True.

friction_combine_mode: Literal['average', 'min', 'multiply', 'max']#

Determines the way friction will be combined during collisions. Defaults to “average”.

Attention

When two physics materials with different combine modes collide, the combine mode with the higher priority will be used. The priority order is provided here.

restitution_combine_mode: Literal['average', 'min', 'multiply', 'max']#

Determines the way restitution coefficient will be combined during collisions. Defaults to “average”.

Attention

When two physics materials with different combine modes collide, the combine mode with the higher priority will be used. The priority order is provided here.

compliant_contact_stiffness: float#

Spring stiffness for a compliant contact model using implicit springs. Defaults to 0.0.

A higher stiffness results in behavior closer to a rigid contact. The compliant contact model is only enabled if the stiffness is larger than 0.

compliant_contact_damping: float#

Damping coefficient for a compliant contact model using implicit springs. Defaults to 0.0.

Irrelevant if compliant contacts are disabled when compliant_contact_stiffness is set to zero and rigid contacts are active.

omni.isaac.lab.sim.spawners.materials.spawn_deformable_body_material(prim_path: str, cfg: physics_materials_cfg.DeformableBodyMaterialCfg) 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 omni.isaac.lab.sim.spawners.materials.DeformableBodyMaterialCfg[source]#

Physics material parameters for deformable bodies.

See spawn_deformable_body_material() for more information.

Note

The default values are the default values used by PhysX 5.

Attributes:

density

The material density.

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

The elasticity damping for the deformable material.

damping_scale

The damping scale for the deformable material.

density: float | None#

The material density. Defaults to None, in which case the simulation decides the default density.

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 50000000.0.

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.

elasticity_damping: float#

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

damping_scale: float#

The damping scale for the deformable material. Defaults to 1.0.

A scale of 1 corresponds to default damping. A value of 0 will only apply damping to certain motions leading to special effects that look similar to water filled soft bodies.