isaaclab.assets

Contents

isaaclab.assets#

Sub-package for different assets, such as rigid objects and articulations.

An asset is a physical object that can be spawned in the simulation. The class handles both the spawning of the asset into the USD stage as well as initialization of necessary physics handles to interact with the asset.

Upon construction of the asset instance, the prim corresponding to the asset is spawned into the USD stage if the spawn configuration is not None. The spawn configuration is defined in the AssetBaseCfg.spawn attribute. In case the configured AssetBaseCfg.prim_path is an expression, then the prim is spawned at all the matching paths. Otherwise, a single prim is spawned at the configured path. For more information on the spawn configuration, see the isaaclab.sim.spawners module.

The asset class also registers callbacks for the stage play/stop events. These are used to construct the physics handles for the asset as the physics engine is only available when the stage is playing. Additionally, the class registers a callback for debug visualization of the asset. This can be enabled by setting the AssetBaseCfg.debug_vis attribute to True.

The asset class follows the following naming convention for its methods:

  • set_xxx(): These are used to only set the buffers into the data instance. However, they do not write the data into the simulator. The writing of data only happens when the write_data_to_sim() method is called.

  • write_xxx_to_sim(): These are used to set the buffers into the data instance and write the corresponding data into the simulator as well.

  • update(dt): These are used to update the buffers in the data instance. This should be called after a simulation step is performed.

The main reason to separate the set and write operations is to provide flexibility to the user when they need to perform a post-processing operation of the buffers before applying them into the simulator. A common example for this is dealing with explicit actuator models where the specified joint targets are not directly applied to the simulator but are instead used to compute the corresponding actuator torques.

Classes

AssetBase

The base interface class for assets.

AssetBaseCfg

The base configuration class for an asset's parameters.

RigidObject

Factory for creating rigid object instances.

RigidObjectData

Factory for creating rigid object data instances.

RigidObjectCfg

Configuration parameters for a rigid object.

RigidObjectCollection

Factory for creating rigid object collection instances.

RigidObjectCollectionData

Factory for creating rigid object collection data instances.

RigidObjectCollectionCfg

Configuration parameters for a rigid object collection.

Articulation

Factory for creating articulation instances.

ArticulationData

Factory for creating articulation data instances.

ArticulationCfg

Configuration parameters for an articulation.

Asset Base#

class isaaclab.assets.AssetBase[source]#

The base interface class for assets.

An asset corresponds to any physics-enabled object that can be spawned in the simulation. These include rigid objects, articulated objects, deformable objects etc. The core functionality of an asset is to provide a set of buffers that can be used to interact with the simulator. The buffers are updated by the asset class and can be written into the simulator using the their respective write methods. This allows a convenient way to perform post-processing operations on the buffers before writing them into the simulator and obtaining the corresponding simulation results.

The class handles both the spawning of the asset into the USD stage as well as initialization of necessary physics handles to interact with the asset. Upon construction of the asset instance, the prim corresponding to the asset is spawned into the USD stage if the spawn configuration is not None. The spawn configuration is defined in the AssetBaseCfg.spawn attribute. In case the configured AssetBaseCfg.prim_path is an expression, then the prim is spawned at all the matching paths. Otherwise, a single prim is spawned at the configured path. For more information on the spawn configuration, see the isaaclab.sim.spawners module.

Unlike backend-specific interfaces (e.g. Isaac Sim PhysX) where one usually needs to call initialize explicitly, the asset class automatically initializes and invalidates physics handles when the simulation is ready or stopped. This is done by registering callbacks for the physics lifecycle events (PhysicsEvent.PHYSICS_READY, PhysicsEvent.STOP).

Additionally, the class registers a callback for debug visualization of the asset if a debug visualization is implemented in the asset class. This can be enabled by setting the AssetBaseCfg.debug_vis attribute to True. The debug visualization is implemented through the _set_debug_vis_impl() and _debug_vis_callback() methods.

Methods:

__init__(cfg)

Initialize the asset base.

set_visibility(visible[, env_ids])

Set the visibility of the prims corresponding to the asset.

set_debug_vis(debug_vis)

Sets whether to visualize the asset data.

reset([env_ids])

Resets all internal buffers of selected environments.

write_data_to_sim()

Writes data to the simulator.

update(dt)

Update the internal buffers.

assert_shape_and_dtype(tensor, shape, dtype)

Assert the shape and dtype of a tensor or warp array.

assert_shape_and_dtype_mask(tensor, masks, dtype)

Assert the shape of a tensor or warp array against mask dimensions.

Attributes:

is_initialized

Whether the asset is initialized.

num_instances

Number of instances of the asset.

device

Memory device for computation.

data

Data related to the asset.

has_debug_vis_implementation

Whether the asset has a debug visualization implemented.

__init__(cfg: AssetBaseCfg)[source]#

Initialize the asset base.

Parameters:

cfg – The configuration class for the asset.

Raises:

RuntimeError – If no prims found at input prim path or prim path expression.

property is_initialized: bool#

Whether the asset is initialized.

Returns True if the asset is initialized, False otherwise.

abstract property num_instances: int#

Number of instances of the asset.

This is equal to the number of asset instances per environment multiplied by the number of environments.

property device: str#

Memory device for computation.

abstract property data: Any#

Data related to the asset.

property has_debug_vis_implementation: bool#

Whether the asset has a debug visualization implemented.

set_visibility(visible: bool, env_ids: Sequence[int] | None = None)[source]#

Set the visibility of the prims corresponding to the asset.

This operation affects the visibility of the prims corresponding to the asset in the USD stage. It is useful for toggling the visibility of the asset in the simulator. For instance, one can hide the asset when it is not being used to reduce the rendering overhead.

Note

This operation uses the PXR API to set the visibility of the prims. Thus, the operation may have an overhead if the number of prims is large.

Parameters:
  • visible – Whether to make the prims visible or not.

  • env_ids – The indices of the object to set visibility. Defaults to None (all instances).

set_debug_vis(debug_vis: bool) bool[source]#

Sets whether to visualize the asset data.

Parameters:

debug_vis – Whether to visualize the asset data.

Returns:

Whether the debug visualization was successfully set. False if the asset does not support debug visualization.

abstractmethod reset(env_ids: Sequence[int] | None = None)[source]#

Resets all internal buffers of selected environments.

Parameters:

env_ids – The indices of the object to reset. Defaults to None (all instances).

abstractmethod write_data_to_sim()[source]#

Writes data to the simulator.

abstractmethod update(dt: float)[source]#

Update the internal buffers.

The time step dt is used to compute numerical derivatives of quantities such as joint accelerations which are not provided by the simulator.

Parameters:

dt – The amount of time passed from last update call.

assert_shape_and_dtype(tensor: float | torch.Tensor | wp.array, shape: tuple[int, ...], dtype: type, name: str = '') None[source]#

Assert the shape and dtype of a tensor or warp array.

Parameters:
  • tensor – The tensor or warp array to assert the shape of. Floats are skipped.

  • shape – The expected leading dimensions (e.g. (num_envs, num_joints)).

  • dtype – The expected warp dtype.

  • name – Optional parameter name for error messages.

assert_shape_and_dtype_mask(tensor: float | torch.Tensor | wp.array, masks: tuple[wp.array, ...], dtype: type, name: str = '', trailing_dims: tuple[int, ...] = ()) None[source]#

Assert the shape of a tensor or warp array against mask dimensions.

Mask-based write methods expect full-sized data — one element per entry in each mask dimension, regardless of how many entries are True. The expected leading shape is therefore (mask_0.shape[0], mask_1.shape[0], ...) (i.e. the total size of each dimension, not the number of selected entries).

Parameters:
  • tensor – The tensor or warp array to assert the shape of. Floats are skipped.

  • masks – Tuple of mask arrays whose shape[0] dimensions form the expected leading shape.

  • dtype – The expected warp dtype.

  • name – Optional parameter name for error messages.

  • trailing_dims – Extra trailing dimensions to append (e.g. (9,) for inertias with wp.float32).

class isaaclab.assets.AssetBaseCfg[source]#

The base configuration class for an asset’s parameters.

Please see the AssetBase class for more information on the asset class.

Attributes:

prim_path

Prim path (or expression) to the asset.

spawn

Spawn configuration for the asset.

init_state

Initial state of the rigid object.

collision_group

Collision group of the asset.

debug_vis

Whether to enable debug visualization for the asset.

prim_path: str#

Prim path (or expression) to the asset.

Note

The expression can contain the environment namespace regex {ENV_REGEX_NS} which will be replaced with the environment namespace.

Example: {ENV_REGEX_NS}/Robot will be replaced with /World/envs/env_.*/Robot.

spawn: SpawnerCfg | None#

Spawn configuration for the asset. Defaults to None.

If None, then no prims are spawned by the asset class. Instead, it is assumed that the asset is already present in the scene.

init_state: InitialStateCfg#

Initial state of the rigid object. Defaults to identity pose.

collision_group: Literal[0, -1]#

Collision group of the asset. Defaults to 0.

  • -1: global collision group (collides with all assets in the scene).

  • 0: local collision group (collides with other assets in the same environment).

debug_vis: bool#

Whether to enable debug visualization for the asset. Defaults to False.

Rigid Object#

class isaaclab.assets.RigidObject[source]#

Bases: FactoryBase, BaseRigidObject

Factory for creating rigid object instances.

Attributes:

data

Data related to the asset.

body_names

Ordered names of bodies in the rigid object.

device

Memory device for computation.

has_debug_vis_implementation

Whether the asset has a debug visualization implemented.

instantaneous_wrench_composer

Instantaneous wrench composer.

is_initialized

Whether the asset is initialized.

num_bodies

Number of bodies in the asset.

num_instances

Number of instances of the asset.

permanent_wrench_composer

Permanent wrench composer.

root_view

Root view for the asset.

cfg

Configuration instance for the rigid object.

Methods:

__new__(cls, *args, **kwargs)

Create a new instance of a rigid object based on the backend.

__init__(cfg)

Initialize the rigid object.

assert_shape_and_dtype(tensor, shape, dtype)

Assert the shape and dtype of a tensor or warp array.

assert_shape_and_dtype_mask(tensor, masks, dtype)

Assert the shape of a tensor or warp array against mask dimensions.

find_bodies(name_keys[, preserve_order])

Find bodies in the rigid body based on the name keys.

get_registry_keys()

Returns a list of registered backend names.

register(name, sub_class)

Register a new implementation class.

reset([env_ids, env_mask])

Reset the rigid object.

set_coms(coms[, body_ids, env_ids])

Deprecated, same as set_coms_index().

set_coms_index(*, coms[, body_ids, env_ids])

Set center of mass positions of all bodies.

set_coms_mask(*, coms[, body_mask, env_mask])

Set center of mass positions of all bodies.

set_debug_vis(debug_vis)

Sets whether to visualize the asset data.

set_external_force_and_torque(forces, torques)

Deprecated, same as permanent_wrench_composer.set_forces_and_torques().

set_inertias(inertias[, body_ids, env_ids])

Deprecated, same as set_inertias_index().

set_inertias_index(*, inertias[, body_ids, ...])

Set inertias of all bodies.

set_inertias_mask(*, inertias[, body_mask, ...])

Set inertias of all bodies.

set_masses(masses[, body_ids, env_ids])

Deprecated, same as set_masses_index().

set_masses_index(*, masses[, body_ids, env_ids])

Set masses of all bodies.

set_masses_mask(*, masses[, body_mask, env_mask])

Set masses of all bodies.

set_visibility(visible[, env_ids])

Set the visibility of the prims corresponding to the asset.

update(dt)

Updates the simulation data.

write_data_to_sim()

Write external wrench to the simulation.

write_root_com_pose_to_sim(root_pose[, env_ids])

Deprecated, same as write_root_com_pose_to_sim_index().

write_root_com_pose_to_sim_index(*, root_pose)

Set the root center of mass pose over selected environment indices into the simulation.

write_root_com_pose_to_sim_mask(*, root_pose)

Set the root center of mass pose over selected environment mask into the simulation.

write_root_com_state_to_sim(root_state[, ...])

Deprecated, same as write_root_com_pose_to_sim_index() and write_root_velocity_to_sim_index().

write_root_com_velocity_to_sim(root_velocity)

Deprecated, same as write_root_com_velocity_to_sim_index().

write_root_com_velocity_to_sim_index(*, ...)

Set the root center of mass velocity over selected environment indices into the simulation.

write_root_com_velocity_to_sim_mask(*, ...)

Set the root center of mass velocity over selected environment mask into the simulation.

write_root_link_pose_to_sim(root_pose[, env_ids])

Deprecated, same as write_root_link_pose_to_sim_index().

write_root_link_pose_to_sim_index(*, root_pose)

Set the root link pose over selected environment indices into the simulation.

write_root_link_pose_to_sim_mask(*, root_pose)

Set the root link pose over selected environment mask into the simulation.

write_root_link_state_to_sim(root_state[, ...])

Deprecated, same as write_root_pose_to_sim_index() and write_root_link_velocity_to_sim_index().

write_root_link_velocity_to_sim(root_velocity)

Deprecated, same as write_root_link_velocity_to_sim_index().

write_root_link_velocity_to_sim_index(*, ...)

Set the root link velocity over selected environment indices into the simulation.

write_root_link_velocity_to_sim_mask(*, ...)

Set the root link velocity over selected environment mask into the simulation.

write_root_pose_to_sim(root_pose[, env_ids])

Deprecated, same as write_root_pose_to_sim_index().

write_root_pose_to_sim_index(*, root_pose[, ...])

Set the root pose over selected environment indices into the simulation.

write_root_pose_to_sim_mask(*, root_pose[, ...])

Set the root pose over selected environment mask into the simulation.

write_root_state_to_sim(root_state[, env_ids])

Deprecated, same as write_root_pose_to_sim_index() and write_root_velocity_to_sim_index().

write_root_velocity_to_sim(root_velocity[, ...])

Deprecated, same as write_root_velocity_to_sim_index().

write_root_velocity_to_sim_index(*, ...[, ...])

Set the root center of mass velocity over selected environment indices into the simulation.

write_root_velocity_to_sim_mask(*, root_velocity)

Set the root center of mass velocity over selected environment mask into the simulation.

abstract property data: RigidObjectData#

Data related to the asset.

static __new__(cls, *args, **kwargs) BaseRigidObject | PhysXRigidObject[source]#

Create a new instance of a rigid object based on the backend.

__init__(cfg: RigidObjectCfg)#

Initialize the rigid object.

Parameters:

cfg – A configuration instance.

assert_shape_and_dtype(tensor: float | torch.Tensor | wp.array, shape: tuple[int, ...], dtype: type, name: str = '') None#

Assert the shape and dtype of a tensor or warp array.

Parameters:
  • tensor – The tensor or warp array to assert the shape of. Floats are skipped.

  • shape – The expected leading dimensions (e.g. (num_envs, num_joints)).

  • dtype – The expected warp dtype.

  • name – Optional parameter name for error messages.

assert_shape_and_dtype_mask(tensor: float | torch.Tensor | wp.array, masks: tuple[wp.array, ...], dtype: type, name: str = '', trailing_dims: tuple[int, ...] = ()) None#

Assert the shape of a tensor or warp array against mask dimensions.

Mask-based write methods expect full-sized data — one element per entry in each mask dimension, regardless of how many entries are True. The expected leading shape is therefore (mask_0.shape[0], mask_1.shape[0], ...) (i.e. the total size of each dimension, not the number of selected entries).

Parameters:
  • tensor – The tensor or warp array to assert the shape of. Floats are skipped.

  • masks – Tuple of mask arrays whose shape[0] dimensions form the expected leading shape.

  • dtype – The expected warp dtype.

  • name – Optional parameter name for error messages.

  • trailing_dims – Extra trailing dimensions to append (e.g. (9,) for inertias with wp.float32).

abstract property body_names: list[str]#

Ordered names of bodies in the rigid object.

property device: str#

Memory device for computation.

abstractmethod find_bodies(name_keys: str | Sequence[str], preserve_order: bool = False) tuple[list[int], list[str]]#

Find bodies in the rigid body based on the name keys.

Please check the isaaclab.utils.string_utils.resolve_matching_names() function for more information on the name matching.

Parameters:
  • name_keys – A regular expression or a list of regular expressions to match the body names.

  • preserve_order – Whether to preserve the order of the name keys in the output. Defaults to False.

Returns:

A tuple of lists containing the body indices and names.

classmethod get_registry_keys() list[str]#

Returns a list of registered backend names.

property has_debug_vis_implementation: bool#

Whether the asset has a debug visualization implemented.

abstract property instantaneous_wrench_composer: WrenchComposer#

Instantaneous wrench composer.

Returns a WrenchComposer instance. Wrenches added or set to this wrench composer are only valid for the current simulation step. At the end of the simulation step, the wrenches set to this object are discarded. This is useful to apply forces that change all the time, things like drag forces for instance.

property is_initialized: bool#

Whether the asset is initialized.

Returns True if the asset is initialized, False otherwise.

abstract property num_bodies: int#

Number of bodies in the asset.

This is always 1 since each object is a single rigid body.

abstract property num_instances: int#

Number of instances of the asset.

This is equal to the number of asset instances per environment multiplied by the number of environments.

abstract property permanent_wrench_composer: WrenchComposer#

Permanent wrench composer.

Returns a WrenchComposer instance. Wrenches added or set to this wrench composer are persistent and are applied to the simulation at every step. This is useful to apply forces that are constant over a period of time, things like the thrust of a motor for instance.

classmethod register(name: str, sub_class) None#

Register a new implementation class.

abstractmethod reset(env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_mask: wp.array | None = None) None#

Reset the rigid object.

Caution

If both env_ids and env_mask are provided, then env_mask takes precedence over env_ids.

Parameters:
  • env_ids – Environment indices. If None, then all indices are used.

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

abstract property root_view#

Root view for the asset.

Note

Use this view with caution. It requires handling of tensors in a specific way.

set_coms(coms: torch.Tensor | wp.array, body_ids: Sequence[int] | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_coms_index().

abstractmethod set_coms_index(*, coms: torch.Tensor | wp.array, body_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set center of mass positions of all bodies.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • coms – Center of mass positions of all bodies. Shape is (len(env_ids), len(body_ids), 3).

  • body_ids – The body indices to set the center of mass positions for. Defaults to None (all bodies).

  • env_ids – The environment indices to set the center of mass positions for. Defaults to None (all environments).

abstractmethod set_coms_mask(*, coms: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set center of mass positions of all bodies.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • coms – Center of mass positions of all bodies. Shape is (num_instances, num_bodies, 3) or (num_instances, num_bodies) with dtype wp.vec3f.

  • body_mask – Body mask. If None, then all bodies are used. Shape is (num_bodies,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_debug_vis(debug_vis: bool) bool#

Sets whether to visualize the asset data.

Parameters:

debug_vis – Whether to visualize the asset data.

Returns:

Whether the debug visualization was successfully set. False if the asset does not support debug visualization.

set_external_force_and_torque(forces: torch.Tensor | wp.array, torques: torch.Tensor | wp.array, positions: torch.Tensor | wp.array | None = None, body_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, is_global: bool = False) None#

Deprecated, same as permanent_wrench_composer.set_forces_and_torques().

set_inertias(inertias: torch.Tensor | wp.array, body_ids: Sequence[int] | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_inertias_index().

abstractmethod set_inertias_index(*, inertias: torch.Tensor | wp.array, body_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set inertias of all bodies.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • inertias – Inertias of all bodies. Shape is (len(env_ids), len(body_ids), 9).

  • body_ids – The body indices to set the inertias for. Defaults to None (all bodies).

  • env_ids – The environment indices to set the inertias for. Defaults to None (all environments).

abstractmethod set_inertias_mask(*, inertias: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set inertias of all bodies.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • inertias – Inertias of all bodies. Shape is (num_instances, num_bodies, 9).

  • body_mask – Body mask. If None, then all bodies are used. Shape is (num_bodies,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_masses(masses: torch.Tensor | wp.array, body_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_masses_index().

abstractmethod set_masses_index(*, masses: torch.Tensor | wp.array, body_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set masses of all bodies.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • masses – Masses of all bodies. Shape is (len(env_ids), len(body_ids)).

  • body_ids – The body indices to set the masses for. Defaults to None (all bodies).

  • env_ids – The environment indices to set the masses for. Defaults to None (all environments).

abstractmethod set_masses_mask(*, masses: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set masses of all bodies.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • masses – Masses of all bodies. Shape is (num_instances, num_bodies).

  • body_mask – Body mask. If None, then all bodies are used. Shape is (num_bodies,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_visibility(visible: bool, env_ids: Sequence[int] | None = None)#

Set the visibility of the prims corresponding to the asset.

This operation affects the visibility of the prims corresponding to the asset in the USD stage. It is useful for toggling the visibility of the asset in the simulator. For instance, one can hide the asset when it is not being used to reduce the rendering overhead.

Note

This operation uses the PXR API to set the visibility of the prims. Thus, the operation may have an overhead if the number of prims is large.

Parameters:
  • visible – Whether to make the prims visible or not.

  • env_ids – The indices of the object to set visibility. Defaults to None (all instances).

abstractmethod update(dt: float) None#

Updates the simulation data.

Parameters:

dt – The time step size in seconds.

abstractmethod write_data_to_sim() None#

Write external wrench to the simulation.

Note

We write external wrench to the simulation here since this function is called before the simulation step. This ensures that the external wrench is applied at every simulation step.

write_root_com_pose_to_sim(root_pose: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as write_root_com_pose_to_sim_index().

abstractmethod write_root_com_pose_to_sim_index(*, root_pose: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set the root center of mass pose over selected environment indices into the simulation.

The root pose comprises of the cartesian position and quaternion orientation in (x, y, z, w). The orientation is the orientation of the principal axes of inertia.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_pose – Root center of mass poses in simulation frame. Shape is (len(env_ids), 7) or (len(env_ids),) with dtype wp.transformf.

  • env_ids – Environment indices. If None, then all indices are used.

abstractmethod write_root_com_pose_to_sim_mask(*, root_pose: torch.Tensor | wp.array, env_mask: wp.array | None = None) None#

Set the root center of mass pose over selected environment mask into the simulation.

The root pose comprises of the cartesian position and quaternion orientation in (x, y, z, w). The orientation is the orientation of the principal axes of inertia.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_pose – Root center of mass poses in simulation frame. Shape is (num_instances, 7) or (num_instances,) with dtype wp.transformf.

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

abstractmethod write_root_com_state_to_sim(root_state: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as write_root_com_pose_to_sim_index() and write_root_velocity_to_sim_index().

write_root_com_velocity_to_sim(root_velocity: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as write_root_com_velocity_to_sim_index().

abstractmethod write_root_com_velocity_to_sim_index(*, root_velocity: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set the root center of mass velocity over selected environment indices into the simulation.

The velocity comprises linear velocity (x, y, z) and angular velocity (x, y, z) in that order.

Note

This sets the velocity of the root’s center of mass rather than the root’s frame.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_velocity – Root center of mass velocities in simulation world frame. Shape is (len(env_ids), 6) or (len(env_ids),) with dtype wp.spatial_vectorf.

  • env_ids – Environment indices. If None, then all indices are used.

abstractmethod write_root_com_velocity_to_sim_mask(*, root_velocity: torch.Tensor | wp.array, env_mask: wp.array | None = None) None#

Set the root center of mass velocity over selected environment mask into the simulation.

The velocity comprises linear velocity (x, y, z) and angular velocity (x, y, z) in that order.

Note

This sets the velocity of the root’s center of mass rather than the root’s frame.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_velocity – Root center of mass velocities in simulation world frame. Shape is (num_instances, 6) or (num_instances,) with dtype wp.spatial_vectorf.

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

Deprecated, same as write_root_link_pose_to_sim_index().

Set the root link pose over selected environment indices into the simulation.

The root pose comprises of the cartesian position and quaternion orientation in (x, y, z, w).

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_pose – Root link poses in simulation frame. Shape is (len(env_ids), 7) or (len(env_ids),) with dtype wp.transformf.

  • env_ids – Environment indices. If None, then all indices are used.

Set the root link pose over selected environment mask into the simulation.

The root pose comprises of the cartesian position and quaternion orientation in (x, y, z, w).

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_pose – Root link poses in simulation frame. Shape is (num_instances, 7) or (num_instances,) with dtype wp.transformf.

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

Deprecated, same as write_root_pose_to_sim_index() and write_root_link_velocity_to_sim_index().

Deprecated, same as write_root_link_velocity_to_sim_index().

Set the root link velocity over selected environment indices into the simulation.

The velocity comprises linear velocity (x, y, z) and angular velocity (x, y, z) in that order.

Note

This sets the velocity of the root’s frame rather than the root’s center of mass.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_velocity – Root frame velocities in simulation world frame. Shape is (len(env_ids), 6) or (len(env_ids),) with dtype wp.spatial_vectorf.

  • env_ids – Environment indices. If None, then all indices are used.

Set the root link velocity over selected environment mask into the simulation.

The velocity comprises linear velocity (x, y, z) and angular velocity (x, y, z) in that order.

Note

This sets the velocity of the root’s frame rather than the root’s center of mass.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_velocity – Root frame velocities in simulation world frame. Shape is (num_instances, 6) or (num_instances,) with dtype wp.spatial_vectorf.

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

write_root_pose_to_sim(root_pose: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as write_root_pose_to_sim_index().

abstractmethod write_root_pose_to_sim_index(*, root_pose: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set the root pose over selected environment indices into the simulation.

The root pose comprises of the cartesian position and quaternion orientation in (x, y, z, w).

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_pose – Root poses in simulation frame. Shape is (len(env_ids), 7) or (len(env_ids),) with dtype wp.transformf.

  • env_ids – Environment indices. If None, then all indices are used.

abstractmethod write_root_pose_to_sim_mask(*, root_pose: torch.Tensor | wp.array, env_mask: wp.array | None = None) None#

Set the root pose over selected environment mask into the simulation.

The root pose comprises of the cartesian position and quaternion orientation in (x, y, z, w).

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_pose – Root poses in simulation frame. Shape is (num_instances, 7) or (num_instances,) with dtype wp.transformf.

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

abstractmethod write_root_state_to_sim(root_state: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as write_root_pose_to_sim_index() and write_root_velocity_to_sim_index().

write_root_velocity_to_sim(root_velocity: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as write_root_velocity_to_sim_index().

abstractmethod write_root_velocity_to_sim_index(*, root_velocity: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set the root center of mass velocity over selected environment indices into the simulation.

The velocity comprises linear velocity (x, y, z) and angular velocity (x, y, z) in that order.

Note

This sets the velocity of the root’s center of mass rather than the root’s frame.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_velocity – Root center of mass velocities in simulation world frame. Shape is (len(env_ids), 6) or (len(env_ids),) with dtype wp.spatial_vectorf.

  • env_ids – Environment indices. If None, then all indices are used.

abstractmethod write_root_velocity_to_sim_mask(*, root_velocity: torch.Tensor | wp.array, env_mask: wp.array | None = None) None#

Set the root center of mass velocity over selected environment mask into the simulation.

The velocity comprises linear velocity (x, y, z) and angular velocity (x, y, z) in that order.

Note

This sets the velocity of the root’s center of mass rather than the root’s frame.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_velocity – Root center of mass velocities in simulation world frame. Shape is (num_instances, 6) or (num_instances,) with dtype wp.spatial_vectorf.

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

cfg: RigidObjectCfg#

Configuration instance for the rigid object.

class isaaclab.assets.RigidObjectData[source]#

Bases: FactoryBase

Factory for creating rigid object data instances.

Methods:

__new__(cls, *args, **kwargs)

Create a new instance of a rigid object data based on the backend.

get_registry_keys()

Returns a list of registered backend names.

register(name, sub_class)

Register a new implementation class.

static __new__(cls, *args, **kwargs) BaseRigidObjectData | PhysXRigidObjectData[source]#

Create a new instance of a rigid object data based on the backend.

classmethod get_registry_keys() list[str]#

Returns a list of registered backend names.

classmethod register(name: str, sub_class) None#

Register a new implementation class.

class isaaclab.assets.RigidObjectCfg[source]#

Bases: AssetBaseCfg

Configuration parameters for a rigid object.

Classes:

InitialStateCfg

Initial state of the rigid body.

Attributes:

prim_path

Prim path (or expression) to the asset.

spawn

Spawn configuration for the asset.

collision_group

Collision group of the asset.

debug_vis

Whether to enable debug visualization for the asset.

init_state

Initial state of the rigid object.

class InitialStateCfg[source]#

Bases: InitialStateCfg

Initial state of the rigid body.

Attributes:

lin_vel

Linear velocity of the root in simulation world frame.

ang_vel

Angular velocity of the root in simulation world frame.

pos

Position of the root in simulation world frame.

rot

Quaternion rotation (x, y, z, w) of the root in simulation world frame.

lin_vel: tuple[float, float, float]#

Linear velocity of the root in simulation world frame. Defaults to (0.0, 0.0, 0.0).

ang_vel: tuple[float, float, float]#

Angular velocity of the root in simulation world frame. Defaults to (0.0, 0.0, 0.0).

pos: tuple[float, float, float]#

Position of the root in simulation world frame. Defaults to (0.0, 0.0, 0.0).

rot: tuple[float, float, float, float]#

Quaternion rotation (x, y, z, w) of the root in simulation world frame. Defaults to (0.0, 0.0, 0.0, 1.0).

prim_path: str#

Prim path (or expression) to the asset.

Note

The expression can contain the environment namespace regex {ENV_REGEX_NS} which will be replaced with the environment namespace.

Example: {ENV_REGEX_NS}/Robot will be replaced with /World/envs/env_.*/Robot.

spawn: SpawnerCfg | None#

Spawn configuration for the asset. Defaults to None.

If None, then no prims are spawned by the asset class. Instead, it is assumed that the asset is already present in the scene.

collision_group: Literal[0, -1]#

Collision group of the asset. Defaults to 0.

  • -1: global collision group (collides with all assets in the scene).

  • 0: local collision group (collides with other assets in the same environment).

debug_vis: bool#

Whether to enable debug visualization for the asset. Defaults to False.

init_state: InitialStateCfg#

Initial state of the rigid object. Defaults to identity pose with zero velocity.

Rigid Object Collection#

class isaaclab.assets.RigidObjectCollection[source]#

Bases: FactoryBase, BaseRigidObjectCollection

Factory for creating rigid object collection instances.

Attributes:

data

Data related to the asset.

body_names

Ordered names of bodies in the rigid object collection.

device

Memory device for computation.

has_debug_vis_implementation

Whether the asset has a debug visualization implemented.

instantaneous_wrench_composer

Instantaneous wrench composer.

is_initialized

Whether the asset is initialized.

num_bodies

Number of bodies in the rigid object collection.

num_instances

Number of instances of the asset.

num_objects

Deprecated property.

object_names

Deprecated property.

permanent_wrench_composer

Permanent wrench composer.

root_view

Root view for the rigid object collection.

cfg

Configuration instance for the rigid object.

Methods:

__new__(cls, *args, **kwargs)

Create a new instance of a rigid object collection based on the backend.

__init__(cfg)

Initialize the rigid object.

assert_shape_and_dtype(tensor, shape, dtype)

Assert the shape and dtype of a tensor or warp array.

assert_shape_and_dtype_mask(tensor, masks, dtype)

Assert the shape of a tensor or warp array against mask dimensions.

find_bodies(name_keys[, preserve_order])

Find bodies in the rigid body collection based on the name keys.

find_objects(name_keys[, preserve_order])

Deprecated method.

get_registry_keys()

Returns a list of registered backend names.

register(name, sub_class)

Register a new implementation class.

reset([env_ids, object_ids, env_mask])

Resets all internal buffers of selected environments and objects.

set_coms(coms[, body_ids, env_ids])

Deprecated, same as set_coms_index().

set_coms_index(*, coms[, body_ids, env_ids])

Set center of mass positions of all bodies.

set_coms_mask(*, coms[, body_mask, env_mask])

Set center of mass positions of all bodies.

set_debug_vis(debug_vis)

Sets whether to visualize the asset data.

set_external_force_and_torque(forces, torques)

Deprecated, same as permanent_wrench_composer.set_forces_and_torques().

set_inertias(inertias[, body_ids, env_ids])

Deprecated, same as set_inertias_index().

set_inertias_index(*, inertias[, body_ids, ...])

Set inertias of all bodies.

set_inertias_mask(*, inertias[, body_mask, ...])

Set inertias of all bodies.

set_masses(masses[, body_ids, env_ids])

Deprecated, same as set_masses_index().

set_masses_index(*, masses[, body_ids, env_ids])

Set masses of all bodies.

set_masses_mask(*, masses[, body_mask, env_mask])

Set masses of all bodies.

set_visibility(visible[, env_ids])

Set the visibility of the prims corresponding to the asset.

update(dt)

Updates the simulation data.

write_body_com_pose_to_sim(body_poses[, ...])

Deprecated, same as write_body_com_pose_to_sim_index().

write_body_com_pose_to_sim_index(*, body_poses)

Set the body center of mass pose over selected environment and body indices into the simulation.

write_body_com_pose_to_sim_mask(*, body_poses)

Set the body center of mass pose over selected environment and body mask into the simulation.

write_body_com_state_to_sim(body_states[, ...])

Deprecated, same as write_body_com_pose_to_sim_index() and write_body_com_velocity_to_sim_index().

write_body_com_velocity_to_sim(body_velocities)

Deprecated, same as write_body_com_velocity_to_sim_index().

write_body_com_velocity_to_sim_index(*, ...)

Set the body center of mass velocity over selected environment and body indices into the simulation.

write_body_com_velocity_to_sim_mask(*, ...)

Set the body center of mass velocity over selected environment and body mask into the simulation.

write_body_link_pose_to_sim(body_poses[, ...])

Deprecated, same as write_body_link_pose_to_sim_index().

write_body_link_pose_to_sim_index(*, body_poses)

Set the body link pose over selected environment and body indices into the simulation.

write_body_link_pose_to_sim_mask(*, body_poses)

Set the body link pose over selected environment and body mask into the simulation.

write_body_link_state_to_sim(body_states[, ...])

Deprecated, same as write_body_link_pose_to_sim_index() and write_body_link_velocity_to_sim_index().

write_body_link_velocity_to_sim(body_velocities)

Deprecated, same as write_body_link_velocity_to_sim_index().

write_body_link_velocity_to_sim_index(*, ...)

Set the body link velocity over selected environment and body indices into the simulation.

write_body_link_velocity_to_sim_mask(*, ...)

Set the body link velocity over selected environment and body mask into the simulation.

write_body_pose_to_sim(body_poses[, ...])

Deprecated, same as write_body_pose_to_sim_index().

write_body_pose_to_sim_index(*, body_poses)

Set the body poses over selected environment and body indices into the simulation.

write_body_pose_to_sim_mask(*, body_poses[, ...])

Set the body poses over selected environment and body mask into the simulation.

write_body_state_to_sim(body_states[, ...])

Deprecated, same as write_body_link_pose_to_sim_index() and write_body_com_velocity_to_sim_index().

write_body_velocity_to_sim(body_velocities)

Deprecated, same as write_body_velocity_to_sim_index().

write_body_velocity_to_sim_index(*, ...[, ...])

Set the body velocity over selected environment and body indices into the simulation.

write_body_velocity_to_sim_mask(*, ...[, ...])

Set the body velocity over selected environment and body mask into the simulation.

write_data_to_sim()

Write external wrench to the simulation.

write_object_com_pose_to_sim(object_pose[, ...])

Deprecated method.

write_object_com_state_to_sim(object_state)

Deprecated method.

write_object_com_velocity_to_sim(object_velocity)

Deprecated method.

write_object_link_pose_to_sim(object_pose[, ...])

Deprecated method.

write_object_link_state_to_sim(object_state)

Deprecated method.

write_object_link_velocity_to_sim(...[, ...])

Deprecated method.

write_object_pose_to_sim(object_pose[, ...])

Deprecated method.

write_object_state_to_sim(object_state[, ...])

Deprecated method.

write_object_velocity_to_sim(object_velocity)

Deprecated method.

abstract property data: RigidObjectCollectionData#

Data related to the asset.

static __new__(cls, *args, **kwargs) BaseRigidObjectCollection | PhysXRigidObjectCollection[source]#

Create a new instance of a rigid object collection based on the backend.

__init__(cfg: RigidObjectCollectionCfg)#

Initialize the rigid object.

Parameters:

cfg – A configuration instance.

assert_shape_and_dtype(tensor: float | torch.Tensor | wp.array, shape: tuple[int, ...], dtype: type, name: str = '') None#

Assert the shape and dtype of a tensor or warp array.

Parameters:
  • tensor – The tensor or warp array to assert the shape of. Floats are skipped.

  • shape – The expected leading dimensions (e.g. (num_envs, num_joints)).

  • dtype – The expected warp dtype.

  • name – Optional parameter name for error messages.

assert_shape_and_dtype_mask(tensor: float | torch.Tensor | wp.array, masks: tuple[wp.array, ...], dtype: type, name: str = '', trailing_dims: tuple[int, ...] = ()) None#

Assert the shape of a tensor or warp array against mask dimensions.

Mask-based write methods expect full-sized data — one element per entry in each mask dimension, regardless of how many entries are True. The expected leading shape is therefore (mask_0.shape[0], mask_1.shape[0], ...) (i.e. the total size of each dimension, not the number of selected entries).

Parameters:
  • tensor – The tensor or warp array to assert the shape of. Floats are skipped.

  • masks – Tuple of mask arrays whose shape[0] dimensions form the expected leading shape.

  • dtype – The expected warp dtype.

  • name – Optional parameter name for error messages.

  • trailing_dims – Extra trailing dimensions to append (e.g. (9,) for inertias with wp.float32).

abstract property body_names: list[str]#

Ordered names of bodies in the rigid object collection.

property device: str#

Memory device for computation.

abstractmethod find_bodies(name_keys: str | Sequence[str], preserve_order: bool = False) tuple[torch.Tensor, list[str]]#

Find bodies in the rigid body collection based on the name keys.

Please check the isaaclab.utils.string_utils.resolve_matching_names() function for more information on the name matching.

Parameters:
  • name_keys – A regular expression or a list of regular expressions to match the body names.

  • preserve_order – Whether to preserve the order of the name keys in the output. Defaults to False.

Returns:

A tuple of lists containing the body indices and names.

find_objects(name_keys: str | Sequence[str], preserve_order: bool = False) tuple[torch.Tensor, list[str]]#

Deprecated method. Please use find_bodies() instead.

classmethod get_registry_keys() list[str]#

Returns a list of registered backend names.

property has_debug_vis_implementation: bool#

Whether the asset has a debug visualization implemented.

abstract property instantaneous_wrench_composer: WrenchComposer#

Instantaneous wrench composer.

Returns a WrenchComposer instance. Wrenches added or set to this wrench composer are only valid for the current simulation step. At the end of the simulation step, the wrenches set to this object are discarded. This is useful to apply forces that change all the time, things like drag forces for instance.

property is_initialized: bool#

Whether the asset is initialized.

Returns True if the asset is initialized, False otherwise.

abstract property num_bodies: int#

Number of bodies in the rigid object collection.

abstract property num_instances: int#

Number of instances of the asset.

This is equal to the number of asset instances per environment multiplied by the number of environments.

property num_objects: int#

Deprecated property. Please use num_bodies instead.

property object_names: list[str]#

Deprecated property. Please use body_names instead.

abstract property permanent_wrench_composer: WrenchComposer#

Permanent wrench composer.

Returns a WrenchComposer instance. Wrenches added or set to this wrench composer are persistent and are applied to the simulation at every step. This is useful to apply forces that are constant over a period of time, things like the thrust of a motor for instance.

classmethod register(name: str, sub_class) None#

Register a new implementation class.

abstractmethod reset(env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, object_ids: slice | torch.Tensor | None = None, env_mask: wp.array | None = None) None#

Resets all internal buffers of selected environments and objects.

Caution

If both env_ids and env_mask are provided, then env_mask takes precedence over env_ids.

Parameters:
  • env_ids – Environment indices. If None, then all indices are used.

  • object_ids – Object indices. If None, then all indices are used.

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

abstract property root_view#

Root view for the rigid object collection.

Note

Use this view with caution. It requires handling of tensors in a specific way.

set_coms(coms: torch.Tensor | wp.array, body_ids: Sequence[int] | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_coms_index().

abstractmethod set_coms_index(*, coms: torch.Tensor | wp.array, body_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set center of mass positions of all bodies.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • coms – Center of mass positions of all bodies. Shape is (len(env_ids), len(body_ids), 3).

  • body_ids – The body indices to set the center of mass positions for. Defaults to None (all bodies).

  • env_ids – The environment indices to set the center of mass positions for. Defaults to None (all environments).

abstractmethod set_coms_mask(*, coms: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set center of mass positions of all bodies.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • coms – Center of mass positions of all bodies. Shape is (num_instances, num_bodies, 3) or (num_instances, num_bodies) with dtype wp.vec3f.

  • body_mask – Body mask. If None, then all bodies are used. Shape is (num_bodies,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_debug_vis(debug_vis: bool) bool#

Sets whether to visualize the asset data.

Parameters:

debug_vis – Whether to visualize the asset data.

Returns:

Whether the debug visualization was successfully set. False if the asset does not support debug visualization.

set_external_force_and_torque(forces: torch.Tensor | wp.array, torques: torch.Tensor | wp.array, positions: torch.Tensor | wp.array | None = None, body_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, is_global: bool = False) None#

Deprecated, same as permanent_wrench_composer.set_forces_and_torques().

set_inertias(inertias: torch.Tensor | wp.array, body_ids: Sequence[int] | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_inertias_index().

abstractmethod set_inertias_index(*, inertias: torch.Tensor | wp.array, body_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set inertias of all bodies.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • inertias – Inertias of all bodies. Shape is (len(env_ids), len(body_ids), 9).

  • body_ids – The body indices to set the inertias for. Defaults to None (all bodies).

  • env_ids – The environment indices to set the inertias for. Defaults to None (all environments).

abstractmethod set_inertias_mask(*, inertias: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set inertias of all bodies.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • inertias – Inertias of all bodies. Shape is (num_instances, num_bodies, 9).

  • body_mask – Body mask. If None, then all bodies are used. Shape is (num_bodies,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_masses(masses: torch.Tensor | wp.array, body_ids: Sequence[int] | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_masses_index().

abstractmethod set_masses_index(*, masses: torch.Tensor | wp.array, body_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set masses of all bodies.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • masses – Masses of all bodies. Shape is (len(env_ids), len(body_ids)).

  • body_ids – The body indices to set the masses for. Defaults to None (all bodies).

  • env_ids – The environment indices to set the masses for. Defaults to None (all environments).

abstractmethod set_masses_mask(*, masses: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set masses of all bodies.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • masses – Masses of all bodies. Shape is (num_instances, num_bodies).

  • body_mask – Body mask. If None, then all bodies are used. Shape is (num_bodies,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_visibility(visible: bool, env_ids: Sequence[int] | None = None)#

Set the visibility of the prims corresponding to the asset.

This operation affects the visibility of the prims corresponding to the asset in the USD stage. It is useful for toggling the visibility of the asset in the simulator. For instance, one can hide the asset when it is not being used to reduce the rendering overhead.

Note

This operation uses the PXR API to set the visibility of the prims. Thus, the operation may have an overhead if the number of prims is large.

Parameters:
  • visible – Whether to make the prims visible or not.

  • env_ids – The indices of the object to set visibility. Defaults to None (all instances).

abstractmethod update(dt: float) None#

Updates the simulation data.

Parameters:

dt – The time step size in seconds.

write_body_com_pose_to_sim(body_poses: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, body_ids: slice | torch.Tensor | None = None) None#

Deprecated, same as write_body_com_pose_to_sim_index().

abstractmethod write_body_com_pose_to_sim_index(*, body_poses: torch.Tensor | wp.array, body_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set the body center of mass pose over selected environment and body indices into the simulation.

The body center of mass pose comprises of the cartesian position and quaternion orientation in (x, y, z, w). The orientation is the orientation of the principal axes of inertia.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • body_poses – Body center of mass poses in simulation frame. Shape is (len(env_ids), len(body_ids), 7) or (len(env_ids), len(body_ids)) with dtype wp.transformf.

  • body_ids – Body indices. If None, then all indices are used.

  • env_ids – Environment indices. If None, then all indices are used.

abstractmethod write_body_com_pose_to_sim_mask(*, body_poses: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set the body center of mass pose over selected environment and body mask into the simulation.

The body center of mass pose comprises of the cartesian position and quaternion orientation in (x, y, z, w). The orientation is the orientation of the principal axes of inertia.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • body_poses – Body center of mass poses in simulation frame. Shape is (num_instances, num_bodies, 7) or (num_instances, num_bodies) with dtype wp.transformf.

  • body_mask – Body mask. If None, then all bodies are used. Shape is (num_bodies,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

abstractmethod write_body_com_state_to_sim(body_states: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, body_ids: slice | torch.Tensor | None = None) None#

Deprecated, same as write_body_com_pose_to_sim_index() and write_body_com_velocity_to_sim_index().

write_body_com_velocity_to_sim(body_velocities: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, body_ids: slice | torch.Tensor | None = None) None#

Deprecated, same as write_body_com_velocity_to_sim_index().

abstractmethod write_body_com_velocity_to_sim_index(*, body_velocities: torch.Tensor | wp.array, body_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set the body center of mass velocity over selected environment and body indices into the simulation.

The velocity comprises linear velocity (x, y, z) and angular velocity (x, y, z) in that order.

Note

This sets the velocity of the body’s center of mass rather than the body’s frame.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • body_velocities – Body center of mass velocities in simulation frame. Shape is (len(env_ids), len(body_ids), 6) or (len(env_ids), len(body_ids)) with dtype wp.spatial_vectorf.

  • body_ids – Body indices. If None, then all indices are used.

  • env_ids – Environment indices. If None, then all indices are used.

abstractmethod write_body_com_velocity_to_sim_mask(*, body_velocities: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set the body center of mass velocity over selected environment and body mask into the simulation.

The velocity comprises linear velocity (x, y, z) and angular velocity (x, y, z) in that order.

Note

This sets the velocity of the body’s center of mass rather than the body’s frame.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • body_velocities – Body center of mass velocities in simulation frame. Shape is (num_instances, num_bodies, 6) or (num_instances, num_bodies) with dtype wp.spatial_vectorf.

  • body_mask – Body mask. If None, then all bodies are used. Shape is (num_bodies,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

Deprecated, same as write_body_link_pose_to_sim_index().

Set the body link pose over selected environment and body indices into the simulation.

The body link pose comprises of the cartesian position and quaternion orientation in (x, y, z, w).

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • body_poses – Body link poses in simulation frame. Shape is (len(env_ids), len(body_ids), 7) or (len(env_ids), len(body_ids)) with dtype wp.transformf.

  • body_ids – Body indices. If None, then all indices are used.

  • env_ids – Environment indices. If None, then all indices are used.

Set the body link pose over selected environment and body mask into the simulation.

The body link pose comprises of the cartesian position and quaternion orientation in (x, y, z, w).

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • body_poses – Body link poses in simulation frame. Shape is (num_instances, num_bodies, 7) or (num_instances, num_bodies) with dtype wp.transformf.

  • body_mask – Body mask. If None, then all bodies are used. Shape is (num_bodies,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

Deprecated, same as write_body_link_pose_to_sim_index() and write_body_link_velocity_to_sim_index().

Deprecated, same as write_body_link_velocity_to_sim_index().

Set the body link velocity over selected environment and body indices into the simulation.

The velocity comprises linear velocity (x, y, z) and angular velocity (x, y, z) in that order.

Note

This sets the velocity of the body’s frame rather than the body’s center of mass.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • body_velocities – Body link velocities in simulation frame. Shape is (len(env_ids), len(body_ids), 6) or (len(env_ids), len(body_ids)) with dtype wp.spatial_vectorf.

  • body_ids – Body indices. If None, then all indices are used.

  • env_ids – Environment indices. If None, then all indices are used.

Set the body link velocity over selected environment and body mask into the simulation.

The velocity comprises linear velocity (x, y, z) and angular velocity (x, y, z) in that order.

Note

This sets the velocity of the body’s frame rather than the body’s center of mass.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • body_velocities – Body link velocities in simulation frame. Shape is (num_instances, num_bodies, 6) or (num_instances, num_bodies) with dtype wp.spatial_vectorf.

  • body_mask – Body mask. If None, then all bodies are used. Shape is (num_bodies,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

write_body_pose_to_sim(body_poses: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, body_ids: slice | torch.Tensor | None = None) None#

Deprecated, same as write_body_pose_to_sim_index().

abstractmethod write_body_pose_to_sim_index(*, body_poses: torch.Tensor | wp.array, body_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set the body poses over selected environment and body indices into the simulation.

The body pose comprises of the cartesian position and quaternion orientation in (x, y, z, w).

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • body_poses – Body poses in simulation frame. Shape is (len(env_ids), len(body_ids), 7) or (len(env_ids), len(body_ids)) with dtype wp.transformf.

  • body_ids – Body indices. If None, then all indices are used.

  • env_ids – Environment indices. If None, then all indices are used.

abstractmethod write_body_pose_to_sim_mask(*, body_poses: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set the body poses over selected environment and body mask into the simulation.

The body pose comprises of the cartesian position and quaternion orientation in (x, y, z, w).

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • body_poses – Body poses in simulation frame. Shape is (num_instances, num_bodies, 7) or (num_instances, num_bodies) with dtype wp.transformf.

  • body_mask – Body mask. If None, then all bodies are used. Shape is (num_bodies,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

abstractmethod write_body_state_to_sim(body_states: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, body_ids: slice | torch.Tensor | None = None) None#

Deprecated, same as write_body_link_pose_to_sim_index() and write_body_com_velocity_to_sim_index().

write_body_velocity_to_sim(body_velocities: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, body_ids: slice | torch.Tensor | None = None) None#

Deprecated, same as write_body_velocity_to_sim_index().

abstractmethod write_body_velocity_to_sim_index(*, body_velocities: torch.Tensor | wp.array, body_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set the body velocity over selected environment and body indices into the simulation.

The velocity comprises linear velocity (x, y, z) and angular velocity (x, y, z) in that order.

Note

This sets the velocity of the body’s center of mass rather than the body’s frame.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • body_velocities – Body velocities in simulation frame. Shape is (len(env_ids), len(body_ids), 6) or (len(env_ids), len(body_ids)) with dtype wp.spatial_vectorf.

  • body_ids – Body indices. If None, then all indices are used.

  • env_ids – Environment indices. If None, then all indices are used.

abstractmethod write_body_velocity_to_sim_mask(*, body_velocities: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set the body velocity over selected environment and body mask into the simulation.

The velocity comprises linear velocity (x, y, z) and angular velocity (x, y, z) in that order.

Note

This sets the velocity of the body’s center of mass rather than the body’s frame.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • body_velocities – Body velocities in simulation frame. Shape is (num_instances, num_bodies, 6) or (num_instances, num_bodies) with dtype wp.spatial_vectorf.

  • body_mask – Body mask. If None, then all bodies are used. Shape is (num_bodies,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

abstractmethod write_data_to_sim() None#

Write external wrench to the simulation.

Note

We write external wrench to the simulation here since this function is called before the simulation step. This ensures that the external wrench is applied at every simulation step.

write_object_com_pose_to_sim(object_pose: torch.Tensor, env_ids: torch.Tensor | None = None, object_ids: slice | torch.Tensor | None = None) None#

Deprecated method. Please use write_body_com_pose_to_sim_index() instead.

write_object_com_state_to_sim(object_state: torch.Tensor, env_ids: torch.Tensor | None = None, object_ids: slice | torch.Tensor | None = None) None#

Deprecated method. Please use write_body_com_pose_to_sim_index() and write_body_velocity_to_sim_index() instead.

write_object_com_velocity_to_sim(object_velocity: torch.Tensor, env_ids: torch.Tensor | None = None, object_ids: slice | torch.Tensor | None = None) None#

Deprecated method. Please use write_body_com_velocity_to_sim_index() instead.

Deprecated method. Please use write_body_link_pose_to_sim_index() instead.

Deprecated method. Please use write_body_pose_to_sim_index() and write_body_link_velocity_to_sim_index() instead.

Deprecated method. Please use write_body_link_velocity_to_sim_index() instead.

write_object_pose_to_sim(object_pose: torch.Tensor, env_ids: torch.Tensor | None = None, object_ids: slice | torch.Tensor | None = None) None#

Deprecated method. Please use write_body_pose_to_sim_index() instead.

write_object_state_to_sim(object_state: torch.Tensor, env_ids: torch.Tensor | None = None, object_ids: slice | torch.Tensor | None = None) None#

Deprecated method. Please use write_body_pose_to_sim_index() and write_body_link_velocity_to_sim_index() instead.

write_object_velocity_to_sim(object_velocity: torch.Tensor, env_ids: torch.Tensor | None = None, object_ids: slice | torch.Tensor | None = None) None#

Deprecated method. Please use write_body_com_velocity_to_sim_index() instead.

cfg: RigidObjectCollectionCfg#

Configuration instance for the rigid object.

class isaaclab.assets.RigidObjectCollectionData[source]#

Bases: FactoryBase

Factory for creating rigid object collection data instances.

Methods:

__new__(cls, *args, **kwargs)

Create a new instance of a rigid object collection data based on the backend.

get_registry_keys()

Returns a list of registered backend names.

register(name, sub_class)

Register a new implementation class.

static __new__(cls, *args, **kwargs) BaseRigidObjectCollectionData | PhysXRigidObjectCollectionData[source]#

Create a new instance of a rigid object collection data based on the backend.

classmethod get_registry_keys() list[str]#

Returns a list of registered backend names.

classmethod register(name: str, sub_class) None#

Register a new implementation class.

class isaaclab.assets.RigidObjectCollectionCfg[source]#

Bases: object

Configuration parameters for a rigid object collection.

Attributes:

rigid_objects

Dictionary of rigid object configurations to spawn.

rigid_objects: dict[str, RigidObjectCfg]#

Dictionary of rigid object configurations to spawn.

The keys are the names for the objects, which are used as unique identifiers throughout the code.

Articulation#

class isaaclab.assets.Articulation[source]#

Bases: FactoryBase, BaseArticulation

Factory for creating articulation instances.

Attributes:

data

Data related to the asset.

body_names

Ordered names of bodies in articulation.

device

Memory device for computation.

fixed_tendon_names

Ordered names of fixed tendons in articulation.

has_debug_vis_implementation

Whether the asset has a debug visualization implemented.

instantaneous_wrench_composer

Instantaneous wrench composer.

is_fixed_base

Whether the articulation is a fixed-base or floating-base system.

is_initialized

Whether the asset is initialized.

joint_names

Ordered names of joints in articulation.

num_bodies

Number of bodies in articulation.

num_fixed_tendons

Number of fixed tendons in articulation.

num_instances

Number of instances of the asset.

num_joints

Number of joints in articulation.

num_spatial_tendons

Number of spatial tendons in articulation.

permanent_wrench_composer

Permanent wrench composer.

root_view

Root view for the asset.

spatial_tendon_names

Ordered names of spatial tendons in articulation.

cfg

Configuration instance for the articulations.

actuators

Dictionary of actuator instances for the articulation.

Methods:

__new__(cls, *args, **kwargs)

Create a new instance of an articulation based on the backend.

__init__(cfg)

Initialize the articulation.

assert_shape_and_dtype(tensor, shape, dtype)

Assert the shape and dtype of a tensor or warp array.

assert_shape_and_dtype_mask(tensor, masks, dtype)

Assert the shape of a tensor or warp array against mask dimensions.

find_bodies(name_keys[, preserve_order])

Find bodies in the articulation based on the name keys.

find_fixed_tendons(name_keys[, ...])

Find fixed tendons in the articulation based on the name keys.

find_joints(name_keys[, joint_subset, ...])

Find joints in the articulation based on the name keys.

find_spatial_tendons(name_keys[, ...])

Find spatial tendons in the articulation based on the name keys.

get_registry_keys()

Returns a list of registered backend names.

register(name, sub_class)

Register a new implementation class.

reset([env_ids, env_mask])

Reset the articulation.

set_coms(coms[, body_ids, env_ids])

Deprecated, same as set_coms_index().

set_coms_index(*, coms[, body_ids, env_ids])

Set center of mass pose of all bodies in their respective body link frames.

set_coms_mask(*, coms[, body_mask, env_mask])

Set center of mass pose of all bodies in their respective body link frames.

set_debug_vis(debug_vis)

Sets whether to visualize the asset data.

set_external_force_and_torque(forces, torques)

Deprecated, same as permanent_wrench_composer.set_forces_and_torques().

set_fixed_tendon_damping(damping[, ...])

Deprecated, same as set_fixed_tendon_damping_index().

set_fixed_tendon_damping_index(*, damping[, ...])

Set fixed tendon damping into internal buffers.

set_fixed_tendon_damping_mask(*, damping[, ...])

Set fixed tendon damping into internal buffers.

set_fixed_tendon_limit(limit[, ...])

Set fixed tendon position limits into internal buffers.

set_fixed_tendon_limit_stiffness(limit_stiffness)

Deprecated, same as set_fixed_tendon_limit_stiffness_index().

set_fixed_tendon_limit_stiffness_index(*, ...)

Set fixed tendon limit stiffness into internal buffers.

set_fixed_tendon_limit_stiffness_mask(*, ...)

Set fixed tendon limit stiffness into internal buffers.

set_fixed_tendon_offset(offset[, ...])

Deprecated, same as set_fixed_tendon_offset_index().

set_fixed_tendon_offset_index(*, offset[, ...])

Set fixed tendon offset into internal buffers.

set_fixed_tendon_offset_mask(*, offset[, ...])

Set fixed tendon offset into internal buffers.

set_fixed_tendon_position_limit(limit[, ...])

Deprecated, same as set_fixed_tendon_position_limit_index().

set_fixed_tendon_position_limit_index(*, limit)

Set fixed tendon position limits into internal buffers.

set_fixed_tendon_position_limit_mask(*, limit)

Set fixed tendon position limits into internal buffers.

set_fixed_tendon_rest_length(rest_length[, ...])

Deprecated, same as set_fixed_tendon_rest_length_index().

set_fixed_tendon_rest_length_index(*, ...[, ...])

Set fixed tendon rest length into internal buffers.

set_fixed_tendon_rest_length_mask(*, rest_length)

Set fixed tendon rest length into internal buffers.

set_fixed_tendon_stiffness(stiffness[, ...])

Deprecated, same as set_fixed_tendon_stiffness_index().

set_fixed_tendon_stiffness_index(*, stiffness)

Set fixed tendon stiffness into internal buffers.

set_fixed_tendon_stiffness_mask(*, stiffness)

Set fixed tendon stiffness into internal buffers.

set_inertias(inertias[, body_ids, env_ids])

Deprecated, same as set_inertias_index().

set_inertias_index(*, inertias[, body_ids, ...])

Set inertias of all bodies in the simulation world frame.

set_inertias_mask(*, inertias[, body_mask, ...])

Set inertias of all bodies in the simulation world frame.

set_joint_effort_target(target[, joint_ids, ...])

Deprecated, same as set_joint_effort_target_index().

set_joint_effort_target_index(*, target[, ...])

Set joint efforts into internal buffers.

set_joint_effort_target_mask(*, target[, ...])

Set joint efforts into internal buffers.

set_joint_position_target(target[, ...])

Deprecated, same as set_joint_position_target_index().

set_joint_position_target_index(*, target[, ...])

Set joint position targets into internal buffers.

set_joint_position_target_mask(*, target[, ...])

Set joint position targets into internal buffers.

set_joint_velocity_target(target[, ...])

Deprecated, same as set_joint_velocity_target_index().

set_joint_velocity_target_index(*, target[, ...])

Set joint velocity targets into internal buffers.

set_joint_velocity_target_mask(*, target[, ...])

Set joint velocity targets into internal buffers.

set_masses(masses[, body_ids, env_ids])

Deprecated, same as set_masses_index().

set_masses_index(*, masses[, body_ids, env_ids])

Set masses of all bodies in the simulation world frame.

set_masses_mask(*, masses[, body_mask, env_mask])

Set masses of all bodies in the simulation world frame.

set_spatial_tendon_damping(damping[, ...])

Deprecated, same as set_spatial_tendon_damping_index().

set_spatial_tendon_damping_index(*, damping)

Set spatial tendon damping into internal buffers.

set_spatial_tendon_damping_mask(*, damping)

Set spatial tendon damping into internal buffers.

set_spatial_tendon_limit_stiffness(...[, ...])

Deprecated, same as set_spatial_tendon_limit_stiffness_index().

set_spatial_tendon_limit_stiffness_index(*, ...)

Set spatial tendon limit stiffness into internal buffers.

set_spatial_tendon_limit_stiffness_mask(*, ...)

Set spatial tendon limit stiffness into internal buffers.

set_spatial_tendon_offset(offset[, ...])

Deprecated, same as set_spatial_tendon_offset_index().

set_spatial_tendon_offset_index(*, offset[, ...])

Set spatial tendon offset into internal buffers.

set_spatial_tendon_offset_mask(*, offset[, ...])

Set spatial tendon offset into internal buffers.

set_spatial_tendon_stiffness(stiffness[, ...])

Deprecated, same as set_spatial_tendon_stiffness_index().

set_spatial_tendon_stiffness_index(*, stiffness)

Set spatial tendon stiffness into internal buffers.

set_spatial_tendon_stiffness_mask(*, stiffness)

Set spatial tendon stiffness into internal buffers.

set_visibility(visible[, env_ids])

Set the visibility of the prims corresponding to the asset.

update(dt)

Updates the simulation data.

write_data_to_sim()

Write external wrenches and joint commands to the simulation.

write_fixed_tendon_properties_to_sim([...])

Deprecated, same as write_fixed_tendon_properties_to_sim_index().

write_fixed_tendon_properties_to_sim_index(*)

Write fixed tendon properties into the simulation.

write_fixed_tendon_properties_to_sim_mask(*)

Write fixed tendon properties into the simulation.

write_joint_armature_to_sim(armature[, ...])

Deprecated, same as write_joint_armature_to_sim_index().

write_joint_armature_to_sim_index(*, armature)

Write joint armature into the simulation.

write_joint_armature_to_sim_mask(*, armature)

Write joint armature into the simulation.

write_joint_damping_to_sim(damping[, ...])

Deprecated, same as write_joint_damping_to_sim_index().

write_joint_damping_to_sim_index(*, damping)

Write joint damping into the simulation.

write_joint_damping_to_sim_mask(*, damping)

Write joint damping into the simulation.

write_joint_effort_limit_to_sim(limits[, ...])

Deprecated, same as write_joint_effort_limit_to_sim_index().

write_joint_effort_limit_to_sim_index(*, limits)

Write joint effort limits into the simulation.

write_joint_effort_limit_to_sim_mask(*, limits)

Write joint effort limits into the simulation.

write_joint_friction_coefficient_to_sim(...)

Deprecated, same as write_joint_friction_coefficient_to_sim_index().

write_joint_friction_coefficient_to_sim_index(*, ...)

Write joint static friction coefficients into the simulation.

write_joint_friction_coefficient_to_sim_mask(*, ...)

Write joint static friction coefficients into the simulation.

write_joint_friction_to_sim(joint_friction)

Write joint friction coefficients into the simulation.

write_joint_limits_to_sim(limits[, ...])

Write joint limits into the simulation.

write_joint_position_limit_to_sim(limits[, ...])

Deprecated, same as write_joint_position_limit_to_sim_index().

write_joint_position_limit_to_sim_index(*, ...)

Write joint position limits into the simulation.

write_joint_position_limit_to_sim_mask(*, limits)

Write joint position limits into the simulation.

write_joint_position_to_sim(position[, ...])

Deprecated, same as write_joint_position_to_sim_index().

write_joint_position_to_sim_index(*, position)

Write joint positions to the simulation.

write_joint_position_to_sim_mask(*, position)

Write joint positions to the simulation.

write_joint_state_to_sim(position, velocity)

Deprecated, same as write_joint_position_to_sim_index() and write_joint_velocity_to_sim_index().

write_joint_stiffness_to_sim(stiffness[, ...])

Deprecated, same as write_joint_stiffness_to_sim_index().

write_joint_stiffness_to_sim_index(*, stiffness)

Write joint stiffness into the simulation.

write_joint_stiffness_to_sim_mask(*, stiffness)

Write joint stiffness into the simulation.

write_joint_velocity_limit_to_sim(limits[, ...])

Deprecated, same as write_joint_velocity_limit_to_sim_index().

write_joint_velocity_limit_to_sim_index(*, ...)

Write joint max velocity to the simulation.

write_joint_velocity_limit_to_sim_mask(*, limits)

Write joint max velocity to the simulation.

write_joint_velocity_to_sim(velocity[, ...])

Deprecated, same as write_joint_velocity_to_sim_index().

write_joint_velocity_to_sim_index(*, velocity)

Write joint velocities to the simulation.

write_joint_velocity_to_sim_mask(*, velocity)

Write joint velocities to the simulation.

write_root_com_pose_to_sim(root_pose[, env_ids])

Deprecated, same as write_root_com_pose_to_sim_index().

write_root_com_pose_to_sim_index(*, root_pose)

Set the root center of mass pose over selected environment indices into the simulation.

write_root_com_pose_to_sim_mask(*, root_pose)

Set the root center of mass pose over selected environment mask into the simulation.

write_root_com_state_to_sim(root_state[, ...])

Deprecated, same as write_root_com_pose_to_sim_index() and write_root_velocity_to_sim_index().

write_root_com_velocity_to_sim(root_velocity)

Deprecated, same as write_root_com_velocity_to_sim_index().

write_root_com_velocity_to_sim_index(*, ...)

Set the root center of mass velocity over selected environment indices into the simulation.

write_root_com_velocity_to_sim_mask(*, ...)

Set the root center of mass velocity over selected environment mask into the simulation.

write_root_link_pose_to_sim(root_pose[, env_ids])

Deprecated, same as write_root_link_pose_to_sim_index().

write_root_link_pose_to_sim_index(*, root_pose)

Set the root link pose over selected environment indices into the simulation.

write_root_link_pose_to_sim_mask(*, root_pose)

Set the root link pose over selected environment mask into the simulation.

write_root_link_state_to_sim(root_state[, ...])

Deprecated, same as write_root_pose_to_sim_index() and write_root_link_velocity_to_sim_index().

write_root_link_velocity_to_sim(root_velocity)

Deprecated, same as write_root_link_velocity_to_sim_index().

write_root_link_velocity_to_sim_index(*, ...)

Set the root link velocity over selected environment indices into the simulation.

write_root_link_velocity_to_sim_mask(*, ...)

Set the root link velocity over selected environment mask into the simulation.

write_root_pose_to_sim(root_pose[, env_ids])

Deprecated, same as write_root_pose_to_sim_index().

write_root_pose_to_sim_index(*, root_pose[, ...])

Set the root pose over selected environment indices into the simulation.

write_root_pose_to_sim_mask(*, root_pose[, ...])

Set the root pose over selected environment mask into the simulation.

write_root_state_to_sim(root_state[, env_ids])

Deprecated, same as write_root_pose_to_sim_index() and write_root_velocity_to_sim_index().

write_root_velocity_to_sim(root_velocity[, ...])

Deprecated, same as write_root_velocity_to_sim_index().

write_root_velocity_to_sim_index(*, ...[, ...])

Set the root center of mass velocity over selected environment indices into the simulation.

write_root_velocity_to_sim_mask(*, root_velocity)

Set the root center of mass velocity over selected environment mask into the simulation.

write_spatial_tendon_properties_to_sim([...])

Deprecated, same as write_spatial_tendon_properties_to_sim_index().

write_spatial_tendon_properties_to_sim_index(*)

Write spatial tendon properties into the simulation.

write_spatial_tendon_properties_to_sim_mask(*)

Write spatial tendon properties into the simulation.

abstract property data: ArticulationData#

Data related to the asset.

static __new__(cls, *args, **kwargs) BaseArticulation | PhysXArticulation[source]#

Create a new instance of an articulation based on the backend.

__init__(cfg: ArticulationCfg)#

Initialize the articulation.

Parameters:

cfg – A configuration instance.

assert_shape_and_dtype(tensor: float | torch.Tensor | wp.array, shape: tuple[int, ...], dtype: type, name: str = '') None#

Assert the shape and dtype of a tensor or warp array.

Parameters:
  • tensor – The tensor or warp array to assert the shape of. Floats are skipped.

  • shape – The expected leading dimensions (e.g. (num_envs, num_joints)).

  • dtype – The expected warp dtype.

  • name – Optional parameter name for error messages.

assert_shape_and_dtype_mask(tensor: float | torch.Tensor | wp.array, masks: tuple[wp.array, ...], dtype: type, name: str = '', trailing_dims: tuple[int, ...] = ()) None#

Assert the shape of a tensor or warp array against mask dimensions.

Mask-based write methods expect full-sized data — one element per entry in each mask dimension, regardless of how many entries are True. The expected leading shape is therefore (mask_0.shape[0], mask_1.shape[0], ...) (i.e. the total size of each dimension, not the number of selected entries).

Parameters:
  • tensor – The tensor or warp array to assert the shape of. Floats are skipped.

  • masks – Tuple of mask arrays whose shape[0] dimensions form the expected leading shape.

  • dtype – The expected warp dtype.

  • name – Optional parameter name for error messages.

  • trailing_dims – Extra trailing dimensions to append (e.g. (9,) for inertias with wp.float32).

abstract property body_names: list[str]#

Ordered names of bodies in articulation.

property device: str#

Memory device for computation.

abstractmethod find_bodies(name_keys: str | Sequence[str], preserve_order: bool = False) tuple[list[int], list[str]]#

Find bodies in the articulation based on the name keys.

Please check the isaaclab.utils.string_utils.resolve_matching_names() function for more information on the name matching.

Parameters:
  • name_keys – A regular expression or a list of regular expressions to match the body names.

  • preserve_order – Whether to preserve the order of the name keys in the output. Defaults to False.

Returns:

A tuple of lists containing the body indices and names.

abstractmethod find_fixed_tendons(name_keys: str | Sequence[str], tendon_subsets: list[str] | None = None, preserve_order: bool = False) tuple[list[int], list[str]]#

Find fixed tendons in the articulation based on the name keys.

Please see the isaaclab.utils.string.resolve_matching_names() function for more information on the name matching.

Parameters:
  • name_keys – A regular expression or a list of regular expressions to match the joint names with fixed tendons.

  • tendon_subsets – A subset of joints with fixed tendons to search for. Defaults to None, which means all joints in the articulation are searched.

  • preserve_order – Whether to preserve the order of the name keys in the output. Defaults to False.

Returns:

A tuple of lists containing the tendon indices, names.

abstractmethod find_joints(name_keys: str | Sequence[str], joint_subset: list[str] | None = None, preserve_order: bool = False) tuple[list[int], list[str]]#

Find joints in the articulation based on the name keys.

Please see the isaaclab.utils.string.resolve_matching_names() function for more information on the name matching.

Parameters:
  • name_keys – A regular expression or a list of regular expressions to match the joint names.

  • joint_subset – A subset of joints to search for. Defaults to None, which means all joints in the articulation are searched.

  • preserve_order – Whether to preserve the order of the name keys in the output. Defaults to False.

Returns:

A tuple of lists containing the joint indices, names.

abstractmethod find_spatial_tendons(name_keys: str | Sequence[str], tendon_subsets: list[str] | None = None, preserve_order: bool = False) tuple[list[int], list[str]]#

Find spatial tendons in the articulation based on the name keys.

Please see the isaaclab.utils.string.resolve_matching_names() function for more information on the name matching.

Parameters:
  • name_keys – A regular expression or a list of regular expressions to match the tendon names.

  • tendon_subsets – A subset of tendons to search for. Defaults to None, which means all tendons in the articulation are searched.

  • preserve_order – Whether to preserve the order of the name keys in the output. Defaults to False.

Returns:

A tuple of lists containing the tendon indices, names.

abstract property fixed_tendon_names: list[str]#

Ordered names of fixed tendons in articulation.

classmethod get_registry_keys() list[str]#

Returns a list of registered backend names.

property has_debug_vis_implementation: bool#

Whether the asset has a debug visualization implemented.

abstract property instantaneous_wrench_composer: WrenchComposer#

Instantaneous wrench composer.

Returns a WrenchComposer instance. Wrenches added or set to this wrench composer are only valid for the current simulation step. At the end of the simulation step, the wrenches set to this object are discarded. This is useful to apply forces that change all the time, things like drag forces for instance.

abstract property is_fixed_base: bool#

Whether the articulation is a fixed-base or floating-base system.

property is_initialized: bool#

Whether the asset is initialized.

Returns True if the asset is initialized, False otherwise.

abstract property joint_names: list[str]#

Ordered names of joints in articulation.

abstract property num_bodies: int#

Number of bodies in articulation.

abstract property num_fixed_tendons: int#

Number of fixed tendons in articulation.

abstract property num_instances: int#

Number of instances of the asset.

This is equal to the number of asset instances per environment multiplied by the number of environments.

abstract property num_joints: int#

Number of joints in articulation.

abstract property num_spatial_tendons: int#

Number of spatial tendons in articulation.

abstract property permanent_wrench_composer: WrenchComposer#

Permanent wrench composer.

Returns a WrenchComposer instance. Wrenches added or set to this wrench composer are persistent and are applied to the simulation at every step. This is useful to apply forces that are constant over a period of time, things like the thrust of a motor for instance.

classmethod register(name: str, sub_class) None#

Register a new implementation class.

abstractmethod reset(env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_mask: wp.array | None = None) None#

Reset the articulation.

Caution

If both env_ids and env_mask are provided, then env_mask takes precedence over env_ids.

Parameters:
  • env_ids – Environment indices. If None, then all indices are used.

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

abstract property root_view#

Root view for the asset.

Note

Use this view with caution. It requires handling of tensors in a specific way.

set_coms(coms: torch.Tensor | wp.array, body_ids: Sequence[int] | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_coms_index().

abstractmethod set_coms_index(*, coms: torch.Tensor | wp.array, body_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set center of mass pose of all bodies in their respective body link frames.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • coms – Center of mass pose of all bodies. Shape is (len(env_ids), len(body_ids), 7) or (len(env_ids), len(body_ids)) with dtype wp.transformf.

  • body_ids – The body indices to set the center of mass pose for. Defaults to None (all bodies).

  • env_ids – The environment indices to set the center of mass pose for. Defaults to None (all instances).

abstractmethod set_coms_mask(*, coms: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set center of mass pose of all bodies in their respective body link frames.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • coms – Center of mass pose of all bodies. Shape is (num_instances, num_bodies, 7) or (num_instances, num_bodies) with dtype wp.transformf.

  • body_mask – Body mask. If None, then all the bodies are updated. Shape is (num_bodies,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_debug_vis(debug_vis: bool) bool#

Sets whether to visualize the asset data.

Parameters:

debug_vis – Whether to visualize the asset data.

Returns:

Whether the debug visualization was successfully set. False if the asset does not support debug visualization.

set_external_force_and_torque(forces: torch.Tensor | wp.array, torques: torch.Tensor | wp.array, positions: torch.Tensor | wp.array | None = None, body_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, is_global: bool = False) None#

Deprecated, same as permanent_wrench_composer.set_forces_and_torques().

set_fixed_tendon_damping(damping: torch.Tensor | wp.array, fixed_tendon_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_fixed_tendon_damping_index().

abstractmethod set_fixed_tendon_damping_index(*, damping: float | torch.Tensor | wp.array, fixed_tendon_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set fixed tendon damping into internal buffers.

This function does not apply the tendon damping to the simulation. It only fills the buffers with the desired values. To apply the tendon damping, call the write_fixed_tendon_properties_to_sim_index() function.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • damping – Fixed tendon damping. Shape is (len(env_ids), len(fixed_tendon_ids)).

  • fixed_tendon_ids – The tendon indices to set the damping for. Defaults to None (all fixed tendons).

  • env_ids – The environment indices to set the damping for. Defaults to None (all instances).

abstractmethod set_fixed_tendon_damping_mask(*, damping: float | torch.Tensor | wp.array, fixed_tendon_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set fixed tendon damping into internal buffers.

This function does not apply the tendon damping to the simulation. It only fills the buffers with the desired values. To apply the tendon damping, call the write_fixed_tendon_properties_to_sim_mask() function.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • damping – Fixed tendon damping. Shape is (num_instances, num_fixed_tendons).

  • fixed_tendon_mask – Fixed tendon mask. If None, then all the fixed tendons are updated. Shape is (num_fixed_tendons,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_fixed_tendon_limit(limit: torch.Tensor | wp.array, fixed_tendon_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set fixed tendon position limits into internal buffers.

Deprecated since version 2.1.0: Please use set_fixed_tendon_position_limit() instead.

set_fixed_tendon_limit_stiffness(limit_stiffness: torch.Tensor | wp.array, fixed_tendon_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_fixed_tendon_limit_stiffness_index().

abstractmethod set_fixed_tendon_limit_stiffness_index(*, limit_stiffness: float | torch.Tensor | wp.array, fixed_tendon_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set fixed tendon limit stiffness into internal buffers.

This function does not apply the tendon limit stiffness to the simulation. It only fills the buffers with the desired values. To apply the tendon limit stiffness, call the write_fixed_tendon_properties_to_sim_index() function.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • limit_stiffness – Fixed tendon limit stiffness. Shape is (len(env_ids), len(fixed_tendon_ids)).

  • fixed_tendon_ids – The tendon indices to set the limit stiffness for. Defaults to None (all fixed tendons).

  • env_ids – The environment indices to set the limit stiffness for. Defaults to None (all instances).

abstractmethod set_fixed_tendon_limit_stiffness_mask(*, limit_stiffness: float | torch.Tensor | wp.array, fixed_tendon_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set fixed tendon limit stiffness into internal buffers.

This function does not apply the tendon limit stiffness to the simulation. It only fills the buffers with the desired values. To apply the tendon limit stiffness, call the write_fixed_tendon_properties_to_sim_mask() function.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • limit_stiffness – Fixed tendon limit stiffness. Shape is (num_instances, num_fixed_tendons).

  • fixed_tendon_mask – Fixed tendon mask. If None, then all the fixed tendons are updated. Shape is (num_fixed_tendons,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_fixed_tendon_offset(offset: torch.Tensor | wp.array, fixed_tendon_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_fixed_tendon_offset_index().

abstractmethod set_fixed_tendon_offset_index(*, offset: float | torch.Tensor | wp.array, fixed_tendon_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set fixed tendon offset into internal buffers.

This function does not apply the tendon offset to the simulation. It only fills the buffers with the desired values. To apply the tendon offset, call the write_fixed_tendon_properties_to_sim_index() function.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • offset – Fixed tendon offset. Shape is (len(env_ids), len(fixed_tendon_ids)).

  • fixed_tendon_ids – The tendon indices to set the offset for. Defaults to None (all fixed tendons).

  • env_ids – The environment indices to set the offset for. Defaults to None (all instances).

abstractmethod set_fixed_tendon_offset_mask(*, offset: float | torch.Tensor | wp.array, fixed_tendon_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set fixed tendon offset into internal buffers.

This function does not apply the tendon offset to the simulation. It only fills the buffers with the desired values. To apply the tendon offset, call the write_fixed_tendon_properties_to_sim_mask() function.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • offset – Fixed tendon offset. Shape is (num_instances, num_fixed_tendons).

  • fixed_tendon_mask – Fixed tendon mask. If None, then all the fixed tendons are updated. Shape is (num_fixed_tendons,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_fixed_tendon_position_limit(limit: torch.Tensor | wp.array, fixed_tendon_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_fixed_tendon_position_limit_index().

abstractmethod set_fixed_tendon_position_limit_index(*, limit: float | torch.Tensor | wp.array, fixed_tendon_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set fixed tendon position limits into internal buffers.

This function does not apply the tendon limit to the simulation. It only fills the buffers with the desired values. To apply the tendon limit, call the write_fixed_tendon_properties_to_sim_index() function.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • limit – Fixed tendon limit. Shape is (len(env_ids), len(fixed_tendon_ids)).

  • fixed_tendon_ids – The tendon indices to set the limit for. Defaults to None (all fixed tendons).

  • env_ids – The environment indices to set the limit for. Defaults to None (all instances).

abstractmethod set_fixed_tendon_position_limit_mask(*, limit: float | torch.Tensor | wp.array, fixed_tendon_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set fixed tendon position limits into internal buffers.

This function does not apply the tendon limit to the simulation. It only fills the buffers with the desired values. To apply the tendon limit, call the write_fixed_tendon_properties_to_sim_mask() function.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • limit – Fixed tendon limit. Shape is (num_instances, num_fixed_tendons).

  • fixed_tendon_mask – Fixed tendon mask. If None, then all the fixed tendons are updated. Shape is (num_fixed_tendons,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_fixed_tendon_rest_length(rest_length: torch.Tensor | wp.array, fixed_tendon_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_fixed_tendon_rest_length_index().

abstractmethod set_fixed_tendon_rest_length_index(*, rest_length: float | torch.Tensor | wp.array, fixed_tendon_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set fixed tendon rest length into internal buffers.

This function does not apply the tendon rest length to the simulation. It only fills the buffers with the desired values. To apply the tendon rest length, call the write_fixed_tendon_properties_to_sim_index() function.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • rest_length – Fixed tendon rest length. Shape is (len(env_ids), len(fixed_tendon_ids)).

  • fixed_tendon_ids – The tendon indices to set the rest length for. Defaults to None (all fixed tendons).

  • env_ids – The environment indices to set the rest length for. Defaults to None (all instances).

abstractmethod set_fixed_tendon_rest_length_mask(*, rest_length: float | torch.Tensor | wp.array, fixed_tendon_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set fixed tendon rest length into internal buffers.

This function does not apply the tendon rest length to the simulation. It only fills the buffers with the desired values. To apply the tendon rest length, call the write_fixed_tendon_properties_to_sim_mask() function.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • rest_length – Fixed tendon rest length. Shape is (num_instances, num_fixed_tendons).

  • fixed_tendon_mask – Fixed tendon mask. If None, then all the fixed tendons are updated. Shape is (num_fixed_tendons,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_fixed_tendon_stiffness(stiffness: torch.Tensor | wp.array, fixed_tendon_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_fixed_tendon_stiffness_index().

abstractmethod set_fixed_tendon_stiffness_index(*, stiffness: float | torch.Tensor | wp.array, fixed_tendon_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set fixed tendon stiffness into internal buffers.

This function does not apply the tendon stiffness to the simulation. It only fills the buffers with the desired values. To apply the tendon stiffness, call the write_fixed_tendon_properties_to_sim_index() function.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • stiffness – Fixed tendon stiffness. Shape is (len(env_ids), len(fixed_tendon_ids)).

  • fixed_tendon_ids – The tendon indices to set the stiffness for. Defaults to None (all fixed tendons).

  • env_ids – The environment indices to set the stiffness for. Defaults to None (all instances).

abstractmethod set_fixed_tendon_stiffness_mask(*, stiffness: float | torch.Tensor | wp.array, fixed_tendon_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set fixed tendon stiffness into internal buffers.

This function does not apply the tendon stiffness to the simulation. It only fills the buffers with the desired values. To apply the tendon stiffness, call the write_fixed_tendon_properties_to_sim_mask() function.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • stiffness – Fixed tendon stiffness. Shape is (num_instances, num_fixed_tendons).

  • fixed_tendon_mask – Fixed tendon mask. If None, then all the fixed tendons are updated. Shape is (num_fixed_tendons,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_inertias(inertias: torch.Tensor | wp.array, body_ids: Sequence[int] | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_inertias_index().

abstractmethod set_inertias_index(*, inertias: torch.Tensor | wp.array, body_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set inertias of all bodies in the simulation world frame.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • inertias – Inertias of all bodies. Shape is (len(env_ids), len(body_ids), 9).

  • body_ids – The body indices to set the inertias for. Defaults to None (all bodies).

  • env_ids – The environment indices to set the inertias for. Defaults to None (all instances).

abstractmethod set_inertias_mask(*, inertias: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set inertias of all bodies in the simulation world frame.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • inertias – Inertias of all bodies. Shape is (num_instances, num_bodies, 9).

  • body_mask – Body mask. If None, then all the bodies are updated. Shape is (num_bodies,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_joint_effort_target(target: torch.Tensor | wp.array, joint_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_joint_effort_target_index().

abstractmethod set_joint_effort_target_index(*, target: torch.Tensor | wp.array, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set joint efforts into internal buffers.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

This function does not apply the joint targets to the simulation. It only fills the buffers with the desired values. To apply the joint targets, call the write_data_to_sim() function.

Parameters:
  • target – Joint effort targets. Shape is (len(env_ids), len(joint_ids)).

  • joint_ids – The joint indices to set the targets for. Defaults to None (all joints).

  • env_ids – The environment indices to set the targets for. Defaults to None (all instances).

abstractmethod set_joint_effort_target_mask(*, target: torch.Tensor | wp.array, joint_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set joint efforts into internal buffers.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

This function does not apply the joint targets to the simulation. It only fills the buffers with the desired values. To apply the joint targets, call the write_data_to_sim() function.

Parameters:
  • target – Joint effort targets. Shape is (num_instances, num_joints).

  • joint_mask – Joint mask. If None, then all the joints are updated. Shape is (num_joints,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_joint_position_target(target: torch.Tensor | wp.array, joint_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_joint_position_target_index().

abstractmethod set_joint_position_target_index(*, target: torch.Tensor | wp.array, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set joint position targets into internal buffers.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

This function does not apply the joint targets to the simulation. It only fills the buffers with the desired values. To apply the joint targets, call the write_data_to_sim() function.

Parameters:
  • target – Joint position targets. Shape is (len(env_ids), len(joint_ids)).

  • joint_ids – The joint indices to set the targets for. Defaults to None (all joints).

  • env_ids – The environment indices to set the targets for. Defaults to None (all instances).

abstractmethod set_joint_position_target_mask(*, target: torch.Tensor | wp.array, joint_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set joint position targets into internal buffers.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

This function does not apply the joint targets to the simulation. It only fills the buffers with the desired values. To apply the joint targets, call the write_data_to_sim() function.

Parameters:
  • target – Joint position targets. Shape is (num_instances, num_joints).

  • joint_mask – Joint mask. If None, then all the joints are updated. Shape is (num_joints,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_joint_velocity_target(target: torch.Tensor | wp.array, joint_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_joint_velocity_target_index().

abstractmethod set_joint_velocity_target_index(*, target: torch.Tensor | wp.array, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set joint velocity targets into internal buffers.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

This function does not apply the joint targets to the simulation. It only fills the buffers with the desired values. To apply the joint targets, call the write_data_to_sim() function.

Parameters:
  • target – Joint velocity targets. Shape is (len(env_ids), len(joint_ids)).

  • joint_ids – The joint indices to set the targets for. Defaults to None (all joints).

  • env_ids – The environment indices to set the targets for. Defaults to None (all instances).

abstractmethod set_joint_velocity_target_mask(*, target: torch.Tensor | wp.array, joint_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set joint velocity targets into internal buffers.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

This function does not apply the joint targets to the simulation. It only fills the buffers with the desired values. To apply the joint targets, call the write_data_to_sim() function.

Parameters:
  • target – Joint velocity targets. Shape is (num_instances, num_joints).

  • joint_mask – Joint mask. If None, then all the joints are updated. Shape is (num_joints,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_masses(masses: torch.Tensor | wp.array, body_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_masses_index().

abstractmethod set_masses_index(*, masses: torch.Tensor | wp.array, body_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set masses of all bodies in the simulation world frame.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • masses – Masses of all bodies. Shape is (len(env_ids), len(body_ids)).

  • body_ids – The body indices to set the masses for. Defaults to None (all bodies).

  • env_ids – The environment indices to set the masses for. Defaults to None (all instances).

abstractmethod set_masses_mask(*, masses: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set masses of all bodies in the simulation world frame.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • masses – Masses of all bodies. Shape is (num_instances, num_bodies).

  • body_mask – Body mask. If None, then all the bodies are updated. Shape is (num_bodies,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_spatial_tendon_damping(damping: torch.Tensor | wp.array, spatial_tendon_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_spatial_tendon_damping_index().

abstractmethod set_spatial_tendon_damping_index(*, damping: float | torch.Tensor | wp.array, spatial_tendon_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set spatial tendon damping into internal buffers.

This function does not apply the tendon damping to the simulation. It only fills the buffers with the desired values. To apply the tendon damping, call the write_spatial_tendon_properties_to_sim_index() function.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • damping – Spatial tendon damping. Shape is (len(env_ids), len(spatial_tendon_ids)).

  • spatial_tendon_ids – The tendon indices to set the damping for. Defaults to None (all spatial tendons).

  • env_ids – The environment indices to set the damping for. Defaults to None (all instances).

abstractmethod set_spatial_tendon_damping_mask(*, damping: float | torch.Tensor | wp.array, spatial_tendon_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set spatial tendon damping into internal buffers.

This function does not apply the tendon damping to the simulation. It only fills the buffers with the desired values. To apply the tendon damping, call the write_spatial_tendon_properties_to_sim_mask() function.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • damping – Spatial tendon damping. Shape is (num_instances, num_spatial_tendons).

  • spatial_tendon_mask – Spatial tendon mask. If None, then all the spatial tendons are updated. Shape is (num_spatial_tendons,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_spatial_tendon_limit_stiffness(limit_stiffness: torch.Tensor | wp.array, spatial_tendon_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_spatial_tendon_limit_stiffness_index().

abstractmethod set_spatial_tendon_limit_stiffness_index(*, limit_stiffness: float | torch.Tensor | wp.array, spatial_tendon_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set spatial tendon limit stiffness into internal buffers.

This function does not apply the tendon limit stiffness to the simulation. It only fills the buffers with the desired values. To apply the tendon limit stiffness, call the write_spatial_tendon_properties_to_sim_index() function.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • limit_stiffness – Spatial tendon limit stiffness. Shape is (len(env_ids), len(spatial_tendon_ids)).

  • spatial_tendon_ids – The tendon indices to set the limit stiffness for. Defaults to None (all spatial tendons).

  • env_ids – The environment indices to set the limit stiffness for. Defaults to None (all instances).

abstractmethod set_spatial_tendon_limit_stiffness_mask(*, limit_stiffness: float | torch.Tensor | wp.array, spatial_tendon_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set spatial tendon limit stiffness into internal buffers.

This function does not apply the tendon limit stiffness to the simulation. It only fills the buffers with the desired values. To apply the tendon limit stiffness, call the write_spatial_tendon_properties_to_sim_mask() function.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • limit_stiffness – Spatial tendon limit stiffness. Shape is (num_instances, num_spatial_tendons).

  • spatial_tendon_mask – Spatial tendon mask. If None, then all the spatial tendons are updated. Shape is (num_spatial_tendons,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_spatial_tendon_offset(offset: torch.Tensor, spatial_tendon_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_spatial_tendon_offset_index().

abstractmethod set_spatial_tendon_offset_index(*, offset: float | torch.Tensor | wp.array, spatial_tendon_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set spatial tendon offset into internal buffers.

This function does not apply the tendon offset to the simulation. It only fills the buffers with the desired values. To apply the tendon offset, call the write_spatial_tendon_properties_to_sim_index() function.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • offset – Spatial tendon offset. Shape is (len(env_ids), len(spatial_tendon_ids)).

  • spatial_tendon_ids – The tendon indices to set the offset for. Defaults to None (all spatial tendons).

  • env_ids – The environment indices to set the offset for. Defaults to None (all instances).

abstractmethod set_spatial_tendon_offset_mask(*, offset: float | torch.Tensor | wp.array, spatial_tendon_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set spatial tendon offset into internal buffers.

This function does not apply the tendon offset to the simulation. It only fills the buffers with the desired values. To apply the tendon offset, call the write_spatial_tendon_properties_to_sim_mask() function.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • offset – Spatial tendon offset. Shape is (num_instances, num_spatial_tendons).

  • spatial_tendon_mask – Spatial tendon mask. If None, then all the spatial tendons are updated. Shape is (num_spatial_tendons,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_spatial_tendon_stiffness(stiffness: torch.Tensor | wp.array, spatial_tendon_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as set_spatial_tendon_stiffness_index().

abstractmethod set_spatial_tendon_stiffness_index(*, stiffness: float | torch.Tensor | wp.array, spatial_tendon_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set spatial tendon stiffness into internal buffers.

This function does not apply the tendon stiffness to the simulation. It only fills the buffers with the desired values. To apply the tendon stiffness, call the write_spatial_tendon_properties_to_sim_index() function.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • stiffness – Spatial tendon stiffness. Shape is (len(env_ids), len(spatial_tendon_ids)).

  • spatial_tendon_ids – The tendon indices to set the stiffness for. Defaults to None (all spatial tendons).

  • env_ids – The environment indices to set the stiffness for. Defaults to None (all instances).

abstractmethod set_spatial_tendon_stiffness_mask(*, stiffness: float | torch.Tensor | wp.array, spatial_tendon_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Set spatial tendon stiffness into internal buffers.

This function does not apply the tendon stiffness to the simulation. It only fills the buffers with the desired values. To apply the tendon stiffness, call the write_spatial_tendon_properties_to_sim_mask() function.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • stiffness – Spatial tendon stiffness. Shape is (num_instances, num_spatial_tendons).

  • spatial_tendon_mask – Spatial tendon mask. If None, then all the spatial tendons are updated. Shape is (num_spatial_tendons,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

set_visibility(visible: bool, env_ids: Sequence[int] | None = None)#

Set the visibility of the prims corresponding to the asset.

This operation affects the visibility of the prims corresponding to the asset in the USD stage. It is useful for toggling the visibility of the asset in the simulator. For instance, one can hide the asset when it is not being used to reduce the rendering overhead.

Note

This operation uses the PXR API to set the visibility of the prims. Thus, the operation may have an overhead if the number of prims is large.

Parameters:
  • visible – Whether to make the prims visible or not.

  • env_ids – The indices of the object to set visibility. Defaults to None (all instances).

abstract property spatial_tendon_names: list[str]#

Ordered names of spatial tendons in articulation.

abstractmethod update(dt: float) None#

Updates the simulation data.

Parameters:

dt – The time step size in seconds.

abstractmethod write_data_to_sim() None#

Write external wrenches and joint commands to the simulation.

If any explicit actuators are present, then the actuator models are used to compute the joint commands. Otherwise, the joint commands are directly set into the simulation.

Note

We write external wrench to the simulation here since this function is called before the simulation step. This ensures that the external wrench is applied at every simulation step.

write_fixed_tendon_properties_to_sim(fixed_tendon_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as write_fixed_tendon_properties_to_sim_index().

abstractmethod write_fixed_tendon_properties_to_sim_index(*, fixed_tendon_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Write fixed tendon properties into the simulation.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • fixed_tendon_ids – The fixed tendon indices to set the limits for. Defaults to None (all fixed tendons).

  • env_ids – The environment indices to set the limits for. Defaults to None (all instances).

abstractmethod write_fixed_tendon_properties_to_sim_mask(*, fixed_tendon_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Write fixed tendon properties into the simulation.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • fixed_tendon_mask – Fixed tendon mask. If None, then all the fixed tendons are updated. Shape is (num_fixed_tendons,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

write_joint_armature_to_sim(armature: torch.Tensor | float | wp.array, joint_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as write_joint_armature_to_sim_index().

abstractmethod write_joint_armature_to_sim_index(*, armature: torch.Tensor | float | wp.array, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Write joint armature into the simulation.

The armature is directly added to the corresponding joint-space inertia. It helps improve the simulation stability by reducing the joint velocities.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • armature – Joint armature. Shape is (len(env_ids), len(joint_ids)).

  • joint_ids – The joint indices to set the joint torque limits for. Defaults to None (all joints).

  • env_ids – The environment indices to set the joint torque limits for. Defaults to None (all instances).

abstractmethod write_joint_armature_to_sim_mask(*, armature: torch.Tensor | float | wp.array, joint_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Write joint armature into the simulation.

The armature is directly added to the corresponding joint-space inertia. It helps improve the simulation stability by reducing the joint velocities.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • armature – Joint armature. Shape is (num_instances, num_joints).

  • joint_mask – Joint mask. If None, then all the joints are updated. Shape is (num_joints,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

write_joint_damping_to_sim(damping: torch.Tensor | float | wp.array, joint_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as write_joint_damping_to_sim_index().

abstractmethod write_joint_damping_to_sim_index(*, damping: torch.Tensor | float | wp.array, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Write joint damping into the simulation.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • damping – Joint damping. Shape is (len(env_ids), len(joint_ids)).

  • joint_ids – The joint indices to set the damping for. Defaults to None (all joints).

  • env_ids – The environment indices to set the damping for. Defaults to None (all instances).

abstractmethod write_joint_damping_to_sim_mask(*, damping: torch.Tensor | float | wp.array, joint_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Write joint damping into the simulation.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • damping – Joint damping. Shape is (num_instances, num_joints).

  • joint_mask – Joint mask. If None, then all the joints are updated. Shape is (num_joints,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

write_joint_effort_limit_to_sim(limits: torch.Tensor | float | wp.array, joint_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as write_joint_effort_limit_to_sim_index().

abstractmethod write_joint_effort_limit_to_sim_index(*, limits: torch.Tensor | float | wp.array, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Write joint effort limits into the simulation.

The effort limit is used to constrain the computed joint efforts in the physics engine. If the computed effort exceeds this limit, the physics engine will clip the effort to this value.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • limits – Joint torque limits. Shape is (len(env_ids), len(joint_ids)).

  • joint_ids – The joint indices to set the joint torque limits for. Defaults to None (all joints).

  • env_ids – The environment indices to set the joint torque limits for. Defaults to None (all instances).

abstractmethod write_joint_effort_limit_to_sim_mask(*, limits: torch.Tensor | float | wp.array, joint_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Write joint effort limits into the simulation.

The effort limit is used to constrain the computed joint efforts in the physics engine. If the computed effort exceeds this limit, the physics engine will clip the effort to this value.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • limits – Joint torque limits. Shape is (num_instances, num_joints).

  • joint_mask – Joint mask. If None, then all the joints are updated. Shape is (num_joints,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

write_joint_friction_coefficient_to_sim(joint_friction_coeff: torch.Tensor | float | wp.array, joint_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as write_joint_friction_coefficient_to_sim_index().

abstractmethod write_joint_friction_coefficient_to_sim_index(*, joint_friction_coeff: torch.Tensor | float | wp.array, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Write joint static friction coefficients into the simulation.

The joint static friction is a unitless quantity. It relates the magnitude of the spatial force transmitted from the parent body to the child body to the maximal static friction force that may be applied by the solver to resist the joint motion.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • joint_friction_coeff – Joint static friction coefficient. Shape is (len(env_ids), len(joint_ids)).

  • joint_ids – The joint indices to set the joint torque limits for. Defaults to None (all joints).

  • env_ids – The environment indices to set the joint torque limits for. Defaults to None (all instances).

abstractmethod write_joint_friction_coefficient_to_sim_mask(*, joint_friction_coeff: torch.Tensor | float | wp.array, joint_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Write joint static friction coefficients into the simulation.

The joint static friction is a unitless quantity. It relates the magnitude of the spatial force transmitted from the parent body to the child body to the maximal static friction force that may be applied by the solver to resist the joint motion.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • joint_friction_coeff – Joint static friction coefficient. Shape is (num_instances, num_joints).

  • joint_mask – Joint mask. If None, then all the joints are updated. Shape is (num_joints,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

write_joint_friction_to_sim(joint_friction: torch.Tensor | float | wp.array, joint_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Write joint friction coefficients into the simulation.

Deprecated since version 2.1.0: Please use write_joint_friction_coefficient_to_sim() instead.

write_joint_limits_to_sim(limits: torch.Tensor | float | wp.array, joint_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, warn_limit_violation: bool = True) None#

Write joint limits into the simulation.

Deprecated since version 2.1.0: Please use write_joint_position_limit_to_sim() instead.

write_joint_position_limit_to_sim(limits: torch.Tensor | float | wp.array, joint_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, warn_limit_violation: bool = True) None#

Deprecated, same as write_joint_position_limit_to_sim_index().

abstractmethod write_joint_position_limit_to_sim_index(*, limits: torch.Tensor | float | wp.array, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, warn_limit_violation: bool = True) None#

Write joint position limits into the simulation.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • limits – Joint limits. Shape is (len(env_ids), len(joint_ids), 2) or (len(env_ids), len(joint_ids)) with dtype wp.vec2f.

  • joint_ids – The joint indices to set the limits for. Defaults to None (all joints).

  • env_ids – The environment indices to set the limits for. Defaults to None (all instances).

  • warn_limit_violation – Whether to use warning or info level logging when default joint positions exceed the new limits. Defaults to True.

abstractmethod write_joint_position_limit_to_sim_mask(*, limits: torch.Tensor | float | wp.array, joint_mask: wp.array | None = None, env_mask: wp.array | None = None, warn_limit_violation: bool = True) None#

Write joint position limits into the simulation.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • limits – Joint limits. Shape is (num_instances, num_joints, 2) or (num_instances, num_joints) with dtype wp.vec2f.

  • joint_mask – Joint mask. If None, then all the joints are updated. Shape is (num_joints,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

  • warn_limit_violation – Whether to use warning or info level logging when default joint positions exceed the new limits. Defaults to True.

write_joint_position_to_sim(position: torch.Tensor | wp.array, joint_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | slice | None = None) None#

Deprecated, same as write_joint_position_to_sim_index().

abstractmethod write_joint_position_to_sim_index(*, position: torch.Tensor | wp.array, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Write joint positions to the simulation.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • position – Joint positions. Shape is (len(env_ids), len(joint_ids)).

  • joint_ids – The joint indices to set the targets for. Defaults to None (all joints).

  • env_ids – The environment indices to set the targets for. Defaults to None (all instances).

abstractmethod write_joint_position_to_sim_mask(*, position: torch.Tensor | wp.array, joint_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Write joint positions to the simulation.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • position – Joint positions. Shape is (num_instances, num_joints).

  • joint_mask – Joint mask. If None, then all the joints are updated. Shape is (num_joints,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

abstractmethod write_joint_state_to_sim(position: torch.Tensor | wp.array, velocity: torch.Tensor | wp.array, joint_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | slice | None = None) None#

Deprecated, same as write_joint_position_to_sim_index() and write_joint_velocity_to_sim_index().

write_joint_stiffness_to_sim(stiffness: torch.Tensor | float | wp.array, joint_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as write_joint_stiffness_to_sim_index().

abstractmethod write_joint_stiffness_to_sim_index(*, stiffness: torch.Tensor | float | wp.array, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Write joint stiffness into the simulation.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • stiffness – Joint stiffness. Shape is (len(env_ids), len(joint_ids)).

  • joint_ids – The joint indices to set the stiffness for. Defaults to None (all joints).

  • env_ids – The environment indices to set the stiffness for. Defaults to None (all instances).

abstractmethod write_joint_stiffness_to_sim_mask(*, stiffness: torch.Tensor | float | wp.array, joint_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Write joint stiffness into the simulation.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • stiffness – Joint stiffness. Shape is (num_instances, num_joints).

  • joint_mask – Joint mask. If None, then all the joints are updated. Shape is (num_joints,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

write_joint_velocity_limit_to_sim(limits: torch.Tensor | float | wp.array, joint_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as write_joint_velocity_limit_to_sim_index().

abstractmethod write_joint_velocity_limit_to_sim_index(*, limits: torch.Tensor | float | wp.array, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Write joint max velocity to the simulation.

The velocity limit is used to constrain the joint velocities in the physics engine. The joint will only be able to reach this velocity if the joint’s effort limit is sufficiently large. If the joint is moving faster than this velocity, the physics engine will actually try to brake the joint to reach this velocity.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • limits – Joint max velocity. Shape is (len(env_ids), len(joint_ids)).

  • joint_ids – The joint indices to set the max velocity for. Defaults to None (all joints).

  • env_ids – The environment indices to set the max velocity for. Defaults to None (all instances).

abstractmethod write_joint_velocity_limit_to_sim_mask(*, limits: torch.Tensor | float | wp.array, joint_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Write joint max velocity to the simulation.

The velocity limit is used to constrain the joint velocities in the physics engine. The joint will only be able to reach this velocity if the joint’s effort limit is sufficiently large. If the joint is moving faster than this velocity, the physics engine will actually try to brake the joint to reach this velocity.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • limits – Joint max velocity. Shape is (num_instances, num_joints).

  • joint_mask – Joint mask. If None, then all the joints are updated. Shape is (num_joints,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

write_joint_velocity_to_sim(velocity: torch.Tensor | wp.array, joint_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | slice | None = None) None#

Deprecated, same as write_joint_velocity_to_sim_index().

abstractmethod write_joint_velocity_to_sim_index(*, velocity: torch.Tensor | wp.array, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Write joint velocities to the simulation.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • velocity – Joint velocities. Shape is (len(env_ids), len(joint_ids)).

  • joint_ids – The joint indices to set the targets for. Defaults to None (all joints).

  • env_ids – The environment indices to set the targets for. Defaults to None (all instances).

abstractmethod write_joint_velocity_to_sim_mask(*, velocity: torch.Tensor | wp.array, joint_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Write joint velocities to the simulation.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • velocity – Joint velocities. Shape is (num_instances, num_joints).

  • joint_mask – Joint mask. If None, then all the joints are updated. Shape is (num_joints,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

write_root_com_pose_to_sim(root_pose: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as write_root_com_pose_to_sim_index().

abstractmethod write_root_com_pose_to_sim_index(*, root_pose: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set the root center of mass pose over selected environment indices into the simulation.

The root pose comprises of the cartesian position and quaternion orientation in (x, y, z, w). The orientation is the orientation of the principal axes of inertia.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_pose – Root center of mass poses in simulation frame. Shape is (len(env_ids), 7) or (len(env_ids),) with dtype wp.transformf.

  • env_ids – Environment indices. If None, then all indices are used.

abstractmethod write_root_com_pose_to_sim_mask(*, root_pose: torch.Tensor | wp.array, env_mask: wp.array | None = None) None#

Set the root center of mass pose over selected environment mask into the simulation.

The root pose comprises of the cartesian position and quaternion orientation in (x, y, z, w). The orientation is the orientation of the principal axes of inertia.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_pose – Root center of mass poses in simulation frame. Shape is (num_instances, 7) or (num_instances,) with dtype wp.transformf.

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

abstractmethod write_root_com_state_to_sim(root_state: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as write_root_com_pose_to_sim_index() and write_root_velocity_to_sim_index().

write_root_com_velocity_to_sim(root_velocity: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as write_root_com_velocity_to_sim_index().

abstractmethod write_root_com_velocity_to_sim_index(*, root_velocity: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set the root center of mass velocity over selected environment indices into the simulation.

The velocity comprises linear velocity (x, y, z) and angular velocity (x, y, z) in that order.

Note

This sets the velocity of the root’s center of mass rather than the root’s frame.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_velocity – Root center of mass velocities in simulation world frame. Shape is (len(env_ids), 6) or (len(env_ids),) with dtype wp.spatial_vectorf.

  • env_ids – Environment indices. If None, then all indices are used.

abstractmethod write_root_com_velocity_to_sim_mask(*, root_velocity: torch.Tensor | wp.array, env_mask: wp.array | None = None) None#

Set the root center of mass velocity over selected environment mask into the simulation.

The velocity comprises linear velocity (x, y, z) and angular velocity (x, y, z) in that order.

Note

This sets the velocity of the root’s center of mass rather than the root’s frame.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_velocity – Root center of mass velocities in simulation world frame. Shape is (num_instances, 6) or (num_instances,) with dtype wp.spatial_vectorf.

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

Deprecated, same as write_root_link_pose_to_sim_index().

Set the root link pose over selected environment indices into the simulation.

The root pose comprises of the cartesian position and quaternion orientation in (x, y, z, w).

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_pose – Root poses in simulation frame. Shape is (len(env_ids), 7) or (len(env_ids),) with dtype wp.transformf.

  • env_ids – Environment indices. If None, then all indices are used.

Set the root link pose over selected environment mask into the simulation.

The root pose comprises of the cartesian position and quaternion orientation in (x, y, z, w).

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_pose – Root poses in simulation frame. Shape is (num_instances, 7) or (num_instances,) with dtype wp.transformf.

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

Deprecated, same as write_root_pose_to_sim_index() and write_root_link_velocity_to_sim_index().

Deprecated, same as write_root_link_velocity_to_sim_index().

Set the root link velocity over selected environment indices into the simulation.

The velocity comprises linear velocity (x, y, z) and angular velocity (x, y, z) in that order.

Note

This sets the velocity of the root’s frame rather than the root’s center of mass.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_velocity – Root frame velocities in simulation world frame. Shape is (len(env_ids), 6) or (len(env_ids),) with dtype wp.spatial_vectorf.

  • env_ids – Environment indices. If None, then all indices are used.

Set the root link velocity over selected environment mask into the simulation.

The velocity comprises linear velocity (x, y, z) and angular velocity (x, y, z) in that order.

Note

This sets the velocity of the root’s frame rather than the root’s center of mass.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_velocity – Root frame velocities in simulation world frame. Shape is (num_instances, 6) or (num_instances,) with dtype wp.spatial_vectorf.

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

write_root_pose_to_sim(root_pose: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as write_root_pose_to_sim_index().

abstractmethod write_root_pose_to_sim_index(*, root_pose: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set the root pose over selected environment indices into the simulation.

The root pose comprises of the cartesian position and quaternion orientation in (x, y, z, w).

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_pose – Root poses in simulation frame. Shape is (len(env_ids), 7) or (len(env_ids),) with dtype wp.transformf.

  • env_ids – Environment indices. If None, then all indices are used.

abstractmethod write_root_pose_to_sim_mask(*, root_pose: torch.Tensor | wp.array, env_mask: wp.array | None = None) None#

Set the root pose over selected environment mask into the simulation.

The root pose comprises of the cartesian position and quaternion orientation in (x, y, z, w).

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_pose – Root poses in simulation frame. Shape is (num_instances, 7) or (num_instances,) with dtype wp.transformf.

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

abstractmethod write_root_state_to_sim(root_state: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as write_root_pose_to_sim_index() and write_root_velocity_to_sim_index().

write_root_velocity_to_sim(root_velocity: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as write_root_velocity_to_sim_index().

abstractmethod write_root_velocity_to_sim_index(*, root_velocity: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Set the root center of mass velocity over selected environment indices into the simulation.

The velocity comprises linear velocity (x, y, z) and angular velocity (x, y, z) in that order.

Note

This sets the velocity of the root’s center of mass rather than the root’s frame.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_velocity – Root center of mass velocities in simulation world frame. Shape is (len(env_ids), 6) or (len(env_ids),) with dtype wp.spatial_vectorf.

  • env_ids – Environment indices. If None, then all indices are used.

abstractmethod write_root_velocity_to_sim_mask(*, root_velocity: torch.Tensor | wp.array, env_mask: wp.array | None = None) None#

Set the root center of mass velocity over selected environment mask into the simulation.

The velocity comprises linear velocity (x, y, z) and angular velocity (x, y, z) in that order.

Note

This sets the velocity of the root’s center of mass rather than the root’s frame.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • root_velocity – Root center of mass velocities in simulation world frame. Shape is (num_instances, 6) or (num_instances,) with dtype wp.spatial_vectorf.

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

write_spatial_tendon_properties_to_sim(spatial_tendon_ids: Sequence[int] | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated, same as write_spatial_tendon_properties_to_sim_index().

abstractmethod write_spatial_tendon_properties_to_sim_index(*, spatial_tendon_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Write spatial tendon properties into the simulation.

Note

This method expects partial data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • spatial_tendon_ids – The spatial tendon indices to set the properties for. Defaults to None (all spatial tendons).

  • env_ids – The environment indices to set the properties for. Defaults to None (all instances).

abstractmethod write_spatial_tendon_properties_to_sim_mask(*, spatial_tendon_mask: wp.array | None = None, env_mask: wp.array | None = None) None#

Write spatial tendon properties into the simulation.

Note

This method expects full data.

Tip

For maximum performance we recommend looking at the actual implementation of the method in the backend. Some backends may provide optimized implementations for masks / indices.

Parameters:
  • spatial_tendon_mask – Spatial tendon mask. If None, then all the spatial tendons are updated. Shape is (num_spatial_tendons,).

  • env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).

cfg: ArticulationCfg#

Configuration instance for the articulations.

actuators: dict#

Dictionary of actuator instances for the articulation.

The keys are the actuator names and the values are the actuator instances. The actuator instances are initialized based on the actuator configurations specified in the ArticulationCfg.actuators attribute. They are used to compute the joint commands during the write_data_to_sim() function.

class isaaclab.assets.ArticulationData[source]#

Bases: FactoryBase

Factory for creating articulation data instances.

Methods:

__new__(cls, *args, **kwargs)

Create a new instance of an articulation data based on the backend.

get_registry_keys()

Returns a list of registered backend names.

register(name, sub_class)

Register a new implementation class.

static __new__(cls, *args, **kwargs) BaseArticulationData | PhysXArticulationData[source]#

Create a new instance of an articulation data based on the backend.

classmethod get_registry_keys() list[str]#

Returns a list of registered backend names.

classmethod register(name: str, sub_class) None#

Register a new implementation class.

class isaaclab.assets.ArticulationCfg[source]#

Bases: AssetBaseCfg

Configuration parameters for an articulation.

Classes:

InitialStateCfg

Initial state of the articulation.

Attributes:

prim_path

Prim path (or expression) to the asset.

spawn

Spawn configuration for the asset.

collision_group

Collision group of the asset.

debug_vis

Whether to enable debug visualization for the asset.

articulation_root_prim_path

Path to the articulation root prim under the prim_path.

init_state

Initial state of the articulated object.

soft_joint_pos_limit_factor

Fraction specifying the range of joint position limits (parsed from the asset) to use.

actuators

Actuators for the robot with corresponding joint names.

actuator_value_resolution_debug_print

Print the resolution of actuator final value when input cfg is different from USD value, Defaults to False

class InitialStateCfg[source]#

Bases: InitialStateCfg

Initial state of the articulation.

Attributes:

lin_vel

Linear velocity of the root in simulation world frame.

ang_vel

Angular velocity of the root in simulation world frame.

joint_pos

Joint positions of the joints.

joint_vel

Joint velocities of the joints.

pos

Position of the root in simulation world frame.

rot

Quaternion rotation (x, y, z, w) of the root in simulation world frame.

lin_vel: tuple[float, float, float]#

Linear velocity of the root in simulation world frame. Defaults to (0.0, 0.0, 0.0).

ang_vel: tuple[float, float, float]#

Angular velocity of the root in simulation world frame. Defaults to (0.0, 0.0, 0.0).

joint_pos: dict[str, float]#

Joint positions of the joints. Defaults to 0.0 for all joints.

joint_vel: dict[str, float]#

Joint velocities of the joints. Defaults to 0.0 for all joints.

pos: tuple[float, float, float]#

Position of the root in simulation world frame. Defaults to (0.0, 0.0, 0.0).

rot: tuple[float, float, float, float]#

Quaternion rotation (x, y, z, w) of the root in simulation world frame. Defaults to (0.0, 0.0, 0.0, 1.0).

prim_path: str#

Prim path (or expression) to the asset.

Note

The expression can contain the environment namespace regex {ENV_REGEX_NS} which will be replaced with the environment namespace.

Example: {ENV_REGEX_NS}/Robot will be replaced with /World/envs/env_.*/Robot.

spawn: SpawnerCfg | None#

Spawn configuration for the asset. Defaults to None.

If None, then no prims are spawned by the asset class. Instead, it is assumed that the asset is already present in the scene.

collision_group: Literal[0, -1]#

Collision group of the asset. Defaults to 0.

  • -1: global collision group (collides with all assets in the scene).

  • 0: local collision group (collides with other assets in the same environment).

debug_vis: bool#

Whether to enable debug visualization for the asset. Defaults to False.

articulation_root_prim_path: str | None#

Path to the articulation root prim under the prim_path. Defaults to None, in which case the class will search for a prim with the USD ArticulationRootAPI on it.

This path should be relative to the prim_path of the asset. If the asset is loaded from a USD file, this path should be relative to the root of the USD stage. For instance, if the loaded USD file at prim_path contains two articulations, one at /robot1 and another at /robot2, and you want to use robot2, then you should set this to /robot2.

The path must start with a slash (/).

init_state: InitialStateCfg#

Initial state of the articulated object. Defaults to identity pose with zero velocity and zero joint state.

soft_joint_pos_limit_factor: float#

Fraction specifying the range of joint position limits (parsed from the asset) to use. Defaults to 1.0.

The soft joint position limits are scaled by this factor to specify a safety region within the simulated joint position limits. This isn’t used by the simulation, but is useful for learning agents to prevent the joint positions from violating the limits, such as for termination conditions.

The soft joint position limits are accessible through the ArticulationData.soft_joint_pos_limits attribute.

actuators: dict[str, ActuatorBaseCfg]#

Actuators for the robot with corresponding joint names.

actuator_value_resolution_debug_print: bool#

Print the resolution of actuator final value when input cfg is different from USD value, Defaults to False