Core [omni.isaac.core]

Articulations

Articulation

class Articulation(prim_path: str, name: str = 'articulation', position: Optional[Sequence[float]] = None, translation: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None, scale: Optional[Sequence[float]] = None, visible: Optional[bool] = None, articulation_controller: Optional[omni.isaac.core.controllers.articulation_controller.ArticulationController] = None, enable_dof_force_sensors: bool = False)

Provides high level functions to deal with an articulation prim and its attributes/ properties.

Parameters
  • prim_path (str) – prim path of the Prim to encapsulate or create.

  • name (str, optional) – shortname to be used as a key by Scene class. Note: needs to be unique if the object is added to the Scene. Defaults to “articulation”.

  • position (Optional[Sequence[float]], optional) – position in the world frame of the prim. shape is (3, ). Defaults to None, which means left unchanged.

  • translation (Optional[Sequence[float]], optional) – translation in the local frame of the prim (with respect to its parent prim). shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[Sequence[float]], optional) – quaternion orientation in the world/ local frame of the prim (depends if translation or position is specified). quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

  • scale (Optional[Sequence[float]], optional) – local scale to be applied to the prim’s dimensions. shape is (3, ). Defaults to None, which means left unchanged.

  • visible (bool, optional) – set to false for an invisible prim in the stage while rendering. Defaults to True.

  • articulation_controller (Optional[ArticulationController], optional) – a custom ArticulationController which inherits from it. Defaults to creating the basic ArticulationController.

  • enable_dof_force_sensors (bool, optional) – enables the solver computed dof force sensors on articulation joints. Defaults to False.

Raises

Exception – [description]

apply_action(control_actions: omni.isaac.core.utils.types.ArticulationAction) None

[summary]

Parameters
  • control_actions (ArticulationAction) – actions to be applied for next physics step.

  • indices (Optional[Union[list, np.ndarray]], optional) – degree of freedom indices to apply actions to. Defaults to all degrees of freedom.

Raises

Exception – [description]

apply_visual_material(visual_material: omni.isaac.core.materials.visual_material.VisualMaterial, weaker_than_descendants: bool = False) None

Used to apply visual material to the held prim and optionally its descendants.

Parameters
  • visual_material (VisualMaterial) – visual material to be applied to the held prim. Currently supports PreviewSurface, OmniPBR and OmniGlass.

  • weaker_than_descendants (bool, optional) – True if the material shouldn’t override the descendants materials, otherwise False. Defaults to False.

property articulation_handle: int

[summary]

Returns

[description]

Return type

int

disable_gravity() None

Keep gravity from affecting the robot

property dof_names: List[str]

List of prim names for each DOF.

Returns

prim names

Return type

list(string)

property dof_properties: numpy.ndarray

[summary]

Returns

[description]

Return type

np.ndarray

enable_gravity() None

Gravity will affect the robot

get_angular_velocity() numpy.ndarray

[summary]

Returns

[description]

Return type

np.ndarray

get_applied_action() omni.isaac.core.utils.types.ArticulationAction

[summary]

Raises

Exception – [description]

Returns

[description]

Return type

ArticulationAction

get_applied_joint_efforts(joint_indices: Optional[Union[List, numpy.ndarray]] = None) numpy.ndarray

Gets the efforts applied to the joints

Parameters

joint_indices (Optional[Union[List, np.ndarray]], optional) – _description_. Defaults to None.

Raises

Exception – _description_

Returns

_description_

Return type

np.ndarray

get_applied_visual_material() omni.isaac.core.materials.visual_material.VisualMaterial
Returns the current applied visual material in case it was applied using apply_visual_material OR

it’s one of the following materials that was already applied before: PreviewSurface, OmniPBR and OmniGlass.

Returns

the current applied visual material if its type is currently supported.

Return type

VisualMaterial

get_articulation_body_count() int

[summary]

Returns

[description]

Return type

int

get_articulation_controller() omni.isaac.core.controllers.articulation_controller.ArticulationController
Returns

PD Controller of all degrees of freedom of an articulation, can apply position targets, velocity targets and efforts.

Return type

ArticulationController

get_default_state() omni.isaac.core.utils.types.XFormPrimState
Returns

returns the default state of the prim (position and orientation) that is used after each reset.

Return type

XFormPrimState

get_dof_index(dof_name: str) int

[summary]

Parameters

dof_name (str) – [description]

Returns

[description]

Return type

int

get_enabled_self_collisions() bool

[summary]

Returns

[description]

Return type

bool

get_joint_positions(joint_indices: Optional[Union[List, numpy.ndarray]] = None) numpy.ndarray

_summary_

Parameters

joint_indices (Optional[Union[List, np.ndarray]], optional) – _description_. Defaults to None.

Returns

_description_

Return type

np.ndarray

get_joint_velocities(joint_indices: Optional[Union[List, numpy.ndarray]] = None) numpy.ndarray

_summary_

Parameters

joint_indices (Optional[Union[List, np.ndarray]], optional) – _description_. Defaults to None.

Returns

_description_

Return type

np.ndarray

get_joints_default_state() omni.isaac.core.utils.types.JointsState

Accessor for the default joints state.

Returns

The defaults that the robot is reset to when post_reset() is called (often automatically called during world.reset()).

Return type

JointsState

get_joints_state() omni.isaac.core.utils.types.JointsState

[summary]

Returns

[description]

Return type

JointsState

get_linear_velocity() numpy.ndarray

[summary]

Returns

[description]

Return type

np.ndarray

get_local_pose() Tuple[numpy.ndarray, numpy.ndarray]

Gets prim’s pose with respect to the local frame (the prim’s parent frame).

Returns

first index is position in the local frame of the prim. shape is (3, ).

second index is quaternion orientation in the local frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ).

Return type

Tuple[np.ndarray, np.ndarray]

get_local_scale() numpy.ndarray

Gets prim’s scale with respect to the local frame (the parent’s frame).

Returns

scale applied to the prim’s dimensions in the local frame. shape is (3, ).

Return type

np.ndarray

get_measured_joint_efforts(joint_indices: Optional[Union[List, numpy.ndarray]] = None) numpy.ndarray

Returns the dof efforts computed/measured by the physics solver

Parameters

joint_indices (Optional[Union[List, np.ndarray]], optional) – _description_. Defaults to None.

Raises

Exception – _description_

Returns

_description_

Return type

np.ndarray

get_measured_joint_forces(joint_indices: Optional[Union[List, numpy.ndarray]] = None) numpy.ndarray

Gets the measured joint forces

Parameters

joint_indices (Optional[Union[List, np.ndarray]], optional) – _description_. Defaults to None.

Raises

Exception – _description_

Returns

_description_

Return type

np.ndarray

get_sleep_threshold() float

[summary]

Returns

[description]

Return type

float

get_solver_position_iteration_count() int

[summary]

Returns

[description]

Return type

int

get_solver_velocity_iteration_count() int

[summary]

Returns

[description]

Return type

int

get_stabilization_threshold() float

[summary]

Returns

[description]

Return type

float

get_visibility() bool
Returns

true if the prim is visible in stage. false otherwise.

Return type

bool

get_world_pose() Tuple[numpy.ndarray, numpy.ndarray]

Gets prim’s pose with respect to the world’s frame.

Returns

first index is position in the world frame of the prim. shape is (3, ).

second index is quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ).

Return type

Tuple[np.ndarray, np.ndarray]

get_world_scale() numpy.ndarray

Gets prim’s scale with respect to the world’s frame.

Returns

scale applied to the prim’s dimensions in the world frame. shape is (3, ).

Return type

np.ndarray

property handles_initialized: bool

[summary]

Returns

[description]

Return type

bool

initialize(physics_sim_view: Optional[omni.physics.tensors.bindings._physicsTensors.SimulationView] = None)
Create a physics simulation view if not passed and creates an articulation view using physX tensor api.

This needs to be called after each hard reset (i.e stop + play on the timeline) before interacting with any of the functions of this class.

Parameters

physics_sim_view (omni.physics.tensors.SimulationView, optional) – current physics simulation view. Defaults to None.

is_valid() bool
Returns

True is the current prim path corresponds to a valid prim in stage. False otherwise.

Return type

bool

is_visual_material_applied() bool
Returns

True if there is a visual material applied. False otherwise.

Return type

bool

property name: Optional[str]

Returns: str: name given to the prim when instantiating it. Otherwise None.

_summary_

Returns

_description_

Return type

bool

property num_dof: int

[summary]

Returns

[description]

Return type

int

post_reset() None

Resets the prim to its default state (position and orientation).

property prim: pxr.Usd.Prim

Returns: Usd.Prim: USD Prim object that this object holds.

property prim_path: str

Returns: str: prim path in the stage.

set_angular_velocity(velocity: numpy.ndarray) None

[summary]

Parameters

velocity (np.ndarray) – [description]

set_default_state(position: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None) None

Sets the default state of the prim (position and orientation), that will be used after each reset.

Parameters
  • position (Optional[Sequence[float]], optional) – position in the world frame of the prim. shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[Sequence[float]], optional) – quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

set_enabled_self_collisions(flag: bool) None

[summary]

Parameters

flag (bool) – [description]

set_joint_efforts(efforts: numpy.ndarray, joint_indices: Optional[Union[List, numpy.ndarray]] = None) None

[summary]

Parameters
  • efforts (np.ndarray) – [description]

  • joint_indices (Optional[Union[list, np.ndarray]], optional) – [description]. Defaults to None.

Raises

Exception – [description]

set_joint_positions(positions: numpy.ndarray, joint_indices: Optional[Union[List, numpy.ndarray]] = None) None

[summary]

Parameters
  • positions (np.ndarray) – [description]

  • indices (Optional[Union[list, np.ndarray]], optional) – [description]. Defaults to None.

Raises

Exception – [description]

set_joint_velocities(velocities: numpy.ndarray, joint_indices: Optional[Union[List, numpy.ndarray]] = None) None

[summary]

Parameters
  • velocities (np.ndarray) – [description]

  • indices (Optional[Union[list, np.ndarray]], optional) – [description]. Defaults to None.

Raises

Exception – [description]

set_joints_default_state(positions: Optional[numpy.ndarray] = None, velocities: Optional[numpy.ndarray] = None, efforts: Optional[numpy.ndarray] = None) None

[summary]

Parameters
  • positions (Optional[np.ndarray], optional) – [description]. Defaults to None.

  • velocities (Optional[np.ndarray], optional) – [description]. Defaults to None.

  • efforts (Optional[np.ndarray], optional) – [description]. Defaults to None.

set_linear_velocity(velocity: numpy.ndarray)

Sets the linear velocity of the prim in stage.

Parameters

velocity (np.ndarray) – linear velocity to set the rigid prim to. Shape (3,).

set_local_pose(translation: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None) None

Sets prim’s pose with respect to the local frame (the prim’s parent frame).

Parameters
  • translation (Optional[Sequence[float]], optional) – translation in the local frame of the prim (with respect to its parent prim). shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[Sequence[float]], optional) – quaternion orientation in the local frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

set_local_scale(scale: Optional[Sequence[float]]) None

Sets prim’s scale with respect to the local frame (the prim’s parent frame).

Parameters

scale (Optional[Sequence[float]]) – scale to be applied to the prim’s dimensions. shape is (3, ). Defaults to None, which means left unchanged.

set_sleep_threshold(threshold: float) None

[summary]

Parameters

threshold (float) – [description]

set_solver_position_iteration_count(count: int) None

[summary]

Parameters

count (int) – [description]

set_solver_velocity_iteration_count(count: int)

[summary]

Parameters

count (int) – [description]

set_stabilization_threshold(threshold: float) None

[summary]

Parameters

threshold (float) – [description]

set_visibility(visible: bool) None

Sets the visibility of the prim in stage.

Parameters

visible (bool) – flag to set the visibility of the usd prim in stage.

set_world_pose(position: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None) None

Sets prim’s pose with respect to the world’s frame.

Parameters
  • position (Optional[Sequence[float]], optional) – position in the world frame of the prim. shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[Sequence[float]], optional) – quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

ArticulationView

class ArticulationView(prim_paths_expr: str, name: str = 'articulation_prim_view', positions: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, translations: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, orientations: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, scales: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, visibilities: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, reset_xform_properties: bool = True, enable_dof_force_sensors: bool = False)

Provides high level functions to deal with prims that has root articulation api applied to it (1 or more articulations) as well as its attributes/ properties. This object wraps all matching articulations found at the regex provided at the prim_paths_expr.

Note: - each prim will have “xformOp:orient”, “xformOp:translate” and “xformOp:scale” only post init,

unless it is a non-root articulation link.

Parameters
  • prim_paths_expr (str) – prim paths regex to encapsulate all prims that match it. example: “/World/Env[1-5]/Franka” will match /World/Env1/Franka, /World/Env2/Franka..etc. (a non regex prim path can also be used to encapsulate one rigid prim).

  • name (str, optional) – shortname to be used as a key by Scene class. Note: needs to be unique if the object is added to the Scene. Defaults to “articulation_prim_view”.

  • positions (Optional[Union[np.ndarray, torch.Tensor, wp.array]], optional) – default positions in the world frame of the prims. shape is (N, 3). Defaults to None, which means left unchanged.

  • translations (Optional[Union[np.ndarray, torch.Tensor, wp.array]], optional) – default translations in the local frame of the prims (with respect to its parent prims). shape is (N, 3). Defaults to None, which means left unchanged.

  • orientations (Optional[Union[np.ndarray, torch.Tensor, wp.array]], optional) – default quaternion orientations in the world/ local frame of the prims (depends if translation or position is specified). quaternion is scalar-first (w, x, y, z). shape is (N, 4).

  • scales (Optional[Union[np.ndarray, torch.Tensor, wp.array]], optional) – local scales to be applied to the prim’s dimensions in the view. shape is (N, 3). Defaults to None, which means left unchanged.

  • visibilities (Optional[Union[np.ndarray, torch.Tensor, wp.array]], optional) – set to false for an invisible prim in the stage while rendering. shape is (N,). Defaults to None.

  • reset_xform_properties (bool, optional) – True if the prims don’t have the right set of xform properties (i.e: translate, orient and scale) ONLY and in that order. Set this parameter to False if the object were cloned using using the cloner api in omni.isaac.cloner. Defaults to True.

  • enable_dof_force_sensors (bool, optional) – enables the solver computed dof force sensors on articulation joints. Defaults to False.

apply_action(control_actions: omni.isaac.core.utils.types.ArticulationActions, indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) None
Applies ArticulationActions which encapsulates joint position targets, velocity targets, efforts and joint indices in one object.

Can be used instead of the seperate set_joint_position_targets..etc.

Parameters
  • control_actions (ArticulationActions) – actions to be applied for next physics step.

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

apply_visual_materials(visual_materials: Union[omni.isaac.core.materials.visual_material.VisualMaterial, List[omni.isaac.core.materials.visual_material.VisualMaterial]], weaker_than_descendants: Optional[Union[bool, List[bool]]] = None, indices: Optional[Union[numpy.ndarray, list, torch.Tensor, warp.types.array]] = None) None

Used to apply visual material to the prims and optionally its prim descendants.

Parameters
  • visual_materials (Union[VisualMaterial, List[VisualMaterial]]) – visual materials to be applied to the prims. Currently supports PreviewSurface, OmniPBR and OmniGlass. If a list is provided then its size has to be equal the view’s size or indices size. If one material is provided it will be applied to all prims in the view.

  • weaker_than_descendants (Optional[Union[bool, List[bool]]], optional) – True if the material shouldn’t override the descendants materials, otherwise False. Defaults to False. If a list of visual materials is provided then a list has to be provided with the same size for this arg as well.

  • indices (Optional[Union[np.ndarray, list, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

Raises
  • Exception – length of visual materials != length of prims indexed

  • Exception – length of visual materials != length of weaker descendants bools arg

property body_names: List[str]

Returns: List[str]: ordered names of bodies that corresponds to links for the articulations of prims in the view.

property count: int

Returns: int: Number of prims encapsulated in this view.

property dof_names: List[str]

Returns: List[str]: ordered names of joints that corresponds to degrees of freedom for the articulations of prims in the view.

get_angular_velocities(indices: Optional[Union[numpy.ndarray, list, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets the angular velocities of prims in the view.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view)

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

angular velocities of the prims in the view. shape is (M, 3).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_applied_actions(clone: bool = True) omni.isaac.core.utils.types.ArticulationActions

Gets current applied actions in an ArticulationActions object.

Parameters

clone (bool, optional) – True to return clones of the internal buffers. Otherwise False. Defaults to True.

Returns

current applied actions (i.e: current position targets and velocity targets)

Return type

ArticulationActions

get_applied_joint_efforts(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets the joint efforts of articulations in the view. The method will return the efforts set by the set_joint_efforts.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – joint indicies to specify which joints to manipulate. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

joint efforts of articulations in the view assigned via set_joint_efforts. shape is (M, K).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_applied_visual_materials(indices: Optional[Union[numpy.ndarray, list, torch.Tensor, warp.types.array]] = None) List[omni.isaac.core.materials.visual_material.VisualMaterial]
Parameters

indices (Optional[Union[np.ndarray, list, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

Returns

a list of the current applied visual materials to the prims if its type is currently supported.

Return type

List[VisualMaterial]

get_armatures(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets armatures for articulation in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – joint indicies to specify which joints to query. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

  • clone (Optional[bool]) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

maximum efforts for articulations in the view. shape (M, K).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_articulation_body_count() int
Returns

number of links in the articulation.

Return type

int

get_body_coms(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, body_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets rigid body center of mass of articulations in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • body_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – body indicies to specify which bodies to query. Shape (K,). Where K <= num of bodies. Defaults to None (i.e: all bodies).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

rigid body center of mass positions and orientations of articulations in the view.

position shape is (M, K, 3), orientation shape is (M, k, 4).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_body_index(body_name: str) int

Gets the body index in the articulation given its name.

Parameters

body_name (str) – name of the body/link to query.

Returns

index of the body/link in the articulation buffers.

Return type

int

get_body_inertias(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, body_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets rigid body inertias of articulations in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • body_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – body indicies to specify which bodies to query. Shape (K,). Where K <= num of bodies. Defaults to None (i.e: all bodies).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

rigid body inertias of articulations in the view.

shape is (M, K, 9).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_body_inv_inertias(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, body_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets rigid body inverse inertias of articulations in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • body_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – body indicies to specify which bodies to query. Shape (K,). Where K <= num of bodies. Defaults to None (i.e: all bodies).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

rigid body inverse inertias of articulations in the view.

shape is (M, K, 9).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_body_inv_masses(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, body_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets rigid body inverse masses of articulations in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • body_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – body indicies to specify which bodies to query. Shape (K,). Where K <= num of bodies. Defaults to None (i.e: all bodies).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

rigid body inverse masses of articulations in the view.

shape is (M, K).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_body_masses(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, body_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets rigid body masses of articulations in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • body_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – body indicies to specify which bodies to query. Shape (K,). Where K <= num of bodies. Defaults to None (i.e: all bodies).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

rigid body masses of articulations in the view.

shape is (M, K).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_coriolis_and_centrifugal_forces(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets the coriolis and centrifugal forces of articulations in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – joint indicies to specify which joints to query. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

Coriolis and centrifugal forces of articulations in the view.

shape is (M, K).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_default_state() omni.isaac.core.utils.types.XFormPrimViewState
Returns

returns the default state of the prims (positions and orientations) that is used after each reset.

Return type

XFormPrimViewState

get_dof_index(dof_name: str) int

Gets the dof index in the joint buffers given its name.

Parameters

dof_name (str) – name of the joint that corresponds to the degree of freedom to query.

Returns

index of the degree of freedom in the joint buffers.

Return type

int

get_dof_limits() Union[numpy.ndarray, torch.Tensor]
Returns

degrees of freedom position limits.

shape is (N, num_dof, 2) where index 0 corresponds to the lower limit and index 1 corresponds to the upper limit.

Return type

Union[np.ndarray, torch.Tensor, wp.array]

get_dof_types(dof_names: Optional[List[str]] = None) List[str]

Gets the dof types given the dof names.

Parameters

dof_names (List[str], optional) – names of the joints that corresponds to the degrees of freedom to query. Defaults to None.

Returns

types of the joints that corresponds to the degrees of freedom. Types can be invalid, translation or rotation.

Return type

List[str]

get_effort_modes(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) List[str]

Gets effort modes for articulations in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – joint indicies to specify which joints to query. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

Returns

Returns a List of size (M, K) indicating the effort modes. accelaration or force.

Return type

List

get_enabled_self_collisions(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets the enable self collisions flag

Parameters

indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

Returns

true if self collisions enabled. otherwise false. shape (M,)

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_fixed_tendon_dampings(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets the dampings of fixed tendons for articulations in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

fixed tendon dampings of articulations in the view.

shape is (M, K).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_fixed_tendon_limit_stiffnesses(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets the limit stiffness of fixed tendons for articulations in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

fixed tendon stiffnesses of articulations in the view.

shape is (M, K).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_fixed_tendon_limits(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets the limits of fixed tendons for articulations in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

fixed tendon stiffnesses of articulations in the view.

shape is (M, K, 2).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_fixed_tendon_offsets(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets the offsets of fixed tendons for articulations in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

fixed tendon stiffnesses of articulations in the view.

shape is (M, K).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_fixed_tendon_rest_lengths(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets the rest length of fixed tendons for articulations in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

fixed tendon stiffnesses of articulations in the view.

shape is (M, K).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_fixed_tendon_stiffnesses(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets the stiffness of fixed tendons for articulations in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

fixed tendon stiffnesses of articulations in the view.

shape is (M, K).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_friction_coefficients(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.array]

Gets friction coefficients for articulation in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – joint indicies to specify which joints to query. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

  • clone (Optional[bool]) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

maximum efforts for articulations in the view. shape (M, K).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_gains(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Tuple[typing.Union[numpy.ndarray, torch.Tensor], typing.Union[numpy.ndarray, torch.Tensor], typing.Union[warp.types.indexedarray, <Function index(a: vec2h, i: int32)>]]

Gets stiffness and damping of articulations in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – joint indicies to specify which joints to query. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

  • clone (bool, optional) – True to return clones of the internal buffers. Otherwise False. Defaults to True.

Returns

stiffness and damping of

articulations in the view respectively. shapes are (M, K).

Return type

Tuple[Union[np.ndarray, torch.Tensor], Union[np.ndarray, torch.Tensor], Union[wp.indexedarray, wp.index]]

get_generalized_gravity_forces(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets the generalized gravity forces of articulations in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – joint indicies to specify which joints to query. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

generalized gravity forces of articulations in the view.

shape is (M, K).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_jacobian_shape() Union[numpy.ndarray, torch.Tensor, warp.types.array]
Returns

shape of jacobian for a single articulation.

Return type

Union[np.ndarray, torch.Tensor, wp.array]

get_jacobians(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets the jacobians of articulations in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

jacobians of articulations in the view.

shape is (M, jacobian_shape).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_joint_positions(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets the joint positions of articulations in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – joint indicies to specify which joints to query. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

joint positions of articulations in the view.

shape is (M, K).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_joint_velocities(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets the joint velocities of articulations in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – joint indicies to specify which joints to query. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

joint velocities of articulations in the view.

shape is (M, K).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_joints_default_state() omni.isaac.core.utils.types.JointsState
Returns

current joints default state. (i.e: the joint positions and velocities after a reset).

Return type

JointsState

get_joints_state() omni.isaac.core.utils.types.JointsState
Returns

current joint positions and velocities.

Return type

JointsState

get_linear_velocities(indices: Optional[Union[numpy.ndarray, list, torch.Tensor, warp.types.array]] = None, clone=True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets the linear velocities of prims in the view.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view)

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

linear velocities of the prims in the view. shape is (M, 3).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_local_poses(indices: Optional[Union[numpy.ndarray, list, torch.Tensor, warp.types.array]] = None) Union[Tuple[numpy.ndarray, numpy.ndarray], Tuple[torch.Tensor, torch.Tensor], Tuple[warp.types.indexedarray, warp.types.indexedarray]]

Gets prim poses in the view with respect to the local frame (the prim’s parent frame).

Parameters

indices (Optional[Union[np.ndarray, list, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view)

Returns

first index is positions in the local frame of the prims. shape is (M, 3). second index is quaternion orientations in the local frame of the prims. quaternion is scalar-first (w, x, y, z). shape is (M, 4).

Return type

Union[Tuple[np.ndarray, np.ndarray], Tuple[torch.Tensor, torch.Tensor], Tuple[wp.indexedarray, wp.indexedarray]]

get_local_scales(indices: Optional[Union[numpy.ndarray, list, torch.Tensor, warp.types.array]] = None) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets prim scales in the view with respect to the local frame (the parent’s frame).

Parameters

indices (Optional[Union[np.ndarray, list, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

Returns

scales applied to the prim’s dimensions in the local frame. shape is (M, 3).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_mass_matrices(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets the mass matrices of articulations in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

mass matrices of articulations in the view.

shape is (M, mass_matrix_shape).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_mass_matrix_shape() Union[numpy.ndarray, torch.Tensor, warp.types.array]
Returns

shape of mass matrix for a single articulation.

Return type

Union[np.ndarray, torch.Tensor, wp.array]

get_max_efforts(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets maximum efforts for articulation in the view.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – joint indicies to specify which joints to query. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

  • clone (Optional[bool]) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

maximum efforts for articulations in the view. shape (M, K).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_measured_joint_efforts(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets the dof forces of articulations in the view. The method will return the solver computed projection of the joint forces in the dof motion direction.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor]], optional) – joint indicies to specify which joints to manipulate. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

computed joint efforts of articulations in the view. shape is (M, K).

Return type

Union[np.ndarray, torch.Tensor]

get_measured_joint_forces(indices: Optional[Union[numpy.ndarray, List, torch.Tensor]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor]

Gets the joint forces of articulations in the view. The method will return the link incoming joint forces.

Parameters
  • indices (Optional[Union[np.ndarray, List, torch.Tensor]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor]], optional) – link indicies to specify which link’s incoming joints to get. Shape (K,). Where K <= num of links/bodies. Defaults to None (i.e: all dofs).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

joint forces of articulations in the view. shape is (M, K, 6).

Return type

Union[np.ndarray, torch.Tensor]

get_sleep_thresholds(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets sleep thresholds for articulations in the view.

Parameters

indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

Returns

current sleep thresholds. shape (M,).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_solver_position_iteration_counts(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets the physics solver itertion counts for joint positions.

Parameters

indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

Returns

number of iterations for the solver. Shape (M,).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_solver_velocity_iteration_counts(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets the physics solver itertion counts for joint velocities.

Parameters

indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

Returns

number of iterations for the solver. Shape (M,).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_stabilization_thresholds(indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets the stabilizaion thresholds.

Parameters

indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

Returns

current stabilization thresholds. Shape (M,).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_velocities(indices: Optional[Union[numpy.ndarray, list, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets the linear and angular velocities of prims in the view.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view)

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

linear and angular velocities of the prims in the view concatenated. shape is (M, 6).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_visibilities(indices: Optional[Union[numpy.ndarray, list, torch.Tensor, warp.types.array]] = None) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Returns the current visibilities of the prims in stage.

Parameters

indices (Optional[Union[np.ndarray, list, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

Returns

Shape (M,) with type bool, where each item holds True

if the prim is visible in stage. False otherwise.

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

get_world_poses(indices: Optional[Union[numpy.ndarray, list, torch.Tensor, warp.types.array]] = None, clone: bool = True) Union[Tuple[numpy.ndarray, numpy.ndarray], Tuple[torch.Tensor, torch.Tensor], Tuple[warp.types.indexedarray, warp.types.indexedarray]]

Gets the poses of the prims in the view with respect to the world’s frame.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

first index is positions in the world frame of the prims. shape is (M, 3).

second index is quaternion orientations in the world frame of the prims. quaternion is scalar-first (w, x, y, z). shape is (M, 4).

Return type

Union[Tuple[np.ndarray, np.ndarray], Tuple[torch.Tensor, torch.Tensor], Tuple[wp.indexedarray, wp.indexedarray]]

get_world_scales(indices: Optional[Union[numpy.ndarray, list, torch.Tensor, warp.types.array]] = None) Union[numpy.ndarray, torch.Tensor, warp.types.indexedarray]

Gets prim scales in the view with respect to the world’s frame.

Parameters

indices (Optional[Union[np.ndarray, list, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

Returns

scales applied to the prim’s dimensions in the world frame. shape is (M, 3).

Return type

Union[np.ndarray, torch.Tensor, wp.indexedarray]

initialize(physics_sim_view: Optional[omni.physics.tensors.bindings._physicsTensors.SimulationView] = None) None

Create a physics simulation view if not passed and creates an articulation view using physX tensor api.

Parameters

physics_sim_view (omni.physics.tensors.SimulationView, optional) – current physics simulation view. Defaults to None.

property initialized: bool

Returns: bool: True if the view object was initialized (after the first call of .initialize()). False otherwise.

Returns: bool: True if the prim corresponds to a non root link in an articulation. Otherwise False.

is_physics_handle_valid() bool
Returns

False if .initialize() needs to be called again for the physics handle to be valid. Otherwise True.

Note: if physics handle is not valid many of the methods that requires physX will return None.

Return type

bool

is_valid(indices: Optional[Union[numpy.ndarray, list, torch.Tensor, warp.types.array]] = None) bool
Parameters

indices (Optional[Union[np.ndarray, list, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

Returns

True if all prim paths specified in the view correspond to a valid prim in stage. False otherwise.

Return type

bool

is_visual_material_applied(indices: Optional[Union[numpy.ndarray, list, torch.Tensor, warp.types.array]] = None) List[bool]
Parameters

indices (Optional[Union[np.ndarray, list, torch.Tensor, wp.array]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

Returns

True if there is a visual material applied is applied to the corresponding prim in the view. False otherwise.

Return type

List[bool]

property name: str

Returns: str: name given to the prims view when instantiating it.

property num_bodies: int

Returns: int: number of rigid bodies for the articulations of prims in the view.

property num_dof: int

Returns: int: number of degrees of freedom for the articulations of prims in the view.

property num_fixed_tendons: int

Returns: int: number of rigid shapes for the articulations of prims in the view.

property num_shapes: int

Returns: int: number of rigid shapes for the articulations of prims in the view.

post_reset() None

Resets the prims to its default state.

property prim_paths: List[str]

Returns: List[str]: list of prim paths in the stage encapsulated in this view.

property prims: List[pxr.Usd.Prim]

Returns: List[Usd.Prim]: List of USD Prim objects encapsulated in this view.

set_angular_velocities(velocities: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, indices: Optional[Union[numpy.ndarray, list, torch.Tensor, warp.types.array]] = None) None
Sets the angular velocities of the prims in the view. The method does this through the physx API only.

i.e: It has to be called after initialization. Note: This method is not supported for the gpu pipeline. set_velocities method should be used instead.

Parameters
  • velocities (Optional[Union[np.ndarray, torch.Tensor, wp.array]]) – angular velocities to set the rigid prims to. shape is (M, 3).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_armatures(values: Union[numpy.ndarray, torch.Tensor, warp.types.array], indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) None

Sets armatures for articulation joints in the view.

Parameters
  • values (Union[np.ndarray, torch.Tensor, wp.array]) – armatures for articulations in the view. shape (M, K).

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – joint indicies to specify which joints to manipulate. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

set_body_coms(positions: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, orientations: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, body_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) None

Sets body center of mass positions and orientations for articulation bodies in the view.

Parameters
  • positions (Union[np.ndarray, torch.Tensor, wp.array]) – body center of mass positions for articulations in the view. shape (M, K, 3).

  • orientations (Union[np.ndarray, torch.Tensor, wp.array]) – body center of mass orientations for articulations in the view. shape (M, K, 4).

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • body_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – body indicies to specify which bodies to manipulate. Shape (K,). Where K <= num of bodies. Defaults to None (i.e: all bodies).

set_body_inertias(values: Union[numpy.ndarray, torch.Tensor, warp.types.array], indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, body_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) None

Sets body inertias for articulation bodies in the view.

Parameters
  • values (Union[np.ndarray, torch.Tensor, wp.array]) – body inertias for articulations in the view. shape (M, K, 9).

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • body_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – body indicies to specify which bodies to manipulate. Shape (K,). Where K <= num of bodies. Defaults to None (i.e: all bodies).

set_body_masses(values: Union[numpy.ndarray, torch.Tensor, warp.types.array], indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, body_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) None

Sets body masses for articulation bodies in the view.

Parameters
  • values (Union[np.ndarray, torch.Tensor, wp.array]) – body masses for articulations in the view. shape (M, K).

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • body_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – body indicies to specify which bodies to manipulate. Shape (K,). Where K <= num of bodies. Defaults to None (i.e: all bodies).

set_default_state(positions: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, orientations: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, indices: Optional[Union[numpy.ndarray, list, torch.Tensor, warp.types.array]] = None) None

Sets the default state of the prims (positions and orientations), that will be used after each reset.

Parameters
  • positions (Optional[Union[np.ndarray, torch.Tensor, wp.array]], optional) – positions in the world frame of the prim. shape is (M, 3). Defaults to None, which means left unchanged.

  • orientations (Optional[Union[np.ndarray, torch.Tensor, wp.array]], optional) – quaternion orientations in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (M, 4). Defaults to None, which means left unchanged.

  • indices (Optional[Union[np.ndarray, list, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_effort_modes(mode: str, indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor]] = None) None

Sets effort modes for articulations in the view.

Parameters
  • mode (str) – effort mode to be applied to prims in the vie, wp.arrayw. force or acceleration.

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – joint indicies to specify which joints to manipulate. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

Raises

Exception – _description_

set_enabled_self_collisions(flags: Union[numpy.ndarray, torch.Tensor, warp.types.array], indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) None

Sets the enable self collisions flag

Parameters
  • flags (Union[np.ndarray, torch.Tensor, wp.array]) – true to enable self collision. otherwise false. shape (M,)

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_fixed_tendon_properties(stiffnesses: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, dampings: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, limit_stiffnesses: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, limits: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, rest_lengths: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, offsets: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) None

Sets fixed tendon properties for articulations in the view.

Parameters
  • stiffnesses (Union[np.ndarray, torch.Tensor, wp.array]) – fixed tendon stiffnesses for articulations in the view. shape (M, K).

  • dampings (Union[np.ndarray, torch.Tensor, wp.array]) – fixed tendon dampings for articulations in the view. shape (M, K).

  • limit_stiffnesses (Union[np.ndarray, torch.Tensor, wp.array]) – fixed tendon limit stiffnesses for articulations in the view. shape (M, K).

  • limits (Union[np.ndarray, torch.Tensor, wp.array]) – fixed tendon limits for articulations in the view. shape (M, K, 2).

  • rest_lengths (Union[np.ndarray, torch.Tensor, wp.array]) – fixed tendon rest lengths for articulations in the view. shape (M, K).

  • offsets (Union[np.ndarray, torch.Tensor, wp.array]) – fixed tendon offsets for articulations in the view. shape (M, K).

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_friction_coefficients(values: Union[numpy.ndarray, torch.Tensor], indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) None

Sets friction coefficients for articulation joints in the view.

Parameters
  • values (Union[np.ndarray, torch.Tensor, wp.array]) – friction coefficients for articulations in the view. shape (M, K).

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – joint indicies to specify which joints to manipulate. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

set_gains(kps: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, kds: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, save_to_usd: bool = False) None

Sets stiffness and damping of articulations in the view.

Parameters
  • kps (Optional[Union[np.ndarray, torch.Tensor, wp.array]], optional) – stiffness of the drives. shape is (M, K). Defaults to None.

  • kds (Optional[Union[np.ndarray, torch.Tensor, wp.array]], optional) – damping of the drives. shape is (M, K).. Defaults to None.

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – joint indicies to specify which joints to manipulate. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

  • save_to_usd (bool, optional) – True to save the gains in the usd. otherwise False.

set_joint_efforts(efforts: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]], indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) None

Sets the joint efforts of articulations in the view.

Parameters
  • efforts (Optional[Union[np.ndarray, torch.Tensor, wp.array]]) – efforts of articulations in the view to be set to in the next frame. shape is (M, K).

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – joint indicies to specify which joints to manipulate. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

set_joint_position_targets(positions: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]], indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) None

Sets the joint position targets for the implicit pd controllers.

Parameters
  • positions (Optional[Union[np.ndarray, torch.Tensor, wp.array]]) – joint position targets for the implicit pd controller. shape is (M, K).

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – joint indicies to specify which joints to manipulate. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

set_joint_positions(positions: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]], indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) None

Sets the joint positions of articulations in the view.

Parameters
  • positions (Optional[Union[np.ndarray, torch.Tensor, wp.array]]) – joint positions of articulations in the view to be set to in the next frame. shape is (M, K).

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – joint indicies to specify which joints to manipulate. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

set_joint_velocities(velocities: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]], indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) None

Sets the joint velocities of articulations in the view.

Parameters
  • velocities (Optional[Union[np.ndarray, torch.Tensor, wp.array]]) – joint velocities of articulations in the view to be set to in the next frame. shape is (M, K).

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – joint indicies to specify which joints to manipulate. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

set_joint_velocity_targets(velocities: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]], indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) None

Sets the joint velocity targets for the implicit pd controllers.

Parameters
  • velocities (Optional[Union[np.ndarray, torch.Tensor, wp.array]]) – joint velocity targets for the implicit pd controller. shape is (M, K).

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – joint indicies to specify which joints to manipulate. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

set_joints_default_state(positions: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, velocities: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, efforts: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None) None

Sets the joints default state (joint positions, velocities and efforts) to be applied after each reset.

Parameters
  • positions (Optional[Union[np.ndarray, torch.Tensor, wp.array]], optional) – default joint positions. shape is (N, num of dofs). Defaults to None.

  • velocities (Optional[Union[np.ndarray, torch.Tensor, wp.array]], optional) – default joint velocities. shape is (N, num of dofs). Defaults to None.

  • efforts (Optional[Union[np.ndarray, torch.Tensor, wp.array]], optional) – default joint efforts. shape is (N, num of dofs). Defaults to None.

set_linear_velocities(velocities: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, indices: Optional[Union[numpy.ndarray, list, torch.Tensor, warp.types.array]] = None) None
Sets the linear velocities of the prims in the view. The method does this through the physx API only.

i.e: It has to be called after initialization. Note: This method is not supported for the gpu pipeline. set_velocities method should be used instead.

Parameters
  • velocities (Optional[Union[np.ndarray, torch.Tensor, wp.array]]) – linear velocities to set the rigid prims to. shape is (M, 3).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_local_poses(translations: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, orientations: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, indices: Optional[Union[numpy.ndarray, list, torch.Tensor, warp.types.array]] = None) None

Sets prim poses in the view with respect to the local frame (the prim’s parent frame).

Parameters
  • translations (Optional[Union[np.ndarray, torch.Tensor, wp.array]], optional) – translations in the local frame of the prims (with respect to its parent prim). shape is (M, 3). Defaults to None, which means left unchanged.

  • orientations (Optional[Union[np.ndarray, torch.Tensor, wp.array]], optional) – quaternion orientations in the local frame of the prims. quaternion is scalar-first (w, x, y, z). shape is (M, 4). Defaults to None, which means left unchanged.

  • indices (Optional[Union[np.ndarray, list, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_local_scales(scales: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]], indices: Optional[Union[numpy.ndarray, list, torch.Tensor, warp.types.array]] = None) None

Sets prim scales in the view with respect to the local frame (the prim’s parent frame).

Parameters
  • scales (Optional[Union[np.ndarray, torch.Tensor, wp.array]]) – scales to be applied to the prim’s dimensions in the view. shape is (M, 3).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_max_efforts(values: Union[numpy.ndarray, torch.Tensor, warp.types.array], indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) None

Sets maximum efforts for articulation in the view.

Parameters
  • values (Union[np.ndarray, torch.Tensor, wp.array]) – maximum efforts for articulations in the view. shape (M, K).

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – joint indicies to specify which joints to manipulate. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

set_sleep_thresholds(thresholds: Union[numpy.ndarray, torch.Tensor, warp.types.array], indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) None

Sets sleep thresholds for articulations in the view.

Parameters
  • thresholds (Union[np.ndarray, torch.Tensor, wp.array]) – sleep thresholds to be applied. shape (M,).

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_solver_position_iteration_counts(counts: Union[numpy.ndarray, torch.Tensor, warp.types.array], indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) None

Sets the physics solver itertion counts for joint positions.

Parameters
  • counts (Union[np.ndarray, torch.Tensor, wp.array]) – number of iterations for the solver. Shape (M,).

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_solver_velocity_iteration_counts(counts: Union[numpy.ndarray, torch.Tensor, warp.types.array], indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) None

Sets the physics solver itertion counts for joint velocities.

Parameters
  • counts (Union[np.ndarray, torch.Tensor, wp.array]) – number of iterations for the solver. Shape (M,).

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_stabilization_thresholds(thresholds: Union[numpy.ndarray, torch.Tensor, warp.types.array], indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) None

Sets the stabilizaion thresholds.

Parameters
  • thresholds (Union[np.ndarray, torch.Tensor, wp.array]) – stabilization thresholds to be applied. Shape (M,).

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_velocities(velocities: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, indices: Optional[Union[numpy.ndarray, list, torch.Tensor, warp.types.array]] = None) None
Sets the linear and angular velocities of the prims in the view at once. The method does this through the physx API only.

i.e: It has to be called after initialization.

Parameters
  • velocities (Optional[Union[np.ndarray, torch.Tensor, wp.array]]) – linear and angular velocities respectively to set the rigid prims to. shape is (M, 6).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_visibilities(visibilities: Union[numpy.ndarray, torch.Tensor, warp.types.array], indices: Optional[Union[numpy.ndarray, list, torch.Tensor, warp.types.array]] = None) None

Sets the visibilities of the prims in stage.

Parameters
  • visibilities (Union[np.ndarray, torch.Tensor, wp.array]) – flag to set the visibilities of the usd prims in stage. Shape (M,). Where M <= size of the encapsulated prims in the view.

  • indices (Optional[Union[np.ndarray, list, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Defaults to None (i.e: all prims in the view).

set_world_poses(positions: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, orientations: Optional[Union[numpy.ndarray, torch.Tensor, warp.types.array]] = None, indices: Optional[Union[numpy.ndarray, list, torch.Tensor, warp.types.array]] = None) None

Sets poses of prims in the view with respect to the world’s frame.

Parameters
  • positions (Optional[Union[np.ndarray, torch.Tensor, wp.array]], optional) – positions in the world frame of the prim. shape is (M, 3). Defaults to None, which means left unchanged.

  • orientations (Optional[Union[np.ndarray, torch.Tensor, wp.array]], optional) – quaternion orientations in the world frame of the prims. quaternion is scalar-first (w, x, y, z). shape is (M, 4). Defaults to None, which means left unchanged.

  • indices (Optional[Union[np.ndarray, list, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

switch_control_mode(mode: str, indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None, joint_indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) None

Switches control mode between velocity, position or effort.

Parameters
  • mode (str) – control mode to switch the articulations specified to. mode can be velocity, position or effort.

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • joint_indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – joint indicies to specify which joints to manipulate. Shape (K,). Where K <= num of dofs. Defaults to None (i.e: all dofs).

switch_dof_control_mode(mode: str, dof_index: int, indices: Optional[Union[numpy.ndarray, List, torch.Tensor, warp.types.array]] = None) None

Switches dof control mode between velocity, position or effort.

Parameters
  • mode (str) – control mode to switch the dof in articulations specified to. mode an be velocity, position or effort.

  • dof_index (int) – dof index to swith the control mode of.

  • indices (Optional[Union[np.ndarray, List, torch.Tensor, wp.array]], optional) – indicies to specify which prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

ArticulationController

class ArticulationController

PD Controller of all degrees of freedom of an articulation, can apply position targets, velocity targets and efforts.

Checkout the required tutorials at

https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/overview.html

apply_action(control_actions: omni.isaac.core.utils.types.ArticulationAction) None

[summary]

Parameters
  • control_actions (ArticulationAction) – actions to be applied for next physics step.

  • indices (Optional[Union[list, np.ndarray]], optional) – degree of freedom indices to apply actions to. Defaults to all degrees of freedom.

Raises

Exception – [description]

get_applied_action() omni.isaac.core.utils.types.ArticulationAction
Raises

Exception – [description]

Returns

Gets last applied action.

Return type

ArticulationAction

get_effort_modes() List[str]

[summary]

Raises
  • Exception – [description]

  • NotImplementedError – [description]

Returns

[description]

Return type

np.ndarray

get_gains() Tuple[numpy.ndarray, numpy.ndarray]

[summary]

Raises

Exception – [description]

Returns

[description]

Return type

Tuple[np.ndarray, np.ndarray]

get_joint_limits() Tuple[numpy.ndarray, numpy.ndarray]

[summary]

Raises

Exception – [description]

Returns

[description]

Return type

Tuple[np.ndarray, np.ndarray]

get_max_efforts() numpy.ndarray

[summary]

Raises

Exception – [description]

Returns

[description]

Return type

np.ndarray

initialize(handle, articulation_view) None

[summary]

Parameters
  • handle ([type]) – [description]

  • dof_infos ([type]) – [description]

set_effort_modes(mode: str, joint_indices: Optional[Union[numpy.ndarray, list]] = None) None

[summary]

Parameters
  • mode (str) – [description]

  • indices (Optional[Union[np.ndarray, list]], optional) – [description]. Defaults to None.

Raises
  • Exception – [description]

  • Exception – [description]

set_gains(kps: Optional[numpy.ndarray] = None, kds: Optional[numpy.ndarray] = None, save_to_usd: bool = False) None

[summary]

Parameters
  • kps (Optional[np.ndarray], optional) – [description]. Defaults to None.

  • kds (Optional[np.ndarray], optional) – [description]. Defaults to None.

Raises

Exception – [description]

set_max_efforts(values: numpy.ndarray, joint_indices: Optional[Union[numpy.ndarray, list]] = None) None

[summary]

Parameters
  • value (float, optional) – [description]. Defaults to None.

  • indices (Optional[Union[np.ndarray, list]], optional) – [description]. Defaults to None.

Raises

Exception – [description]

switch_control_mode(mode: str) None

[summary]

Parameters

mode (str) – [description]

Raises

Exception – [description]

switch_dof_control_mode(dof_index: int, mode: str) None

[summary]

Parameters
  • dof_index (int) – [description]

  • mode (str) – [description]

Raises

Exception – [description]

Loggers

DataLogger

class DataLogger

This class takes care of collecting data as well as reading already saved data in order to replay it for instance.

add_data(data: dict, current_time_step: float, current_time: float) None

Adds data to the log

Parameters
  • data (dict) – Dictionary representing the data to be logged at this time index.

  • current_time_step (float) – time step corresponding to the data collected.

  • current_time (float) – time in seconds corresponding to the data collected.

add_data_frame_logging_func(func: Callable[[List[omni.isaac.core.tasks.base_task.BaseTask], omni.isaac.core.scenes.scene.Scene], Dict]) None
Parameters

func (Callable[[list[BaseTask], Scene], None]) –

function to be called at every step when the logger is started. should follow:

def dummy_data_collection_fn(tasks, scene):

return {“data 1”: [data]}

get_data_frame(data_frame_index: int) omni.isaac.core.utils.types.DataFrame
Parameters

data_frame_index (int) – index of the data frame to retrieve.

Returns

Data Frame collected/ retrieved at the specified data frame index.

Return type

DataFrame

get_num_of_data_frames() int
Returns

the number of data frames collected/ retrieved in the data logger.

Return type

int

is_started() bool
Returns

True if data collection is started/ resumed. False otherwise.

Return type

bool

load(log_path: str) None

Loads data from a json file to read back a previous saved data or to resume recording data from another time step.

Parameters

log_path (str) – path of the json file to be used to load the data.

pause() None

Pauses data collection.

reset() None

Clears the data in the logger.

save(log_path: str) None

Saves the current data in the logger to a json file

Parameters

log_path (str) – path of the json file to be used to save the data.

start() None

Resumes/ starts data collection.

Materials

Visual Material

class VisualMaterial(name: str, prim_path: str, prim: pxr.Usd.Prim, shaders_list: List[pxr.UsdShade.Shader], material: pxr.UsdShade.Material)

[summary]

Parameters
  • name (str) – [description]

  • prim_path (str) – [description]

  • prim (Usd.Prim) – [description]

  • shaders_list (list[UsdShade.Shader]) – [description]

  • material (UsdShade.Material) – [description]

property material: pxr.UsdShade.Material

[summary]

Returns

[description]

Return type

UsdShade.Material

property name: str

[summary]

Returns

[description]

Return type

str

property prim: pxr.Usd.Prim

[summary]

Returns

[description]

Return type

Usd.Prim

property prim_path: str

[summary]

Returns

[description]

Return type

str

property shaders_list: List[pxr.UsdShade.Shader]

[summary]

Returns

[description]

Return type

[type]

Preview Surface

class PreviewSurface(prim_path: str, name: str = 'preview_surface', shader: Optional[pxr.UsdShade.Shader] = None, color: Optional[numpy.ndarray] = None, roughness: Optional[float] = None, metallic: Optional[float] = None)

[summary]

Parameters
  • prim_path (str) – [description]

  • name (str, optional) – [description]. Defaults to “preview_surface”.

  • shader (Optional[UsdShade.Shader], optional) – [description]. Defaults to None.

  • color (Optional[np.ndarray], optional) – [description]. Defaults to None.

  • roughness (Optional[float], optional) – [description]. Defaults to None.

  • metallic (Optional[float], optional) – [description]. Defaults to None.

get_color() numpy.ndarray

[summary]

Returns

[description]

Return type

np.ndarray

get_metallic() float

[summary]

Returns

[description]

Return type

float

get_roughness() float

[summary]

Returns

[description]

Return type

float

property material: pxr.UsdShade.Material

[summary]

Returns

[description]

Return type

UsdShade.Material

property name: str

[summary]

Returns

[description]

Return type

str

property prim: pxr.Usd.Prim

[summary]

Returns

[description]

Return type

Usd.Prim

property prim_path: str

[summary]

Returns

[description]

Return type

str

set_color(color: numpy.ndarray) None

[summary]

Parameters

color (np.ndarray) – [description]

set_metallic(metallic: float) None

[summary]

Parameters

metallic (float) – [description]

set_roughness(roughness: float) None

[summary]

Parameters

roughness (float) – [description]

property shaders_list: List[pxr.UsdShade.Shader]

[summary]

Returns

[description]

Return type

[type]

OmniPBR Material

class OmniPBR(prim_path: str, name: str = 'omni_pbr', shader: Optional[pxr.UsdShade.Shader] = None, texture_path: Optional[str] = None, texture_scale: Optional[numpy.ndarray] = None, texture_translate: Optional[numpy.ndarray] = None, color: Optional[numpy.ndarray] = None)

[summary]

Parameters
  • prim_path (str) – [description]

  • name (str, optional) – [description]. Defaults to “omni_pbr”.

  • shader (Optional[UsdShade.Shader], optional) – [description]. Defaults to None.

  • texture_path (Optional[str], optional) – [description]. Defaults to None.

  • texture_scale (Optional[np.ndarray], optional) – [description]. Defaults to None.

  • texture_translate (Optional[np.ndarray, optional) – [description]. Defaults to None.

  • color (Optional[np.ndarray], optional) – [description]. Defaults to None.

get_color() numpy.ndarray

[summary]

Returns

[description]

Return type

np.ndarray

get_metallic_constant() float

[summary]

Returns

[description]

Return type

float

get_project_uvw() bool

[summary]

Returns

[description]

Return type

bool

get_reflection_roughness() float

[summary]

Returns

[description]

Return type

float

get_texture() str

[summary]

Returns

[description]

Return type

str

get_texture_scale() numpy.ndarray

[summary]

Returns

[description]

Return type

np.ndarray

get_texture_translate() numpy.ndarray

[summary]

Returns

[description]

Return type

np.ndarray

property material: pxr.UsdShade.Material

[summary]

Returns

[description]

Return type

UsdShade.Material

property name: str

[summary]

Returns

[description]

Return type

str

property prim: pxr.Usd.Prim

[summary]

Returns

[description]

Return type

Usd.Prim

property prim_path: str

[summary]

Returns

[description]

Return type

str

set_color(color: numpy.ndarray) None

[summary]

Parameters

color (np.ndarray) – [description]

set_metallic_constant(amount: float) None

[summary]

Parameters

amount (float) – [description]

set_project_uvw(flag: bool) None

[summary]

Parameters

flag (bool) – [description]

set_reflection_roughness(amount: float) None

[summary]

Parameters

amount (float) – [description]

set_texture(path: str) None

[summary]

Parameters

path (str) – [description]

set_texture_scale(x: float, y: float) None

[summary]

Parameters
  • x (float) – [description]

  • y (float) – [description]

set_texture_translate(x: float, y: float) None

[summary]

Parameters
  • x (float) – [description]

  • y (float) – [description]

property shaders_list: List[pxr.UsdShade.Shader]

[summary]

Returns

[description]

Return type

[type]

Omni Glass Material

class OmniGlass(prim_path: str, name: str = 'omni_glass', shader: Optional[pxr.UsdShade.Shader] = None, color: Optional[numpy.ndarray] = None, ior: Optional[float] = None, depth: Optional[float] = None, thin_walled: Optional[bool] = None)

[summary]

Parameters
  • prim_path (str) – [description]

  • name (str, optional) – [description]. Defaults to “omni_glass”.

  • shader (Optional[UsdShade.Shader], optional) – [description]. Defaults to None.

  • color (Optional[np.ndarray], optional) – [description]. Defaults to None.

  • ior (Optional[float], optional) – [description]. Defaults to None.

  • depth (Optional[float], optional) – [description]. Defaults to None.

  • thin_walled (Optional[bool], optional) – [description]. Defaults to None.

Raises

Exception – [description]

get_color() Optional[numpy.ndarray]

[summary]

Returns

[description]

Return type

np.ndarray

get_depth() Optional[float]
get_ior() Optional[float]
get_thin_walled() Optional[float]
property material: pxr.UsdShade.Material

[summary]

Returns

[description]

Return type

UsdShade.Material

property name: str

[summary]

Returns

[description]

Return type

str

property prim: pxr.Usd.Prim

[summary]

Returns

[description]

Return type

Usd.Prim

property prim_path: str

[summary]

Returns

[description]

Return type

str

set_color(color: numpy.ndarray) None

[summary]

Parameters

color (np.ndarray) – [description]

set_depth(depth: float) None
set_ior(ior: float) None
set_thin_walled(thin_walled: float) None
property shaders_list: List[pxr.UsdShade.Shader]

[summary]

Returns

[description]

Return type

[type]

Physics Material

class PhysicsMaterial(prim_path: str, name: str = 'physics_material', static_friction: Optional[float] = None, dynamic_friction: Optional[float] = None, restitution: Optional[float] = None)

[summary]

Parameters
  • prim_path (str) – [description]

  • name (str, optional) – [description]. Defaults to “physics_material”.

  • static_friction (Optional[float], optional) – [description]. Defaults to None.

  • dynamic_friction (Optional[float], optional) – [description]. Defaults to None.

  • restitution (Optional[float], optional) – [description]. Defaults to None.

get_dynamic_friction() float

[summary]

Returns

[description]

Return type

float

get_restitution() float

[summary]

Returns

[description]

Return type

float

get_static_friction() float

[summary]

Returns

[description]

Return type

float

property material: pxr.UsdShade.Material

[summary]

Returns

[description]

Return type

UsdShade.Material

property name: str

[summary]

Returns

[description]

Return type

str

property prim: pxr.Usd.Prim

[summary]

Returns

[description]

Return type

Usd.Prim

property prim_path: str

[summary]

Returns

[description]

Return type

str

set_dynamic_friction(friction: float) None

[summary]

Parameters

friction (float) – [description]

set_restitution(restitution: float) None

[summary]

Parameters

restitution (float) – [description]

set_static_friction(friction: float) None

[summary]

Parameters

friction (float) – [description]

Particle Material

class ParticleMaterial(prim_path: str, name: Optional[str] = 'particle_material', friction: Optional[float] = None, particle_friction_scale: Optional[float] = None, damping: Optional[float] = None, viscosity: Optional[float] = None, vorticity_confinement: Optional[float] = None, surface_tension: Optional[float] = None, cohesion: Optional[float] = None, adhesion: Optional[float] = None, particle_adhesion_scale: Optional[float] = None, adhesion_offset_scale: Optional[float] = None, gravity_scale: Optional[float] = None, lift: Optional[float] = None, drag: Optional[float] = None)

A wrapper around position-based-dynamics (PBD) material for particles used to simulate fluids, cloth and inflatables.

Note

Currently, only a single material per particle system is supported which applies to all objects that are associated with the system.

get_adhesion() float
Returns

The adhesion for interaction between particles (solid or fluid), and rigids or deformables.

Return type

float

get_adhesion_offset_scale() float
Returns

The adhesion offset scale.

Return type

float

get_cohesion() float
Returns

The cohesion for interaction between fluid particles.

Return type

float

get_damping() float
Returns

The global velocity damping coefficient.

Return type

float

get_drag() float
Returns

The drag coefficient, basic aerodynamic drag model coefficient.

Return type

float

get_friction() float
Returns

The friction coefficient.

Return type

float

get_gravity_scale() float
Returns

The gravitational acceleration scaling factor.

Return type

float

get_lift() float
Returns

The lift coefficient, basic aerodynamic lift model coefficient.

Return type

float

get_particle_adhesion_scale() float
Returns

The particle adhesion scale.

Return type

float

get_particle_friction_scale() float
Returns

The particle friction scale.

Return type

float

get_surface_tension() float
Returns

The surface tension for fluid particles.

Return type

float

get_viscosity() float
Returns

The viscosity.

Return type

float

get_vorticity_confinement() float
Returns

The vorticity confinement for fluid particles.

Return type

float

initialize(physics_sim_view=None) None
is_valid() bool
Returns

True is the current prim path corresponds to a valid prim in stage. False otherwise.

Return type

bool

property material: pxr.UsdShade.Material

Returns: UsdShade.Material: The USD Material object.

property name: Optional[str]

Returns: str: name given to the prim when instantiating it. Otherwise None.

post_reset() None

Resets the prim to its default state.

property prim: pxr.Usd.Prim

Returns: Usd.Prim: The USD prim present.

property prim_path: str

Returns: str: The stage path to the material.

set_adhesion(value: float) None

Sets the adhesion for interaction between particles (solid or fluid), and rigid or deformable objects.

Note

Adhesion also applies to solid-solid particle interactions, but is multiplied with the particle adhesion scale.

Parameters

value (float) – The adhesion. Range: [0, inf), Units: dimensionless

set_adhesion_offset_scale(value: float) None

Sets the adhesion offset scale.

It defines the offset at which adhesion ceases to take effect. For interactions between particles (fluid or solid), and rigids or deformables, the adhesion offset is defined relative to the rest offset. For solid particle-particle interactions, the adhesion offset is defined relative to the solid rest offset.

Parameters

value (float) – The adhesion offset scale. Range: [0, inf), Units: dimensionless

set_cohesion(value: float) None

Sets the cohesion for interaction between fluid particles.

Parameters

value (float) – The cohesion. Range: [0, inf), Units: dimensionless

set_damping(value: float) None

Sets the global velocity damping coefficient.

Parameters

value (float) – The damping coefficient. Range: [0, inf), Units: dimensionless

set_drag(value: float) None

Sets the drag coefficient, i.e. basic aerodynamic drag model coefficient.

It is useful for cloth and inflatable particle objects.

Parameters

value (float) – The drag coefficient. Range: [0, inf), Units: dimensionless

set_friction(value: float) None

Sets the friction coefficient.

The friction takes effect in all interactions between particles and rigids or deformables. For solid particle-particle interactions it is multiplied by the particle friction scale.

Parameters

value (float) – The friction coefficient. Range: [0, inf), Units: dimensionless

set_gravity_scale(value: float) None

Sets the gravitational acceleration scaling factor.

It can be used to approximate lighter-than-air inflatable. For example (-1.0 would invert gravity).

Parameters

value (float) – The gravity scale. Range: (-inf , inf), Units: dimensionless

set_lift(value: float) None

Sets the lift coefficient, i.e. basic aerodynamic lift model coefficient.

It is useful for cloth and inflatable particle objects.

Parameters

value (float) – The lift coefficient. Range: [0, inf), Units: dimensionless

set_particle_adhesion_scale(value: float) None

Sets the particle adhesion scale.

This coefficient scales the adhesion for solid particle-particle interaction.

Parameters

value (float) – The adhesion scale. Range: [0, inf), Units: dimensionless

set_particle_friction_scale(value: float) None

Sets the particle friction scale.

The coefficient that scales friction for solid particle-particle interaction.

Parameters

value (float) – The particle friction scale. Range: [0, inf), Units: dimensionless

set_surface_tension(value: float) None

Sets the surface tension for fluid particles.

Parameters

value (float) – The surface tension. Range: [0, inf), Units: 1 / (distance * distance * distance)

set_viscosity(value: float) None

Sets the viscosity for fluid particles.

Parameters

value (float) – The viscosity. Range: [0, inf), Units: dimensionless

set_vorticity_confinement(value: float) None

Sets the vorticity confinement for fluid particles.

This helps prevent energy loss due to numerical solver by adding vortex-like accelerations to the particles.

Parameters

value (float) – The vorticity confinement. Range: [0, inf), Units: dimensionless

Particle Material View

class ParticleMaterialView(prim_paths_expr: str, name: str = 'particle_material_view', frictions: Optional[Union[numpy.ndarray, torch.Tensor]] = None, particle_friction_scales: Optional[Union[numpy.ndarray, torch.Tensor]] = None, dampings: Optional[Union[numpy.ndarray, torch.Tensor]] = None, viscosities: Optional[Union[numpy.ndarray, torch.Tensor]] = None, vorticity_confinements: Optional[Union[numpy.ndarray, torch.Tensor]] = None, surface_tensions: Optional[Union[numpy.ndarray, torch.Tensor]] = None, cohesions: Optional[Union[numpy.ndarray, torch.Tensor]] = None, adhesions: Optional[Union[numpy.ndarray, torch.Tensor]] = None, particle_adhesion_scales: Optional[Union[numpy.ndarray, torch.Tensor]] = None, adhesion_offset_scales: Optional[Union[numpy.ndarray, torch.Tensor]] = None, gravity_scales: Optional[Union[numpy.ndarray, torch.Tensor]] = None, lifts: Optional[Union[numpy.ndarray, torch.Tensor]] = None, drags: Optional[Union[numpy.ndarray, torch.Tensor]] = None)

The view class to deal with particleMaterial prims. Provides high level functions to deal with particle material (1 or more particle materials) as well as its attributes/ properties. This object wraps all matching materials found at the regex provided at the prim_paths_expr. This object wraps all matching materials Prims found at the regex provided at the prim_paths_expr.

property count: int

Returns: int: number of rigid shapes for the prims in the view.

get_adhesion_offset_scales(indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor]

Gets the adhesion offset scale of materials indicated by the indices.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

adhesion offset scale tensor with shape (M, )

Return type

Union[np.ndarray, torch.Tensor]

get_adhesions(indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor]

Gets the adhesion of materials indicated by the indices.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

adhesion tensor with shape (M, )

Return type

Union[np.ndarray, torch.Tensor]

get_cohesions(indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor]

Gets the cohesion of materials indicated by the indices.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

cohesion tensor with shape (M, )

Return type

Union[np.ndarray, torch.Tensor]

get_dampings(indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor]

Gets the dampings of materials indicated by the indices.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

dampings tensor with shape (M, )

Return type

Union[np.ndarray, torch.Tensor]

get_drags(indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor]

Gets the drags of materials indicated by the indices.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

drag tensor with shape (M, )

Return type

Union[np.ndarray, torch.Tensor]

get_frictions(indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor]

Gets the friction of materials indicated by the indices.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

friction tensor with shape (M, )

Return type

Union[np.ndarray, torch.Tensor]

get_gravity_scales(indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor]

Gets the gravity scale of materials indicated by the indices.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

gravity scale tensor with shape (M, )

Return type

Union[np.ndarray, torch.Tensor]

get_lifts(indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor]

Gets the lifts of materials indicated by the indices.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

lift tensor with shape (M, )

Return type

Union[np.ndarray, torch.Tensor]

get_particle_adhesion_scales(indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor]

Gets the adhesion scale of materials indicated by the indices.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

adhesion scale tensor with shape (M, )

Return type

Union[np.ndarray, torch.Tensor]

get_particle_friction_scales(indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor]

Gets the particle friction scale of materials indicated by the indices.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

particle friction scale tensor with shape (M, )

Return type

Union[np.ndarray, torch.Tensor]

get_surface_tensions(indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor]

Gets the surface tension of materials indicated by the indices.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

surface tension tensor with shape (M, )

Return type

Union[np.ndarray, torch.Tensor]

get_viscosities(indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor]

Gets the viscosity of materials indicated by the indices.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

viscosity tensor with shape (M, )

Return type

Union[np.ndarray, torch.Tensor]

get_vorticity_confinements(indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor]

Gets the vorticity confinement of materials indicated by the indices.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

vorticity confinement tensor with shape (M, )

Return type

Union[np.ndarray, torch.Tensor]

initialize(physics_sim_view: Optional[omni.physics.tensors.bindings._physicsTensors.SimulationView] = None) None

Create a physics simulation view if not passed and creates a rigid body view in physX.

Parameters

physics_sim_view (omni.physics.tensors.SimulationView, optional) – current physics simulation view. Defaults to None.

is_physics_handle_valid() bool
Returns

True if the physics handle of the view is valid (i.e physics is initialized for the view). Otherwise False.

Return type

bool

is_valid(indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None) bool
Parameters

indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

Returns

True if all prim paths specified in the view correspond to a valid prim in stage. False otherwise.

Return type

bool

property name: str

Returns: str: name given to the view when instantiating it.

post_reset() None

Resets the particles to their initial states.

set_adhesion_offset_scales(values: Optional[Union[numpy.ndarray, torch.Tensor]], indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None) None

Sets the adhesion offset scale for the material prims indicated by the indices.

Parameters
  • values (Optional[Union[np.ndarray, torch.Tensor]], optional) – material adhesion offset scale tensor with the shape (M, ).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_adhesions(values: Optional[Union[numpy.ndarray, torch.Tensor]], indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None) None

Sets the particle adhesion for the material prims indicated by the indices.

Parameters
  • values (Optional[Union[np.ndarray, torch.Tensor]], optional) – material particle adhesion scale tensor with the shape (M, ).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_cohesions(values: Optional[Union[numpy.ndarray, torch.Tensor]], indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None) None

Sets the particle cohesion for the material prims indicated by the indices.

Parameters
  • values (Optional[Union[np.ndarray, torch.Tensor]], optional) – material particle cohesion scale tensor with the shape (M, ).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_dampings(values: Optional[Union[numpy.ndarray, torch.Tensor]], indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None) None

Sets the dampings for the material prims indicated by the indices.

Parameters
  • values (Optional[Union[np.ndarray, torch.Tensor]], optional) – material damping tensor with the shape (M, ).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_drags(values: Optional[Union[numpy.ndarray, torch.Tensor]], indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None) None

Sets the drags for the material prims indicated by the indices.

Parameters
  • values (Optional[Union[np.ndarray, torch.Tensor]], optional) – material drag tensor with the shape (M, ).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_frictions(values: Optional[Union[numpy.ndarray, torch.Tensor]], indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None) None

Sets the friction for the material prims indicated by the indices.

Parameters
  • values (Optional[Union[np.ndarray, torch.Tensor]], optional) – material friction tensor with the shape (M, ).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_gravity_scales(values: Optional[Union[numpy.ndarray, torch.Tensor]], indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None) None

Sets the gravity scale for the material prims indicated by the indices.

Parameters
  • values (Optional[Union[np.ndarray, torch.Tensor]], optional) – material gravity scale tensor with the shape (M, ).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_lifts(values: Optional[Union[numpy.ndarray, torch.Tensor]], indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None) None

Sets the lifts for the material prims indicated by the indices.

Parameters
  • values (Optional[Union[np.ndarray, torch.Tensor]], optional) – material lift tensor with the shape (M, ).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_particle_adhesion_scales(values: Optional[Union[numpy.ndarray, torch.Tensor]], indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None) None

Sets the particle adhesion for the material prims indicated by the indices.

Parameters
  • values (Optional[Union[np.ndarray, torch.Tensor]], optional) – material particle adhesion scale tensor with the shape (M, ).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_particle_friction_scales(values: Optional[Union[numpy.ndarray, torch.Tensor]], indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None) None

Sets the particle friction scale for the material prims indicated by the indices.

Parameters
  • values (Optional[Union[np.ndarray, torch.Tensor]], optional) – material particle friction scale tensor with the shape (M, ).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_surface_tensions(values: Optional[Union[numpy.ndarray, torch.Tensor]], indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None) None

Sets the particle surface tension for the material prims indicated by the indices.

Parameters
  • values (Optional[Union[np.ndarray, torch.Tensor]], optional) – material particle surface tension scale tensor with the shape (M, ).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_viscosities(values: Optional[Union[numpy.ndarray, torch.Tensor]], indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None) None

Sets the particle viscosity for the material prims indicated by the indices.

Parameters
  • values (Optional[Union[np.ndarray, torch.Tensor]], optional) – material particle viscosity scale tensor with the shape (M, ).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_vorticity_confinements(values: Optional[Union[numpy.ndarray, torch.Tensor]], indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None) None

Sets the vorticity confinement for the material prims indicated by the indices.

Parameters
  • values (Optional[Union[np.ndarray, torch.Tensor]], optional) – material particle vorticity confinement scale tensor with the shape (M, ).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

Deformable Material

class DeformableMaterial(prim_path: str, name: Optional[str] = 'deformable_material', dynamic_friction: Optional[float] = None, youngs_modulus: Optional[float] = None, poissons_ratio: Optional[float] = None, elasticity_damping: Optional[float] = None, damping_scale: Optional[float] = None)

A wrapper around deformable material used to simulate soft bodies.

get_damping_scale() float
Returns

The damping scale coefficient.

Return type

float

get_dynamic_friction() float
Returns

The dynamic friction coefficient.

Return type

float

get_elasticity_damping() float
Returns

The elasticity damping coefficient.

Return type

float

get_poissons_ratio() float
Returns

The poissons ratio.

Return type

float

get_youngs_modululs() float
Returns

The youngs modululs coefficient.

Return type

float

initialize(physics_sim_view=None) None
is_valid() bool
Returns

True is the current prim path corresponds to a valid prim in stage. False otherwise.

Return type

bool

property material: pxr.UsdShade.Material

Returns: UsdShade.Material: The USD Material object.

property name: Optional[str]

Returns: str: name given to the prim when instantiating it. Otherwise None.

post_reset() None

Resets the prim to its default state.

property prim: pxr.Usd.Prim

Returns: Usd.Prim: The USD prim present.

property prim_path: str

Returns: str: The stage path to the material.

set_damping_scale(value: float) None

Sets the damping scale coefficient.

Parameters

value (float) – The damping scale coefficient Range: [0, inf)

set_dynamic_friction(value: float) None

Sets the dynamic_friction coefficient.

The dynamic_friction takes effect in all interactions between particles and rigids or deformables. For solid particle-particle interactions it is multiplied by the particle dynamic_friction scale.

Parameters

value (float) – The dynamic_friction coefficient. Range: [0, inf), Units: dimensionless

set_elasticity_damping(value: float) None

Sets the global velocity elasticity damping coefficient.

Parameters

value (float) – The elasticity damping coefficient. Range: [0, inf), Units: dimensionless

set_poissons_ratio(value: float) None

Sets the poissons ratio coefficient

Parameters

value (float) – The poissons ratio. Range: (0 , 0.5)

set_youngs_modululs(value: float) None

Sets the youngs_modululs for fluid particles.

Parameters

value (float) – The youngs_modululs. Range: [0, inf)

Deformable Material View

class DeformableMaterialView(prim_paths_expr: str, name: str = 'deformable_material_view', dynamic_frictions: Optional[Union[numpy.ndarray, torch.Tensor]] = None, youngs_moduli: Optional[Union[numpy.ndarray, torch.Tensor]] = None, poissons_ratios: Optional[Union[numpy.ndarray, torch.Tensor]] = None, elasticity_dampings: Optional[Union[numpy.ndarray, torch.Tensor]] = None, damping_scales: Optional[Union[numpy.ndarray, torch.Tensor]] = None)

The view class to deal with deformableMaterial prims. Provides high level functions to deal with deformable material (1 or more deformable materials) as well as its attributes/ properties. This object wraps all matching materials found at the regex provided at the prim_paths_expr. This object wraps all matching materials Prims found at the regex provided at the prim_paths_expr.

property count: int

Returns: int: number of rigid shapes for the prims in the view.

get_damping_scales(indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor]

Gets the damping scale of materials indicated by the indices.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

damping scale tensor with shape (M, )

Return type

Union[np.ndarray, torch.Tensor]

get_dynamic_frictions(indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor]

Gets the dynamic friction of materials indicated by the indices.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

dynamic friction tensor with shape (M, )

Return type

Union[np.ndarray, torch.Tensor]

get_elasticity_dampings(indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor]

Gets the elasticity dampings of materials indicated by the indices.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

elasticity dampings tensor with shape (M, )

Return type

Union[np.ndarray, torch.Tensor]

get_poissons_ratios(indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor]

Gets the poissons ratios of materials indicated by the indices.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

poissons ratio tensor with shape (M, )

Return type

Union[np.ndarray, torch.Tensor]

get_youngs_moduli(indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None, clone: bool = True) Union[numpy.ndarray, torch.Tensor]

Gets the Youngs moduli of materials indicated by the indices.

Parameters
  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

  • clone (bool, optional) – True to return a clone of the internal buffer. Otherwise False. Defaults to True.

Returns

Youngs moduli tensor with shape (M, )

Return type

Union[np.ndarray, torch.Tensor]

initialize(physics_sim_view: Optional[omni.physics.tensors.bindings._physicsTensors.SimulationView] = None) None

Create a physics simulation view if not passed and creates a rigid body view in physX.

Parameters

physics_sim_view (omni.physics.tensors.SimulationView, optional) – current physics simulation view. Defaults to None.

is_physics_handle_valid() bool
Returns

True if the physics handle of the view is valid (i.e physics is initialized for the view). Otherwise False.

Return type

bool

is_valid(indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None) bool
Parameters

indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indicies to specify which prims to query. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

Returns

True if all prim paths specified in the view correspond to a valid prim in stage. False otherwise.

Return type

bool

property name: str

Returns: str: name given to the view when instantiating it.

post_reset() None

Resets the deformables to their initial states.

set_damping_scales(values: Optional[Union[numpy.ndarray, torch.Tensor]], indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None) None

Sets the damping scale for the material prims indicated by the indices.

Parameters
  • values (Optional[Union[np.ndarray, torch.Tensor]], optional) – material damping scale tensor with the shape (M, ).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_dynamic_frictions(values: Optional[Union[numpy.ndarray, torch.Tensor]], indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None) None

Sets the dynamic friction for the material prims indicated by the indices.

Parameters
  • values (Optional[Union[np.ndarray, torch.Tensor]], optional) – material dynamic friction tensor with the shape (M, ).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_elasticity_dampings(values: Optional[Union[numpy.ndarray, torch.Tensor]], indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None) None

Sets the elasticity_dampings for the material prims indicated by the indices.

Parameters
  • values (Optional[Union[np.ndarray, torch.Tensor]], optional) – material damping tensor with the shape (M, ).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_poissons_ratios(values: Optional[Union[numpy.ndarray, torch.Tensor]], indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None) None

Sets the poissons ratios for the material prims indicated by the indices.

Parameters
  • values (Optional[Union[np.ndarray, torch.Tensor]], optional) – material poissons ratio tensor with the shape (M, ).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

set_youngs_moduli(values: Optional[Union[numpy.ndarray, torch.Tensor]], indices: Optional[Union[numpy.ndarray, list, torch.Tensor]] = None) None

Sets the youngs moduli for the material prims indicated by the indices.

Parameters
  • values (Optional[Union[np.ndarray, torch.Tensor]], optional) – material drag tensor with the shape (M, ).

  • indices (Optional[Union[np.ndarray, list, torch.Tensor]], optional) – indices to specify which material prims to manipulate. Shape (M,). Where M <= size of the encapsulated prims in the view. Defaults to None (i.e: all prims in the view).

Objects

from omni.isaac.core.objects.cone import DynamicCone, FixedCone, VisualCone from omni.isaac.core.objects.cuboid import DynamicCuboid, FixedCuboid, VisualCuboid from omni.isaac.core.objects.cylinder import DynamicCylinder, FixedCylinder, VisualCylinder from omni.isaac.core.objects.sphere import DynamicSphere, FixedSphere, VisualSphere

Ground Plane

class GroundPlane(prim_path: str, name: str = 'ground_plane', size: Optional[float] = None, z_position: Optional[float] = None, scale: Optional[numpy.ndarray] = None, visible: Optional[bool] = None, color: Optional[numpy.ndarray] = None, physics_material: Optional[omni.isaac.core.materials.physics_material.PhysicsMaterial] = None, visual_material: Optional[omni.isaac.core.materials.visual_material.VisualMaterial] = None)

[summary]

Parameters
  • prim_path (str) – [description]

  • name (str, optional) – [description]. Defaults to “ground_plane”.

  • size (Optional[float], optional) – [description]. Defaults to 5000.0.

  • z_position (float, optional) – [description]. Defaults to 0.

  • scale (Optional[np.ndarray], optional) – [description]. Defaults to None.

  • visible (bool, optional) – [description]. Defaults to True.

  • color (Optional[np.ndarray], optional) – [description]. Defaults to None.

  • physics_material_path (Optional[PhysicsMaterial], optional) – [description]. Defaults to None.

  • visual_material (Optional[VisualMaterial], optional) – [description]. Defaults to None.

  • static_friction (float, optional) – [description]. Defaults to 0.5.

  • dynamic_friction (float, optional) – [description]. Defaults to 0.5.

  • restitution (float, optional) – [description]. Defaults to 0.8.

apply_physics_material(physics_material: omni.isaac.core.materials.physics_material.PhysicsMaterial, weaker_than_descendants: bool = False)

Used to apply physics material to the held prim and optionally its descendants.

Parameters
  • physics_material (PhysicsMaterial) – physics material to be applied to the held prim. This where you want to define friction, restitution..etc. Note: if a physics material is not defined, the defaults will be used from PhysX.

  • weaker_than_descendants (bool, optional) – True if the material shouldn’t override the descendants materials, otherwise False. Defaults to False.

property collision_geometry_prim: omni.isaac.core.prims.geometry_prim.GeometryPrim

_summary_

Returns

_description_

Return type

GeometryPrim

get_applied_physics_material() omni.isaac.core.materials.physics_material.PhysicsMaterial

Returns the current applied physics material in case it was applied using apply_physics_material or not.

Returns

the current applied physics material.

Return type

PhysicsMaterial

get_default_state() omni.isaac.core.utils.types.XFormPrimState
Returns

returns the default state of the prim (position and orientation) that is used after each reset.

Return type

XFormPrimState

get_world_pose() Tuple[numpy.ndarray, numpy.ndarray]

Gets prim’s pose with respect to the world’s frame.

Returns

first index is position in the world frame of the prim. shape is (3, ).

second index is quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ).

Return type

Tuple[np.ndarray, np.ndarray]

initialize(physics_sim_view=None) None
is_valid() bool
Returns

True is the current prim path corresponds to a valid prim in stage. False otherwise.

Return type

bool

property name: Optional[str]

Returns: str: name given to the prim when instantiating it. Otherwise None.

post_reset() None

Resets the prim to its default state (position and orientation).

property prim: pxr.Usd.Prim

Returns: Usd.Prim: USD Prim object that this object holds.

property prim_path: str

Returns: str: prim path in the stage.

set_default_state(position: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None) None

Sets the default state of the prim (position and orientation), that will be used after each reset.

Parameters
  • position (Optional[Sequence[float]], optional) – position in the world frame of the prim. shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[Sequence[float]], optional) – quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

set_world_pose(position: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None) None

Sets prim’s pose with respect to the world’s frame.

Parameters
  • position (Optional[Sequence[float]], optional) – position in the world frame of the prim. shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[Sequence[float]], optional) – quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

property xform_prim: omni.isaac.core.prims.xform_prim.XFormPrim

_summary_

Returns

_description_

Return type

XFormPrim

Fixed Capsule

class FixedCapsule(prim_path: str, name: str = 'fixed_capsule', position: Optional[numpy.ndarray] = None, translation: Optional[numpy.ndarray] = None, orientation: Optional[numpy.ndarray] = None, scale: Optional[numpy.ndarray] = None, visible: Optional[bool] = None, color: Optional[numpy.ndarray] = None, radius: Optional[numpy.ndarray] = None, height: Optional[float] = None, visual_material: Optional[omni.isaac.core.materials.visual_material.VisualMaterial] = None, physics_material: Optional[omni.isaac.core.materials.physics_material.PhysicsMaterial] = None)

_summary_

Parameters
  • prim_path (str) – _description_

  • name (str, optional) – _description_. Defaults to “fixed_capsule”.

  • position (Optional[np.ndarray], optional) – _description_. Defaults to None.

  • translation (Optional[np.ndarray], optional) – _description_. Defaults to None.

  • orientation (Optional[np.ndarray], optional) – _description_. Defaults to None.

  • scale (Optional[np.ndarray], optional) – _description_. Defaults to None.

  • visible (Optional[bool], optional) – _description_. Defaults to None.

  • color (Optional[np.ndarray], optional) – _description_. Defaults to None.

  • radius (Optional[np.ndarray], optional) – _description_. Defaults to None.

  • height (Optional[float], optional) – _description_. Defaults to None.

  • visual_material (Optional[VisualMaterial], optional) – _description_. Defaults to None.

  • physics_material (Optional[PhysicsMaterial], optional) – _description_. Defaults to None.

apply_physics_material(physics_material: omni.isaac.core.materials.physics_material.PhysicsMaterial, weaker_than_descendants: bool = False)

Used to apply physics material to the held prim and optionally its descendants.

Parameters
  • physics_material (PhysicsMaterial) – physics material to be applied to the held prim. This where you want to define friction, restitution..etc. Note: if a physics material is not defined, the defaults will be used from PhysX.

  • weaker_than_descendants (bool, optional) – True if the material shouldn’t override the descendants materials, otherwise False. Defaults to False.

apply_visual_material(visual_material: omni.isaac.core.materials.visual_material.VisualMaterial, weaker_than_descendants: bool = False) None

Used to apply visual material to the held prim and optionally its descendants.

Parameters
  • visual_material (VisualMaterial) – visual material to be applied to the held prim. Currently supports PreviewSurface, OmniPBR and OmniGlass.

  • weaker_than_descendants (bool, optional) – True if the material shouldn’t override the descendants materials, otherwise False. Defaults to False.

property geom: pxr.UsdGeom.Gprim

Returns: UsdGeom.Gprim: USD geometry object encapsulated.

get_applied_physics_material() omni.isaac.core.materials.physics_material.PhysicsMaterial

Returns the current applied physics material in case it was applied using apply_physics_material or not.

Returns

the current applied physics material.

Return type

PhysicsMaterial

get_applied_visual_material() omni.isaac.core.materials.visual_material.VisualMaterial
Returns the current applied visual material in case it was applied using apply_visual_material OR

it’s one of the following materials that was already applied before: PreviewSurface, OmniPBR and OmniGlass.

Returns

the current applied visual material if its type is currently supported.

Return type

VisualMaterial

get_collision_approximation() str
Returns

approximation used for collision, could be “none”, “convexHull” or “convexDecomposition”

Return type

str

get_collision_enabled() bool

Returns:

get_contact_force_matrix(dt: float = 1.0) Union[numpy.ndarray, torch.Tensor]

If the object is initialized with filter_paths_expr list, this method returns the contact forces between the prims in the view and the filter prims. i.e., a matrix of dimension (self._contact_view.num_filters, 3) where num_filters is the determined according to the filter_paths_expr parameter.

Parameters

dt (float) – time step multiplier to convert the underlying impulses to forces. If the default value is used then the forces are in fact contact impulses

Returns

Net contact forces of the prims with shape (self._geometry_prim_view._contact_view.num_filters, 3).

Return type

Union[np.ndarray, torch.Tensor]

get_contact_offset() float
Returns

contact offset of the collision shape.

Return type

float

get_default_state() omni.isaac.core.utils.types.XFormPrimState
Returns

returns the default state of the prim (position and orientation) that is used after each reset.

Return type

XFormPrimState

get_height() float

[summary]

Returns

[description]

Return type

float

get_local_pose() Tuple[numpy.ndarray, numpy.ndarray]

Gets prim’s pose with respect to the local frame (the prim’s parent frame).

Returns

first index is position in the local frame of the prim. shape is (3, ).

second index is quaternion orientation in the local frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ).

Return type

Tuple[np.ndarray, np.ndarray]

get_local_scale() numpy.ndarray

Gets prim’s scale with respect to the local frame (the parent’s frame).

Returns

scale applied to the prim’s dimensions in the local frame. shape is (3, ).

Return type

np.ndarray

get_min_torsional_patch_radius() float
Returns

minimum radius of the contact patch used to apply torsional friction. Allowed range [0, max_float].

Return type

float

get_net_contact_forces(dt: float = 1.0) Union[numpy.ndarray, torch.Tensor]

If contact forces of the prims in the view are tracked, this method returns the net contact forces on prims. i.e., a matrix of dimension (1, 3)

Parameters

dt (float) – time step multiplier to convert the underlying impulses to forces. If the default value is used then the forces are in fact contact impulses

Returns

Net contact forces of the prims with shape (3).

Return type

Union[np.ndarray, torch.Tensor]

get_radius() float

[summary]

Returns

[description]

Return type

float

get_rest_offset() float
Returns

rest offset of the collision shape.

Return type

float

get_torsional_patch_radius() float
Returns

radius of the contact patch used to apply torsional friction. Allowed range [0, max_float].

Return type

float

get_visibility() bool
Returns

true if the prim is visible in stage. false otherwise.

Return type

bool

get_world_pose() Tuple[numpy.ndarray, numpy.ndarray]

Gets prim’s pose with respect to the world’s frame.

Returns

first index is position in the world frame of the prim. shape is (3, ).

second index is quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ).

Return type

Tuple[np.ndarray, np.ndarray]

get_world_scale() numpy.ndarray

Gets prim’s scale with respect to the world’s frame.

Returns

scale applied to the prim’s dimensions in the world frame. shape is (3, ).

Return type

np.ndarray

initialize(physics_sim_view=None) None
is_valid() bool
Returns

True is the current prim path corresponds to a valid prim in stage. False otherwise.

Return type

bool

is_visual_material_applied() bool
Returns

True if there is a visual material applied. False otherwise.

Return type

bool

property name: Optional[str]

Returns: str: name given to the prim when instantiating it. Otherwise None.

_summary_

Returns

_description_

Return type

bool

post_reset() None

Resets the prim to its default state (position and orientation).

property prim: pxr.Usd.Prim

Returns: Usd.Prim: USD Prim object that this object holds.

property prim_path: str

Returns: str: prim path in the stage.

set_collision_approximation(approximation_type: str) None
Parameters

approximation_type (str) – approximation used for collision, could be “none”, “convexHull” or “convexDecomposition”

set_collision_enabled(enabled: bool) None

Args:

set_contact_offset(offset: float) None
Parameters

offset (float) – Contact offset of a collision shape. Allowed range [maximum(0, rest_offset), 0]. Default value is -inf, means default is picked by simulation based on the shape extent.

set_default_state(position: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None) None

Sets the default state of the prim (position and orientation), that will be used after each reset.

Parameters
  • position (Optional[Sequence[float]], optional) – position in the world frame of the prim. shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[Sequence[float]], optional) – quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

set_height(height: float) None

[summary]

Parameters

height (float) – [description]

set_local_pose(translation: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None) None

Sets prim’s pose with respect to the local frame (the prim’s parent frame).

Parameters
  • translation (Optional[Sequence[float]], optional) – translation in the local frame of the prim (with respect to its parent prim). shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[Sequence[float]], optional) – quaternion orientation in the local frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

set_local_scale(scale: Optional[Sequence[float]]) None

Sets prim’s scale with respect to the local frame (the prim’s parent frame).

Parameters

scale (Optional[Sequence[float]]) – scale to be applied to the prim’s dimensions. shape is (3, ). Defaults to None, which means left unchanged.

set_min_torsional_patch_radius(radius: float) None
Parameters

radius (float) – minimum radius of the contact patch used to apply torsional friction. Allowed range [0, max_float].

set_radius(radius: float) None

[summary]

Parameters

radius (float) – [description]

set_rest_offset(offset: float) None
Parameters

offset (float) – Rest offset of a collision shape. Allowed range [-max_float, contact_offset. Default value is -inf, means default is picked by simulatiion. For rigid bodies its zero.

set_torsional_patch_radius(radius: float) None
Parameters

radius (float) – radius of the contact patch used to apply torsional friction. Allowed range [0, max_float].

set_visibility(visible: bool) None

Sets the visibility of the prim in stage.

Parameters

visible (bool) – flag to set the visibility of the usd prim in stage.

set_world_pose(position: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None) None

Sets prim’s pose with respect to the world’s frame.

Parameters
  • position (Optional[Sequence[float]], optional) – position in the world frame of the prim. shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[Sequence[float]], optional) – quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

Visual Capsule

class VisualCapsule(prim_path: str, name: str = 'visual_capsule', position: Optional[Sequence[float]] = None, translation: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None, scale: Optional[Sequence[float]] = None, visible: Optional[bool] = None, color: Optional[numpy.ndarray] = None, radius: Optional[float] = None, height: Optional[float] = None, visual_material: Optional[omni.isaac.core.materials.visual_material.VisualMaterial] = None)

_summary_

Parameters
  • prim_path (str) – _description_

  • name (str, optional) – _description_. Defaults to “visual_capsule”.

  • position (Optional[Sequence[float]], optional) – _description_. Defaults to None.

  • translation (Optional[Sequence[float]], optional) – _description_. Defaults to None.

  • orientation (Optional[Sequence[float]], optional) – _description_. Defaults to None.

  • scale (Optional[Sequence[float]], optional) – _description_. Defaults to None.

  • visible (Optional[bool], optional) – _description_. Defaults to None.

  • color (Optional[np.ndarray], optional) – _description_. Defaults to None.

  • radius (Optional[float], optional) – _description_. Defaults to None.

  • height (Optional[float], optional) – _description_. Defaults to None.

  • visual_material (Optional[VisualMaterial], optional) – _description_. Defaults to None.

Raises

Exception – _description_

apply_physics_material(physics_material: omni.isaac.core.materials.physics_material.PhysicsMaterial, weaker_than_descendants: bool = False)

Used to apply physics material to the held prim and optionally its descendants.

Parameters
  • physics_material (PhysicsMaterial) – physics material to be applied to the held prim. This where you want to define friction, restitution..etc. Note: if a physics material is not defined, the defaults will be used from PhysX.

  • weaker_than_descendants (bool, optional) – True if the material shouldn’t override the descendants materials, otherwise False. Defaults to False.

apply_visual_material(visual_material: omni.isaac.core.materials.visual_material.VisualMaterial, weaker_than_descendants: bool = False) None

Used to apply visual material to the held prim and optionally its descendants.

Parameters
  • visual_material (VisualMaterial) – visual material to be applied to the held prim. Currently supports PreviewSurface, OmniPBR and OmniGlass.

  • weaker_than_descendants (bool, optional) – True if the material shouldn’t override the descendants materials, otherwise False. Defaults to False.

property geom: pxr.UsdGeom.Gprim

Returns: UsdGeom.Gprim: USD geometry object encapsulated.

get_applied_physics_material() omni.isaac.core.materials.physics_material.PhysicsMaterial

Returns the current applied physics material in case it was applied using apply_physics_material or not.

Returns

the current applied physics material.

Return type

PhysicsMaterial

get_applied_visual_material() omni.isaac.core.materials.visual_material.VisualMaterial
Returns the current applied visual material in case it was applied using apply_visual_material OR

it’s one of the following materials that was already applied before: PreviewSurface, OmniPBR and OmniGlass.

Returns

the current applied visual material if its type is currently supported.

Return type

VisualMaterial

get_collision_approximation() str
Returns

approximation used for collision, could be “none”, “convexHull” or “convexDecomposition”

Return type

str

get_collision_enabled() bool

Returns:

get_contact_force_matrix(dt: float = 1.0) Union[numpy.ndarray, torch.Tensor]

If the object is initialized with filter_paths_expr list, this method returns the contact forces between the prims in the view and the filter prims. i.e., a matrix of dimension (self._contact_view.num_filters, 3) where num_filters is the determined according to the filter_paths_expr parameter.

Parameters

dt (float) – time step multiplier to convert the underlying impulses to forces. If the default value is used then the forces are in fact contact impulses

Returns

Net contact forces of the prims with shape (self._geometry_prim_view._contact_view.num_filters, 3).

Return type

Union[np.ndarray, torch.Tensor]

get_contact_offset() float
Returns

contact offset of the collision shape.

Return type

float

get_default_state() omni.isaac.core.utils.types.XFormPrimState
Returns

returns the default state of the prim (position and orientation) that is used after each reset.

Return type

XFormPrimState

get_height() float

[summary]

Returns

[description]

Return type

float

get_local_pose() Tuple[numpy.ndarray, numpy.ndarray]

Gets prim’s pose with respect to the local frame (the prim’s parent frame).

Returns

first index is position in the local frame of the prim. shape is (3, ).

second index is quaternion orientation in the local frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ).

Return type

Tuple[np.ndarray, np.ndarray]

get_local_scale() numpy.ndarray

Gets prim’s scale with respect to the local frame (the parent’s frame).

Returns

scale applied to the prim’s dimensions in the local frame. shape is (3, ).

Return type

np.ndarray

get_min_torsional_patch_radius() float
Returns

minimum radius of the contact patch used to apply torsional friction. Allowed range [0, max_float].

Return type

float

get_net_contact_forces(dt: float = 1.0) Union[numpy.ndarray, torch.Tensor]

If contact forces of the prims in the view are tracked, this method returns the net contact forces on prims. i.e., a matrix of dimension (1, 3)

Parameters

dt (float) – time step multiplier to convert the underlying impulses to forces. If the default value is used then the forces are in fact contact impulses

Returns

Net contact forces of the prims with shape (3).

Return type

Union[np.ndarray, torch.Tensor]

get_radius() float

[summary]

Returns

[description]

Return type

float

get_rest_offset() float
Returns

rest offset of the collision shape.

Return type

float

get_torsional_patch_radius() float
Returns

radius of the contact patch used to apply torsional friction. Allowed range [0, max_float].

Return type

float

get_visibility() bool
Returns

true if the prim is visible in stage. false otherwise.

Return type

bool

get_world_pose() Tuple[numpy.ndarray, numpy.ndarray]

Gets prim’s pose with respect to the world’s frame.

Returns

first index is position in the world frame of the prim. shape is (3, ).

second index is quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ).

Return type

Tuple[np.ndarray, np.ndarray]

get_world_scale() numpy.ndarray

Gets prim’s scale with respect to the world’s frame.

Returns

scale applied to the prim’s dimensions in the world frame. shape is (3, ).

Return type

np.ndarray

initialize(physics_sim_view=None) None
is_valid() bool
Returns

True is the current prim path corresponds to a valid prim in stage. False otherwise.

Return type

bool

is_visual_material_applied() bool
Returns

True if there is a visual material applied. False otherwise.

Return type

bool

property name: Optional[str]

Returns: str: name given to the prim when instantiating it. Otherwise None.

_summary_

Returns

_description_

Return type

bool

post_reset() None

Resets the prim to its default state (position and orientation).

property prim: pxr.Usd.Prim

Returns: Usd.Prim: USD Prim object that this object holds.

property prim_path: str

Returns: str: prim path in the stage.

set_collision_approximation(approximation_type: str) None
Parameters

approximation_type (str) – approximation used for collision, could be “none”, “convexHull” or “convexDecomposition”

set_collision_enabled(enabled: bool) None

Args:

set_contact_offset(offset: float) None
Parameters

offset (float) – Contact offset of a collision shape. Allowed range [maximum(0, rest_offset), 0]. Default value is -inf, means default is picked by simulation based on the shape extent.

set_default_state(position: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None) None

Sets the default state of the prim (position and orientation), that will be used after each reset.

Parameters
  • position (Optional[Sequence[float]], optional) – position in the world frame of the prim. shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[Sequence[float]], optional) – quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

set_height(height: float) None

[summary]

Parameters

height (float) – [description]

set_local_pose(translation: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None) None

Sets prim’s pose with respect to the local frame (the prim’s parent frame).

Parameters
  • translation (Optional[Sequence[float]], optional) – translation in the local frame of the prim (with respect to its parent prim). shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[Sequence[float]], optional) – quaternion orientation in the local frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

set_local_scale(scale: Optional[Sequence[float]]) None

Sets prim’s scale with respect to the local frame (the prim’s parent frame).

Parameters

scale (Optional[Sequence[float]]) – scale to be applied to the prim’s dimensions. shape is (3, ). Defaults to None, which means left unchanged.

set_min_torsional_patch_radius(radius: float) None
Parameters

radius (float) – minimum radius of the contact patch used to apply torsional friction. Allowed range [0, max_float].

set_radius(radius: float) None

[summary]

Parameters

radius (float) – [description]

set_rest_offset(offset: float) None
Parameters

offset (float) – Rest offset of a collision shape. Allowed range [-max_float, contact_offset. Default value is -inf, means default is picked by simulatiion. For rigid bodies its zero.

set_torsional_patch_radius(radius: float) None
Parameters

radius (float) – radius of the contact patch used to apply torsional friction. Allowed range [0, max_float].

set_visibility(visible: bool) None

Sets the visibility of the prim in stage.

Parameters

visible (bool) – flag to set the visibility of the usd prim in stage.

set_world_pose(position: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None) None

Sets prim’s pose with respect to the world’s frame.

Parameters
  • position (Optional[Sequence[float]], optional) – position in the world frame of the prim. shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[Sequence[float]], optional) – quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

Dynamic Capsule

class DynamicCapsule(prim_path: str, name: str = 'dynamic_capsule', position: Optional[numpy.ndarray] = None, translation: Optional[numpy.ndarray] = None, orientation: Optional[numpy.ndarray] = None, scale: Optional[numpy.ndarray] = None, visible: Optional[bool] = None, color: Optional[numpy.ndarray] = None, radius: Optional[numpy.ndarray] = None, height: Optional[numpy.ndarray] = None, visual_material: Optional[omni.isaac.core.materials.visual_material.VisualMaterial] = None, physics_material: Optional[omni.isaac.core.materials.physics_material.PhysicsMaterial] = None, mass: Optional[float] = None, density: Optional[float] = None, linear_velocity: Optional[Sequence[float]] = None, angular_velocity: Optional[Sequence[float]] = None)

_summary_

Parameters
  • prim_path (str) – _description_

  • name (str, optional) – _description_. Defaults to “dynamic_capsule”.

  • position (Optional[np.ndarray], optional) – _description_. Defaults to None.

  • translation (Optional[np.ndarray], optional) – _description_. Defaults to None.

  • orientation (Optional[np.ndarray], optional) – _description_. Defaults to None.

  • scale (Optional[np.ndarray], optional) – _description_. Defaults to None.

  • visible (Optional[bool], optional) – _description_. Defaults to None.

  • color (Optional[np.ndarray], optional) – _description_. Defaults to None.

  • radius (Optional[np.ndarray], optional) – _description_. Defaults to None.

  • height (Optional[np.ndarray], optional) – _description_. Defaults to None.

  • visual_material (Optional[VisualMaterial], optional) – _description_. Defaults to None.

  • physics_material (Optional[PhysicsMaterial], optional) – _description_. Defaults to None.

  • mass (Optional[float], optional) – _description_. Defaults to None.

  • density (Optional[float], optional) – _description_. Defaults to None.

  • linear_velocity (Optional[Sequence[float]], optional) – _description_. Defaults to None.

  • angular_velocity (Optional[Sequence[float]], optional) – _description_. Defaults to None.

apply_physics_material(physics_material: omni.isaac.core.materials.physics_material.PhysicsMaterial, weaker_than_descendants: bool = False)

Used to apply physics material to the held prim and optionally its descendants.

Parameters
  • physics_material (PhysicsMaterial) – physics material to be applied to the held prim. This where you want to define friction, restitution..etc. Note: if a physics material is not defined, the defaults will be used from PhysX.

  • weaker_than_descendants (bool, optional) – True if the material shouldn’t override the descendants materials, otherwise False. Defaults to False.

apply_visual_material(visual_material: omni.isaac.core.materials.visual_material.VisualMaterial, weaker_than_descendants: bool = False) None

Used to apply visual material to the held prim and optionally its descendants.

Parameters
  • visual_material (VisualMaterial) – visual material to be applied to the held prim. Currently supports PreviewSurface, OmniPBR and OmniGlass.

  • weaker_than_descendants (bool, optional) – True if the material shouldn’t override the descendants materials, otherwise False. Defaults to False.

disable_rigid_body_physics() None

disable rigid body physics (enabled by default): Object will not be moved by external forces such as gravity and collisions

enable_rigid_body_physics() None

enable rigid body physics (enabled by default): Object will be moved by external forces such as gravity and collisions

property geom: pxr.UsdGeom.Gprim

Returns: UsdGeom.Gprim: USD geometry object encapsulated.

get_angular_velocity()
Returns

current angular velocity of the the rigid prim. Shape (3,).

Return type

np.ndarray

get_applied_physics_material() omni.isaac.core.materials.physics_material.PhysicsMaterial

Returns the current applied physics material in case it was applied using apply_physics_material or not.

Returns

the current applied physics material.

Return type

PhysicsMaterial

get_applied_visual_material() omni.isaac.core.materials.visual_material.VisualMaterial
Returns the current applied visual material in case it was applied using apply_visual_material OR

it’s one of the following materials that was already applied before: PreviewSurface, OmniPBR and OmniGlass.

Returns

the current applied visual material if its type is currently supported.

Return type

VisualMaterial

get_collision_approximation() str
Returns

approximation used for collision, could be “none”, “convexHull” or “convexDecomposition”

Return type

str

get_collision_enabled() bool

Returns:

get_contact_force_matrix(dt: float = 1.0) Union[numpy.ndarray, torch.Tensor]

If the object is initialized with filter_paths_expr list, this method returns the contact forces between the prims in the view and the filter prims. i.e., a matrix of dimension (self._contact_view.num_filters, 3) where num_filters is the determined according to the filter_paths_expr parameter.

Parameters

dt (float) – time step multiplier to convert the underlying impulses to forces. If the default value is used then the forces are in fact contact impulses

Returns

Net contact forces of the prims with shape (self._geometry_prim_view._contact_view.num_filters, 3).

Return type

Union[np.ndarray, torch.Tensor]

get_contact_offset() float
Returns

contact offset of the collision shape.

Return type

float

get_current_dynamic_state() omni.isaac.core.utils.types.DynamicState
Returns

the dynamic state of the rigid body including position, orientation, linear_velocity and angular_velocity.

Return type

DynamicState

get_default_state() omni.isaac.core.utils.types.DynamicState
Returns

returns the default state of the prim (position, orientation, linear_velocity and

angular_velocity) that is used after each reset.

Return type

DynamicState

get_density() float
Returns

density of the rigid body.

Return type

float

get_height() float

[summary]

Returns

[description]

Return type

float

get_linear_velocity() numpy.ndarray
Returns

current linear velocity of the the rigid prim. Shape (3,).

Return type

np.ndarray

get_local_pose() Tuple[numpy.ndarray, numpy.ndarray]

Gets prim’s pose with respect to the local frame (the prim’s parent frame).

Returns

first index is position in the local frame of the prim. shape is (3, ).

second index is quaternion orientation in the local frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ).

Return type

Tuple[np.ndarray, np.ndarray]

get_local_scale() numpy.ndarray

Gets prim’s scale with respect to the local frame (the parent’s frame).

Returns

scale applied to the prim’s dimensions in the local frame. shape is (3, ).

Return type

np.ndarray

get_mass() float
Returns

mass of the rigid body in kg.

Return type

float

get_min_torsional_patch_radius() float
Returns

minimum radius of the contact patch used to apply torsional friction. Allowed range [0, max_float].

Return type

float

get_net_contact_forces(dt: float = 1.0) Union[numpy.ndarray, torch.Tensor]

If contact forces of the prims in the view are tracked, this method returns the net contact forces on prims. i.e., a matrix of dimension (1, 3)

Parameters

dt (float) – time step multiplier to convert the underlying impulses to forces. If the default value is used then the forces are in fact contact impulses

Returns

Net contact forces of the prims with shape (3).

Return type

Union[np.ndarray, torch.Tensor]

get_radius() float

[summary]

Returns

[description]

Return type

float

get_rest_offset() float
Returns

rest offset of the collision shape.

Return type

float

get_sleep_threshold() float
Returns

Mass-normalized kinetic energy threshold below which

an actor may go to sleep. Range: [0, inf) Defaults: 0.00005 * tolerancesSpeed* tolerancesSpeed Units: distance^2 / second^2.

Return type

float

get_torsional_patch_radius() float
Returns

radius of the contact patch used to apply torsional friction. Allowed range [0, max_float].

Return type

float

get_visibility() bool
Returns

true if the prim is visible in stage. false otherwise.

Return type

bool

get_world_pose() Tuple[numpy.ndarray, numpy.ndarray]

Gets prim’s pose with respect to the world’s frame.

Returns

first index is position in the world frame of the prim. shape is (3, ).

second index is quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ).

Return type

Tuple[np.ndarray, np.ndarray]

get_world_scale() numpy.ndarray

Gets prim’s scale with respect to the world’s frame.

Returns

scale applied to the prim’s dimensions in the world frame. shape is (3, ).

Return type

np.ndarray

initialize(physics_sim_view=None) None
is_valid() bool
Returns

True is the current prim path corresponds to a valid prim in stage. False otherwise.

Return type

bool

is_visual_material_applied() bool
Returns

True if there is a visual material applied. False otherwise.

Return type

bool

property name: Optional[str]

Returns: str: name given to the prim when instantiating it. Otherwise None.

_summary_

Returns

_description_

Return type

bool

post_reset() None

Resets the prim to its default state (position and orientation).

property prim: pxr.Usd.Prim

Returns: Usd.Prim: USD Prim object that this object holds.

property prim_path: str

Returns: str: prim path in the stage.

set_angular_velocity(velocity: numpy.ndarray) None

Sets the angular velocity of the prim in stage. :param velocity: angular velocity to set the rigid prim to. Shape (3,). :type velocity: np.ndarray

set_collision_approximation(approximation_type: str) None
Parameters

approximation_type (str) – approximation used for collision, could be “none”, “convexHull” or “convexDecomposition”

set_collision_enabled(enabled: bool) None

Args:

set_contact_offset(offset: float) None
Parameters

offset (float) – Contact offset of a collision shape. Allowed range [maximum(0, rest_offset), 0]. Default value is -inf, means default is picked by simulation based on the shape extent.

set_default_state(position: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None, linear_velocity: Optional[numpy.ndarray] = None, angular_velocity: Optional[numpy.ndarray] = None) None

Sets the default state of the prim, that will be used after each reset.

Parameters
  • position (Optional[Sequence[float]], optional) – position in the world frame of the prim. shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[Sequence[float]], optional) – quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

  • linear_velocity (np.ndarray) – linear velocity to set the rigid prim to. Shape (3,).

  • angular_velocity (np.ndarray) – angular velocity to set the rigid prim to. Shape (3,).

set_density(density: float) None
Parameters

mass (float) – density of the rigid body.

set_height(height: float) None

[summary]

Parameters

height (float) – [description]

set_linear_velocity(velocity: numpy.ndarray)

Sets the linear velocity of the prim in stage. :param velocity: linear velocity to set the rigid prim to. Shape (3,). :type velocity: np.ndarray

set_local_pose(translation: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None) None

Sets prim’s pose with respect to the local frame (the prim’s parent frame).

Parameters
  • translation (Optional[Sequence[float]], optional) – translation in the local frame of the prim (with respect to its parent prim). shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[Sequence[float]], optional) – quaternion orientation in the local frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

set_local_scale(scale: Optional[Sequence[float]]) None

Sets prim’s scale with respect to the local frame (the prim’s parent frame).

Parameters

scale (Optional[Sequence[float]]) – scale to be applied to the prim’s dimensions. shape is (3, ). Defaults to None, which means left unchanged.

set_mass(mass: float) None
Parameters

mass (float) – mass of the rigid body in kg.

set_min_torsional_patch_radius(radius: float) None
Parameters

radius (float) – minimum radius of the contact patch used to apply torsional friction. Allowed range [0, max_float].

set_radius(radius: float) None

[summary]

Parameters

radius (float) – [description]

set_rest_offset(offset: float) None
Parameters

offset (float) – Rest offset of a collision shape. Allowed range [-max_float, contact_offset. Default value is -inf, means default is picked by simulatiion. For rigid bodies its zero.

set_sleep_threshold(threshold: float) None
Parameters

threshold (float) – Mass-normalized kinetic energy threshold below which an actor may go to sleep. Range: [0, inf) Defaults: 0.00005 * tolerancesSpeed* tolerancesSpeed Units: distance^2 / second^2.

set_torsional_patch_radius(radius: float) None
Parameters

radius (float) – radius of the contact patch used to apply torsional friction. Allowed range [0, max_float].

set_visibility(visible: bool) None

Sets the visibility of the prim in stage.

Parameters

visible (bool) – flag to set the visibility of the usd prim in stage.

set_world_pose(position: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None) None

Sets prim’s pose with respect to the world’s frame.

Parameters
  • position (Optional[Sequence[float]], optional) – position in the world frame of the prim. shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[Sequence[float]], optional) – quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

Fixed Cone

class FixedCone(prim_path: str, name: str = 'fixed_cone', position: Optional[numpy.ndarray] = None, translation: Optional[numpy.ndarray] = None, orientation: Optional[numpy.ndarray] = None, scale: Optional[numpy.ndarray] = None, visible: Optional[bool] = None, color: Optional[numpy.ndarray] = None, radius: Optional[numpy.ndarray] = None, height: Optional[float] = None, visual_material: Optional[omni.isaac.core.materials.visual_material.VisualMaterial] = None, physics_material: Optional[omni.isaac.core.materials.physics_material.PhysicsMaterial] = None)

_summary_

Parameters
  • prim_path (str) – _description_

  • name (str, optional) – _description_. Defaults to “fixed_cone”.

  • position (Optional[np.ndarray], optional) – _description_. Defaults to None.

  • translation (Optional[np.ndarray], optional) – _description_. Defaults to None.

  • orientation (Optional[np.ndarray], optional) – _description_. Defaults to None.

  • scale (Optional[np.ndarray], optional) – _description_. Defaults to None.

  • visible (Optional[bool], optional) – _description_. Defaults to None.

  • color (Optional[np.ndarray], optional) – _description_. Defaults to None.

  • radius (Optional[np.ndarray], optional) – _description_. Defaults to None.

  • height (Optional[float], optional) – _description_. Defaults to None.

  • visual_material (Optional[VisualMaterial], optional) – _description_. Defaults to None.

  • physics_material (Optional[PhysicsMaterial], optional) – _description_. Defaults to None.

apply_physics_material(physics_material: omni.isaac.core.materials.physics_material.PhysicsMaterial, weaker_than_descendants: bool = False)

Used to apply physics material to the held prim and optionally its descendants.

Parameters
  • physics_material (PhysicsMaterial) – physics material to be applied to the held prim. This where you want to define friction, restitution..etc. Note: if a physics material is not defined, the defaults will be used from PhysX.

  • weaker_than_descendants (bool, optional) – True if the material shouldn’t override the descendants materials, otherwise False. Defaults to False.

apply_visual_material(visual_material: omni.isaac.core.materials.visual_material.VisualMaterial, weaker_than_descendants: bool = False) None

Used to apply visual material to the held prim and optionally its descendants.

Parameters
  • visual_material (VisualMaterial) – visual material to be applied to the held prim. Currently supports PreviewSurface, OmniPBR and OmniGlass.

  • weaker_than_descendants (bool, optional) – True if the material shouldn’t override the descendants materials, otherwise False. Defaults to False.

property geom: pxr.UsdGeom.Gprim

Returns: UsdGeom.Gprim: USD geometry object encapsulated.

get_applied_physics_material() omni.isaac.core.materials.physics_material.PhysicsMaterial

Returns the current applied physics material in case it was applied using apply_physics_material or not.

Returns

the current applied physics material.

Return type

PhysicsMaterial

get_applied_visual_material() omni.isaac.core.materials.visual_material.VisualMaterial
Returns the current applied visual material in case it was applied using apply_visual_material OR

it’s one of the following materials that was already applied before: PreviewSurface, OmniPBR and OmniGlass.

Returns

the current applied visual material if its type is currently supported.

Return type

VisualMaterial

get_collision_approximation() str
Returns

approximation used for collision, could be “none”, “convexHull” or “convexDecomposition”

Return type

str

get_collision_enabled() bool

Returns:

get_contact_force_matrix(dt: float = 1.0) Union[numpy.ndarray, torch.Tensor]

If the object is initialized with filter_paths_expr list, this method returns the contact forces between the prims in the view and the filter prims. i.e., a matrix of dimension (self._contact_view.num_filters, 3) where num_filters is the determined according to the filter_paths_expr parameter.

Parameters

dt (float) – time step multiplier to convert the underlying impulses to forces. If the default value is used then the forces are in fact contact impulses

Returns

Net contact forces of the prims with shape (self._geometry_prim_view._contact_view.num_filters, 3).

Return type

Union[np.ndarray, torch.Tensor]

get_contact_offset() float
Returns

contact offset of the collision shape.

Return type

float

get_default_state() omni.isaac.core.utils.types.XFormPrimState
Returns

returns the default state of the prim (position and orientation) that is used after each reset.

Return type

XFormPrimState

get_height() float

[summary]

Returns

[description]

Return type

float

get_local_pose() Tuple[numpy.ndarray, numpy.ndarray]

Gets prim’s pose with respect to the local frame (the prim’s parent frame).

Returns

first index is position in the local frame of the prim. shape is (3, ).

second index is quaternion orientation in the local frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ).

Return type

Tuple[np.ndarray, np.ndarray]

get_local_scale() numpy.ndarray

Gets prim’s scale with respect to the local frame (the parent’s frame).

Returns

scale applied to the prim’s dimensions in the local frame. shape is (3, ).

Return type

np.ndarray

get_min_torsional_patch_radius() float
Returns

minimum radius of the contact patch used to apply torsional friction. Allowed range [0, max_float].

Return type

float

get_net_contact_forces(dt: float = 1.0) Union[numpy.ndarray, torch.Tensor]

If contact forces of the prims in the view are tracked, this method returns the net contact forces on prims. i.e., a matrix of dimension (1, 3)

Parameters

dt (float) – time step multiplier to convert the underlying impulses to forces. If the default value is used then the forces are in fact contact impulses

Returns

Net contact forces of the prims with shape (3).

Return type

Union[np.ndarray, torch.Tensor]

get_radius() float

[summary]

Returns

[description]

Return type

float

get_rest_offset() float
Returns

rest offset of the collision shape.

Return type

float

get_torsional_patch_radius() float
Returns

radius of the contact patch used to apply torsional friction. Allowed range [0, max_float].

Return type

float

get_visibility() bool
Returns

true if the prim is visible in stage. false otherwise.

Return type

bool

get_world_pose() Tuple[numpy.ndarray, numpy.ndarray]

Gets prim’s pose with respect to the world’s frame.

Returns

first index is position in the world frame of the prim. shape is (3, ).

second index is quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ).

Return type

Tuple[np.ndarray, np.ndarray]

get_world_scale() numpy.ndarray

Gets prim’s scale with respect to the world’s frame.

Returns

scale applied to the prim’s dimensions in the world frame. shape is (3, ).

Return type

np.ndarray

initialize(physics_sim_view=None) None
is_valid() bool
Returns

True is the current prim path corresponds to a valid prim in stage. False otherwise.

Return type

bool

is_visual_material_applied() bool
Returns

True if there is a visual material applied. False otherwise.

Return type

bool

property name: Optional[str]

Returns: str: name given to the prim when instantiating it. Otherwise None.

_summary_

Returns

_description_

Return type

bool

post_reset() None

Resets the prim to its default state (position and orientation).

property prim: pxr.Usd.Prim

Returns: Usd.Prim: USD Prim object that this object holds.

property prim_path: str

Returns: str: prim path in the stage.

set_collision_approximation(approximation_type: str) None
Parameters

approximation_type (str) – approximation used for collision, could be “none”, “convexHull” or “convexDecomposition”

set_collision_enabled(enabled: bool) None

Args:

set_contact_offset(offset: float) None
Parameters

offset (float) – Contact offset of a collision shape. Allowed range [maximum(0, rest_offset), 0]. Default value is -inf, means default is picked by simulation based on the shape extent.

set_default_state(position: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None) None

Sets the default state of the prim (position and orientation), that will be used after each reset.

Parameters
  • position (Optional[Sequence[float]], optional) – position in the world frame of the prim. shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[Sequence[float]], optional) – quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

set_height(height: float) None

[summary]

Parameters

height (float) – [description]

set_local_pose(translation: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None) None

Sets prim’s pose with respect to the local frame (the prim’s parent frame).

Parameters
  • translation (Optional[Sequence[float]], optional) – translation in the local frame of the prim (with respect to its parent prim). shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[Sequence[float]], optional) – quaternion orientation in the local frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

set_local_scale(scale: Optional[Sequence[float]]) None

Sets prim’s scale with respect to the local frame (the prim’s parent frame).

Parameters

scale (Optional[Sequence[float]]) – scale to be applied to the prim’s dimensions. shape is (3, ). Defaults to None, which means left unchanged.

set_min_torsional_patch_radius(radius: float) None
Parameters

radius (float) – minimum radius of the contact patch used to apply torsional friction. Allowed range [0, max_float].

set_radius(radius: float) None

[summary]

Parameters

radius (float) – [description]

set_rest_offset(offset: float) None
Parameters

offset (float) – Rest offset of a collision shape. Allowed range [-max_float, contact_offset. Default value is -inf, means default is picked by simulatiion. For rigid bodies its zero.

set_torsional_patch_radius(radius: float) None
Parameters

radius (float) – radius of the contact patch used to apply torsional friction. Allowed range [0, max_float].

set_visibility(visible: bool) None

Sets the visibility of the prim in stage.

Parameters

visible (bool) – flag to set the visibility of the usd prim in stage.

set_world_pose(position: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None) None

Sets prim’s pose with respect to the world’s frame.

Parameters
  • position (Optional[Sequence[float]], optional) – position in the world frame of the prim. shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[Sequence[float]], optional) – quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

Visual Cone

class VisualCone(prim_path: str, name: str = 'visual_cone', position: Optional[Sequence[float]] = None, translation: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None, scale: Optional[Sequence[float]] = None, visible: Optional[bool] = None, color: Optional[numpy.ndarray] = None, radius: Optional[float] = None, height: Optional[float] = None, visual_material: Optional[omni.isaac.core.materials.visual_material.VisualMaterial] = None)

_summary_

Parameters
  • prim_path (str) – _description_

  • name (str, optional) – _description_. Defaults to “visual_cone”.

  • position (Optional[Sequence[float]], optional) – _description_. Defaults to None.

  • translation (Optional[Sequence[float]], optional) – _description_. Defaults to None.

  • orientation (Optional[Sequence[float]], optional) – _description_. Defaults to None.

  • scale (Optional[Sequence[float]], optional) – _description_. Defaults to None.

  • visible (Optional[bool], optional) – _description_. Defaults to None.

  • color (Optional[np.ndarray], optional) – _description_. Defaults to None.

  • radius (Optional[float], optional) – _description_. Defaults to None.

  • height (Optional[float], optional) – _description_. Defaults to None.

  • visual_material (Optional[VisualMaterial], optional) – _description_. Defaults to None.

Raises

Exception – _description_

apply_physics_material(physics_material: omni.isaac.core.materials.physics_material.PhysicsMaterial, weaker_than_descendants: bool = False)

Used to apply physics material to the held prim and optionally its descendants.

Parameters
  • physics_material (PhysicsMaterial) – physics material to be applied to the held prim. This where you want to define friction, restitution..etc. Note: if a physics material is not defined, the defaults will be used from PhysX.

  • weaker_than_descendants (bool, optional) – True if the material shouldn’t override the descendants materials, otherwise False. Defaults to False.

apply_visual_material(visual_material: omni.isaac.core.materials.visual_material.VisualMaterial, weaker_than_descendants: bool = False) None

Used to apply visual material to the held prim and optionally its descendants.

Parameters
  • visual_material (VisualMaterial) – visual material to be applied to the held prim. Currently supports PreviewSurface, OmniPBR and OmniGlass.

  • weaker_than_descendants (bool, optional) – True if the material shouldn’t override the descendants materials, otherwise False. Defaults to False.

property geom: pxr.UsdGeom.Gprim

Returns: UsdGeom.Gprim: USD geometry object encapsulated.

get_applied_physics_material() omni.isaac.core.materials.physics_material.PhysicsMaterial

Returns the current applied physics material in case it was applied using apply_physics_material or not.

Returns

the current applied physics material.

Return type

PhysicsMaterial

get_applied_visual_material() omni.isaac.core.materials.visual_material.VisualMaterial
Returns the current applied visual material in case it was applied using apply_visual_material OR

it’s one of the following materials that was already applied before: PreviewSurface, OmniPBR and OmniGlass.

Returns

the current applied visual material if its type is currently supported.

Return type

VisualMaterial

get_collision_approximation() str
Returns

approximation used for collision, could be “none”, “convexHull” or “convexDecomposition”

Return type

str

get_collision_enabled() bool

Returns:

get_contact_force_matrix(dt: float = 1.0) Union[numpy.ndarray, torch.Tensor]

If the object is initialized with filter_paths_expr list, this method returns the contact forces between the prims in the view and the filter prims. i.e., a matrix of dimension (self._contact_view.num_filters, 3) where num_filters is the determined according to the filter_paths_expr parameter.

Parameters

dt (float) – time step multiplier to convert the underlying impulses to forces. If the default value is used then the forces are in fact contact impulses

Returns

Net contact forces of the prims with shape (self._geometry_prim_view._contact_view.num_filters, 3).

Return type

Union[np.ndarray, torch.Tensor]

get_contact_offset() float
Returns

contact offset of the collision shape.

Return type

float

get_default_state() omni.isaac.core.utils.types.XFormPrimState
Returns

returns the default state of the prim (position and orientation) that is used after each reset.

Return type

XFormPrimState

get_height() float

[summary]

Returns

[description]

Return type

float

get_local_pose() Tuple[numpy.ndarray, numpy.ndarray]

Gets prim’s pose with respect to the local frame (the prim’s parent frame).

Returns

first index is position in the local frame of the prim. shape is (3, ).

second index is quaternion orientation in the local frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ).

Return type

Tuple[np.ndarray, np.ndarray]

get_local_scale() numpy.ndarray

Gets prim’s scale with respect to the local frame (the parent’s frame).

Returns

scale applied to the prim’s dimensions in the local frame. shape is (3, ).

Return type

np.ndarray

get_min_torsional_patch_radius() float
Returns

minimum radius of the contact patch used to apply torsional friction. Allowed range [0, max_float].

Return type

float

get_net_contact_forces(dt: float = 1.0) Union[numpy.ndarray, torch.Tensor]

If contact forces of the prims in the view are tracked, this method returns the net contact forces on prims. i.e., a matrix of dimension (1, 3)

Parameters

dt (float) – time step multiplier to convert the underlying impulses to forces. If the default value is used then the forces are in fact contact impulses

Returns

Net contact forces of the prims with shape (3).

Return type

Union[np.ndarray, torch.Tensor]

get_radius() float

[summary]

Returns

[description]

Return type

float

get_rest_offset() float
Returns

rest offset of the collision shape.

Return type

float

get_torsional_patch_radius() float
Returns

radius of the contact patch used to apply torsional friction. Allowed range [0, max_float].

Return type

float

get_visibility() bool
Returns

true if the prim is visible in stage. false otherwise.

Return type

bool

get_world_pose() Tuple[numpy.ndarray, numpy.ndarray]

Gets prim’s pose with respect to the world’s frame.

Returns

first index is position in the world frame of the prim. shape is (3, ).

second index is quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ).

Return type

Tuple[np.ndarray, np.ndarray]

get_world_scale() numpy.ndarray

Gets prim’s scale with respect to the world’s frame.

Returns

scale applied to the prim’s dimensions in the world frame. shape is (3, ).

Return type

np.ndarray

initialize(physics_sim_view=None) None
is_valid() bool
Returns

True is the current prim path corresponds to a valid prim in stage. False otherwise.

Return type

bool

is_visual_material_applied() bool
Returns

True if there is a visual material applied. False otherwise.

Return type

bool

property name: Optional[str]

Returns: str: name given to the prim when instantiating it. Otherwise None.

_summary_

Returns

_description_

Return type

bool

post_reset() None

Resets the prim to its default state (position and orientation).

property prim: pxr.Usd.Prim

Returns: Usd.Prim: USD Prim object that this object holds.

property prim_path: str

Returns: str: prim path in the stage.

set_collision_approximation(approximation_type: str) None
Parameters

approximation_type (str) – approximation used for collision, could be “none”, “convexHull” or “convexDecomposition”

set_collision_enabled(enabled: bool) None

Args:

set_contact_offset(offset: float) None
Parameters

offset (float) – Contact offset of a collision shape. Allowed range [maximum(0, rest_offset), 0]. Default value is -inf, means default is picked by simulation based on the shape extent.

set_default_state(position: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None) None

Sets the default state of the prim (position and orientation), that will be used after each reset.

Parameters
  • position (Optional[Sequence[float]], optional) – position in the world frame of the prim. shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[Sequence[float]], optional) – quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

set_height(height: float) None

[summary]

Parameters

height (float) – [description]

set_local_pose(translation: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None) None

Sets prim’s pose with respect to the local frame (the prim’s parent frame).

Parameters
  • translation (Optional[Sequence[float]], optional) – translation in the local frame of the prim (with respect to its parent prim). shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[Sequence[float]], optional) – quaternion orientation in the local frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

set_local_scale(scale: Optional[Sequence[float]]) None

Sets prim’s scale with respect to the local frame (the prim’s parent frame).

Parameters

scale (Optional[Sequence[float]]) – scale to be applied to the prim’s dimensions. shape is (3, ). Defaults to None, which means left unchanged.

set_min_torsional_patch_radius(radius: float) None
Parameters

radius (float) – minimum radius of the contact patch used to apply torsional friction. Allowed range [0, max_float].

set_radius(radius: float) None

[summary]

Parameters

radius (float) – [description]

set_rest_offset(offset: float) None
Parameters

offset (float) – Rest offset of a collision shape. Allowed range [-max_float, contact_offset. Default value is -inf, means default is picked by simulatiion. For rigid bodies its zero.

set_torsional_patch_radius(radius: float) None
Parameters

radius (float) – radius of the contact patch used to apply torsional friction. Allowed range [0, max_float].

set_visibility(visible: bool) None

Sets the visibility of the prim in stage.

Parameters

visible (bool) – flag to set the visibility of the usd prim in stage.

set_world_pose(position: Optional[Sequence[float]] = None, orientation: Optional[Sequence[float]] = None) None

Sets prim’s pose with respect to the world’s frame.

Parameters
  • position (Optional[Sequence[float]], optional) – position in the world frame of the prim. shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[Sequence[float]], optional) – quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

Dynamic Cone

class DynamicCone(prim_path: str, name: str = 'dynamic_cone', position: Optional[numpy.ndarray] = None, translation: Optional[numpy.ndarray] = None, orientation: Optional[numpy.ndarray] = None, scale: Optional[numpy.ndarray] = None, visible: Optional[bool] = None, color: Optional[numpy.ndarray] = None, radius: Optional[numpy.ndarray] = None, height: Optional[numpy.ndarray] = None, visual_material: Optional[omni.isaac.core.materials.visual_material.VisualMaterial] = None, physics_material: Optional[omni.isaac.core.materials.physics_material.PhysicsMaterial] = None, mass: Optional[float] = None, density: Optional[float] = None, linear_velocity: Optional[Sequence[float]] = None, angular_velocity: Optional[Sequence[float]] = None)

_summary_

Parameters
  • prim_path (str) – _description_

  • name (str, </