isaaclab_physx.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
datainstance. However, they do not write the data into the simulator. The writing of data only happens when thewrite_data_to_sim()method is called.write_xxx_to_sim(): These are used to set the buffers into the
datainstance and write the corresponding data into the simulator as well.update(dt): These are used to update the buffers in the
datainstance. 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
An articulation asset class. |
|
Data container for an articulation. |
|
A rigid object asset class. |
|
Data container for a rigid object. |
|
A rigid object collection class. |
|
Data container for a rigid object collection. |
|
A deformable object asset class. |
|
Data container for a deformable object. |
|
Configuration parameters for a deformable object. |
|
A surface gripper actuator class. |
|
Configuration parameters for a surface gripper actuator. |
Articulation#
- class isaaclab_physx.assets.Articulation[source]#
Bases:
BaseArticulationAn articulation asset class.
An articulation is a collection of rigid bodies connected by joints. The joints can be either fixed or actuated. The joints can be of different types, such as revolute, prismatic, D-6, etc. However, the articulation class has currently been tested with revolute and prismatic joints. The class supports both floating-base and fixed-base articulations. The type of articulation is determined based on the root joint of the articulation. If the root joint is fixed, then the articulation is considered a fixed-base system. Otherwise, it is considered a floating-base system. This can be checked using the
Articulation.is_fixed_baseattribute.For an asset to be considered an articulation, the root prim of the asset must have the USD ArticulationRootAPI. This API is used to define the sub-tree of the articulation using the reduced coordinate formulation. On playing the simulation, the physics engine parses the articulation root prim and creates the corresponding articulation in the physics engine. The articulation root prim can be specified using the
AssetBaseCfg.prim_pathattribute.The articulation class also provides the functionality to augment the simulation of an articulated system with custom actuator models. These models can either be explicit or implicit, as detailed in the
isaaclab.actuatorsmodule. The actuator models are specified using theArticulationCfg.actuatorsattribute. These are then parsed and used to initialize the corresponding actuator models, when the simulation is played.During the simulation step, the articulation class first applies the actuator models to compute the joint commands based on the user-specified targets. These joint commands are then applied into the simulation. The joint commands can be either position, velocity, or effort commands. As an example, the following snippet shows how this can be used for position commands:
# an example instance of the articulation class my_articulation = Articulation(cfg) # set joint position targets my_articulation.set_joint_position_target(position) # propagate the actuator models and apply the computed commands into the simulation my_articulation.write_data_to_sim() # step the simulation using the simulation context sim_context.step() # update the articulation state, where dt is the simulation time step my_articulation.update(dt)
Attributes:
Configuration instance for the articulations.
Dictionary of actuator instances for the articulation.
Data related to the asset.
Number of instances of the asset.
Whether the articulation is a fixed-base or floating-base system.
Number of joints in articulation.
Number of fixed tendons in articulation.
Number of spatial tendons in articulation.
Number of bodies in articulation.
Ordered names of joints in articulation.
Ordered names of fixed tendons in articulation.
Ordered names of spatial tendons in articulation.
Ordered names of bodies in articulation.
Root view for the asset.
Instantaneous wrench composer.
Permanent wrench composer.
Deprecated property.
Memory device for computation.
Whether the asset has a debug visualization implemented.
Whether the asset is initialized.
Methods:
__init__(cfg)Initialize the articulation.
reset([env_ids, env_mask])Reset the articulation.
Write external wrenches and joint commands to the simulation.
update(dt)Updates the simulation data.
find_bodies(name_keys[, preserve_order])Find bodies 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_fixed_tendons(name_keys[, ...])Find fixed tendons in the articulation based on the name keys.
find_spatial_tendons(name_keys[, ...])Find spatial tendons in the articulation based on the name keys.
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_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_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_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.
Set the root center of mass velocity over selected environment indices into the simulation.
Set the root center of mass velocity over selected environment mask into the simulation.
Set the root link velocity over selected environment indices into the simulation.
Set the root link velocity over selected environment mask into the simulation.
write_joint_state_to_sim_mask(*, position, ...)Write joint positions and velocities over selected environment mask into the simulation.
write_joint_position_to_sim_index(*, position)Write joint positions over selected environment indices into the simulation.
write_joint_position_to_sim_mask(*, position)Write joint positions over selected environment mask into the simulation.
write_joint_velocity_to_sim_index(*, velocity)Write joint velocities to the simulation.
write_joint_velocity_to_sim_mask(*, velocity)Write joint velocities over selected environment mask into the simulation.
write_joint_stiffness_to_sim_index(*, stiffness)Write joint stiffness over selected environment indices into the simulation.
write_joint_stiffness_to_sim_mask(*, stiffness)Write joint stiffness over selected environment mask into the simulation.
write_joint_damping_to_sim_index(*, damping)Write joint damping over selected environment indices into the simulation.
write_joint_damping_to_sim_mask(*, damping)Write joint damping over selected environment mask into the simulation.
Write joint position limits over selected environment indices into the simulation.
write_joint_position_limit_to_sim_mask(*, limits)Write joint position limits over selected environment mask into the simulation.
Write joint max velocity over selected environment indices into the simulation.
write_joint_velocity_limit_to_sim_mask(*, limits)Write joint max velocity over selected environment mask into the simulation.
write_joint_effort_limit_to_sim_index(*, limits)Write joint effort limits over selected environment indices into the simulation.
write_joint_effort_limit_to_sim_mask(*, limits)Write joint effort limits over selected environment mask into the simulation.
write_joint_armature_to_sim_index(*, armature)Write joint armature over selected environment indices into the simulation.
write_joint_armature_to_sim_mask(*, armature)Write joint armature over selected environment mask into the simulation.
Write joint friction coefficients over selected environment indices into the simulation.
Write joint friction coefficients over selected environment mask into the simulation.
write_joint_dynamic_friction_coefficient_to_sim_index(*, ...)Write joint dynamic friction coefficient over selected environment indices into the simulation.
write_joint_dynamic_friction_coefficient_to_sim_mask(*, ...)Write joint dynamic friction coefficient over selected environment mask into the simulation.
write_joint_viscous_friction_coefficient_to_sim_index(*, ...)Write joint viscous friction coefficient over selected environment indices into the simulation.
write_joint_viscous_friction_coefficient_to_sim_mask(*, ...)Write joint viscous friction coefficient over selected environment mask into the simulation.
set_masses_index(*, masses[, body_ids, ...])Set masses of all bodies using indices.
set_masses_mask(*, masses[, body_mask, env_mask])Set masses of all bodies using masks.
set_coms_index(*, coms[, body_ids, env_ids, ...])Set center of mass pose of all bodies using indices.
set_coms_mask(*, coms[, body_mask, env_mask])Set center of mass pose of all bodies using masks.
set_inertias_index(*, inertias[, body_ids, ...])Set inertias of all bodies using indices.
set_inertias_mask(*, inertias[, body_mask, ...])Set inertias of all bodies using masks.
set_joint_position_target_index(*, target[, ...])Set joint position targets into internal buffers using indices.
set_joint_position_target_mask(*, target[, ...])Set joint position targets into internal buffers using masks.
set_joint_velocity_target_index(*, target[, ...])Set joint velocity targets into internal buffers using indices.
set_joint_velocity_target_mask(*, target[, ...])Set joint velocity targets into internal buffers using masks.
set_joint_effort_target_index(*, target[, ...])Set joint efforts into internal buffers using indices.
set_joint_effort_target_mask(*, target[, ...])Set joint efforts into internal buffers using masks.
set_fixed_tendon_stiffness_index(*, stiffness)Set fixed tendon stiffness into internal buffers using indices.
set_fixed_tendon_stiffness_mask(*, stiffness)Set fixed tendon stiffness into internal buffers using masks.
set_fixed_tendon_damping_index(*, damping[, ...])Set fixed tendon damping into internal buffers using indices.
set_fixed_tendon_damping_mask(*, damping[, ...])Set fixed tendon damping into internal buffers using masks.
Set fixed tendon limit stiffness into internal buffers using indices.
Set fixed tendon limit stiffness into internal buffers using masks.
set_fixed_tendon_position_limit_index(*, limit)Set fixed tendon position limit into internal buffers using indices.
set_fixed_tendon_position_limit_mask(*, limit)Set fixed tendon position limit into internal buffers using masks.
set_fixed_tendon_rest_length_index(*, ...[, ...])Set fixed tendon rest length into internal buffers using indices.
set_fixed_tendon_rest_length_mask(*, rest_length)Set fixed tendon rest length into internal buffers using masks.
set_fixed_tendon_offset_index(*, offset[, ...])Set fixed tendon offset into internal buffers using indices.
set_fixed_tendon_offset_mask(*, offset[, ...])Set fixed tendon offset into internal buffers using masks.
Write fixed tendon properties into the simulation using indices.
Write fixed tendon properties into the simulation using masks.
set_spatial_tendon_stiffness_index(*, stiffness)Set spatial tendon stiffness into internal buffers using indices.
set_spatial_tendon_stiffness_mask(*, stiffness)Set spatial tendon stiffness into internal buffers using masks.
set_spatial_tendon_damping_index(*, damping)Set spatial tendon damping into internal buffers using indices.
set_spatial_tendon_damping_mask(*, damping)Set spatial tendon damping into internal buffers using masks.
Set spatial tendon limit stiffness into internal buffers using indices.
Set spatial tendon limit stiffness into internal buffers using masks.
set_spatial_tendon_offset_index(*, offset[, ...])Set spatial tendon offset into internal buffers using indices.
set_spatial_tendon_offset_mask(*, offset[, ...])Set spatial tendon offset into internal buffers using masks.
Write spatial tendon properties into the simulation using indices.
Write spatial tendon properties into the simulation using masks.
Deprecated, same as
write_joint_friction_coefficient_to_sim_index().Deprecated, same as
write_joint_viscous_friction_coefficient_to_sim_index().Deprecated, same as
write_joint_dynamic_friction_coefficient_to_sim_index().write_root_state_to_sim(root_state[, env_ids])Deprecated, same as
write_root_link_pose_to_sim_index()andwrite_root_com_velocity_to_sim_index().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.
set_coms(coms[, body_ids, env_ids])Deprecated, same as
set_coms_index().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_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_offset(offset[, ...])Deprecated, same as
set_fixed_tendon_offset_index().set_fixed_tendon_position_limit(limit[, ...])Deprecated, same as
set_fixed_tendon_position_limit_index().set_fixed_tendon_rest_length(rest_length[, ...])Deprecated, same as
set_fixed_tendon_rest_length_index().set_fixed_tendon_stiffness(stiffness[, ...])Deprecated, same as
set_fixed_tendon_stiffness_index().set_inertias(inertias[, body_ids, env_ids])Deprecated, same as
set_inertias_index().set_joint_effort_target(target[, joint_ids, ...])Deprecated, same as
set_joint_effort_target_index().set_joint_position_target(target[, ...])Deprecated, same as
set_joint_position_target_index().set_joint_velocity_target(target[, ...])Deprecated, same as
set_joint_velocity_target_index().set_masses(masses[, body_ids, env_ids])Deprecated, same as
set_masses_index().set_spatial_tendon_damping(damping[, ...])Deprecated, same as
set_spatial_tendon_damping_index().set_spatial_tendon_limit_stiffness(...[, ...])Deprecated, same as
set_spatial_tendon_limit_stiffness_index().set_spatial_tendon_offset(offset[, ...])Deprecated, same as
set_spatial_tendon_offset_index().set_spatial_tendon_stiffness(stiffness[, ...])Deprecated, same as
set_spatial_tendon_stiffness_index().set_visibility(visible[, env_ids])Set the visibility of the prims corresponding to the asset.
Deprecated, same as
write_fixed_tendon_properties_to_sim_index().write_joint_armature_to_sim(armature[, ...])Deprecated, same as
write_joint_armature_to_sim_index().write_joint_damping_to_sim(damping[, ...])Deprecated, same as
write_joint_damping_to_sim_index().write_joint_effort_limit_to_sim(limits[, ...])Deprecated, same as
write_joint_effort_limit_to_sim_index().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_to_sim(position[, ...])Deprecated, same as
write_joint_position_to_sim_index().write_joint_stiffness_to_sim(stiffness[, ...])Deprecated, same as
write_joint_stiffness_to_sim_index().write_joint_velocity_limit_to_sim(limits[, ...])Deprecated, same as
write_joint_velocity_limit_to_sim_index().write_joint_velocity_to_sim(velocity[, ...])Deprecated, same as
write_joint_velocity_to_sim_index().write_root_com_pose_to_sim(root_pose[, env_ids])Deprecated, same as
write_root_com_pose_to_sim_index().write_root_com_state_to_sim(root_state[, ...])Deprecated, same as
write_root_com_pose_to_sim_index()andwrite_root_com_velocity_to_sim_index().write_root_com_velocity_to_sim(root_velocity)Deprecated, same as
write_root_com_velocity_to_sim_index().write_root_link_pose_to_sim(root_pose[, env_ids])Deprecated, same as
write_root_link_pose_to_sim_index().write_root_link_velocity_to_sim(root_velocity)Deprecated, same as
write_root_link_velocity_to_sim_index().write_root_pose_to_sim(root_pose[, env_ids])Deprecated, same as
write_root_pose_to_sim_index().write_root_velocity_to_sim(root_velocity[, ...])Deprecated, same as
write_root_velocity_to_sim_index().Deprecated, same as
write_spatial_tendon_properties_to_sim_index().write_root_link_state_to_sim(root_state[, ...])Deprecated, same as
write_root_link_pose_to_sim_index()andwrite_root_link_velocity_to_sim_index().write_joint_state_to_sim(position, velocity)Deprecated, same as
write_joint_position_to_sim_index()andwrite_joint_velocity_to_sim_index().- 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.actuatorsattribute. They are used to compute the joint commands during thewrite_data_to_sim()function.
- __init__(cfg: ArticulationCfg)[source]#
Initialize the articulation.
- Parameters:
cfg – A configuration instance.
- property data: ArticulationData#
Data related to the asset.
- 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 root_view: physx.ArticulationView#
Root view for the asset.
Note
Use this view with caution. It requires handling of tensors in a specific way.
- property instantaneous_wrench_composer: WrenchComposer#
Instantaneous wrench composer.
Returns a
WrenchComposerinstance. 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 permanent_wrench_composer: WrenchComposer#
Permanent wrench composer.
Returns a
WrenchComposerinstance. 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.
- reset(env_ids: Sequence[int] | None = None, env_mask: wp.array | None = None) None[source]#
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,).
- write_data_to_sim()[source]#
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.
- update(dt: float)[source]#
Updates the simulation data.
- Parameters:
dt – The time step size in seconds.
- find_bodies(name_keys: str | Sequence[str], preserve_order: bool = False) tuple[list[int], list[str]][source]#
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.
- find_joints(name_keys: str | Sequence[str], joint_subset: list[str] | None = None, preserve_order: bool = False) tuple[list[int], list[str]][source]#
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 and names.
- find_fixed_tendons(name_keys: str | Sequence[str], tendon_subsets: list[str] | None = None, preserve_order: bool = False) tuple[list[int], list[str]][source]#
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 and names.
- find_spatial_tendons(name_keys: str | Sequence[str], tendon_subsets: list[str] | None = None, preserve_order: bool = False) tuple[list[int], list[str]][source]#
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 and names.
- write_root_pose_to_sim_index(*, root_pose: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[source]#
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 expect partial data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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.
- write_root_pose_to_sim_mask(*, root_pose: torch.Tensor | wp.array, env_mask: wp.array | None = None) None[source]#
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 expect full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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,).
- write_root_link_pose_to_sim_index(*, root_pose: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False) None[source]#
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 expect partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
root_pose – Root poses in simulation frame. Shape is (len(env_ids), 7) or (num_instances, 7), or (len(env_ids),) / (num_instances,) with dtype wp.transformf.
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_root_link_pose_to_sim_mask(*, root_pose: torch.Tensor | wp.array, env_mask: wp.array | None = None) None[source]#
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 expect full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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,).
- write_root_com_pose_to_sim_index(*, root_pose: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False) None[source]#
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 expect partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
root_pose – Root center of mass poses in simulation frame. Shape is (len(env_ids), 7) or (num_instances, 7), or (len(env_ids),) / (num_instances,) with dtype wp.transformf.
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_root_com_pose_to_sim_mask(*, root_pose: torch.Tensor | wp.array, env_mask: wp.array | None = None) None[source]#
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 expect full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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,).
- write_root_velocity_to_sim_index(*, root_velocity: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[source]#
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 expect partial data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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.
- write_root_velocity_to_sim_mask(*, root_velocity: torch.Tensor | wp.array, env_mask: wp.array | None = None) None[source]#
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 expect full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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_root_com_velocity_to_sim_index(*, root_velocity: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False) None[source]#
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 expect partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
root_velocity – Root center of mass velocities in simulation world frame. Shape is (len(env_ids), 6) or (num_instances, 6), or (len(env_ids),) / (num_instances,) with dtype wp.spatial_vectorf.
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_root_com_velocity_to_sim_mask(*, root_velocity: torch.Tensor | wp.array, env_mask: wp.array | None = None) None[source]#
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 expect full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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_root_link_velocity_to_sim_index(*, root_velocity: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False) None[source]#
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 expect partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
root_velocity – Root frame velocities in simulation world frame. Shape is (len(env_ids), 6) or (num_instances, 6), or (len(env_ids),) / (num_instances,) with dtype wp.spatial_vectorf.
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_root_link_velocity_to_sim_mask(*, root_velocity: torch.Tensor | wp.array, env_mask: wp.array | None = None) None[source]#
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 expect full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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_joint_state_to_sim_mask(*, position: torch.Tensor | wp.array, velocity: torch.Tensor | wp.array, joint_mask: wp.array | None = None, env_mask: wp.array | None = None)[source]#
Write joint positions and velocities over selected environment mask into the simulation.
Note
This method expect full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
position – Joint positions. Shape is (num_instances, num_joints).
velocity – Joint velocities. Shape is (num_instances, num_joints).
joint_mask – Joint mask. If None, then all joints are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- write_joint_position_to_sim_index(*, position: torch.Tensor, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False)[source]#
Write joint positions over selected environment indices into the simulation.
Note
This method expect partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
position – Joint positions. Shape is (len(env_ids), len(joint_ids)) or (num_instances, num_joints).
joint_ids – Joint indices. If None, then all joints are used.
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_joint_position_to_sim_mask(*, position: torch.Tensor | wp.array, joint_mask: wp.array | None = None, env_mask: wp.array | None = None)[source]#
Write joint positions over selected environment mask into the simulation.
Note
This method expect full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
position – Joint positions. Shape is (num_instances, num_joints).
joint_mask – Joint mask. If None, then all joints are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- 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, full_data: bool = False)[source]#
Write joint velocities to the simulation.
Note
This method expect partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
velocity – Joint velocities. Shape is (len(env_ids), len(joint_ids)) or (num_instances, num_joints).
joint_ids – Joint indices. If None, then all joints are used.
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_joint_velocity_to_sim_mask(*, velocity: torch.Tensor | wp.array, joint_mask: wp.array | None = None, env_mask: wp.array | None = None)[source]#
Write joint velocities over selected environment mask into the simulation.
Note
This method expect full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
velocity – Joint velocities. Shape is (num_instances, num_joints).
joint_mask – Joint mask. If None, then all joints are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- write_joint_stiffness_to_sim_index(*, stiffness: torch.Tensor | wp.array | float, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False)[source]#
Write joint stiffness over selected environment indices into the simulation.
Note
This method expect partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
stiffness – Joint stiffness. Shape is (len(env_ids), len(joint_ids)) or (num_instances, num_joints).
joint_ids – Joint indices. If None, then all joints are used.
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_joint_stiffness_to_sim_mask(*, stiffness: torch.Tensor | wp.array | float, joint_mask: wp.array | None = None, env_mask: wp.array | None = None)[source]#
Write joint stiffness over selected environment mask into the simulation.
Note
This method expect full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
stiffness – Joint stiffness. Shape is (num_instances, num_joints).
joint_mask – Joint mask. If None, then all joints are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- write_joint_damping_to_sim_index(*, damping: torch.Tensor | wp.array | float, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False)[source]#
Write joint damping over selected environment indices into the simulation.
Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
damping – Joint damping. Shape is (len(env_ids), len(joint_ids)) or (num_instances, num_joints).
joint_ids – Joint indices. If None, then all joints are used.
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_joint_damping_to_sim_mask(*, damping: torch.Tensor | wp.array | float, joint_mask: wp.array | None = None, env_mask: wp.array | None = None)[source]#
Write joint damping over selected environment mask into the simulation.
Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
damping – Joint damping. Shape is (num_instances, num_joints).
joint_mask – Joint mask. If None, then all joints are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- write_joint_position_limit_to_sim_index(*, limits: torch.Tensor | wp.array | float, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False, warn_limit_violation: bool = True)[source]#
Write joint position limits over selected environment indices into the simulation.
Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
limits – Joint limits. Shape is (len(env_ids), len(joint_ids), 2) or (num_instances, num_joints, 2). In warp the expected shape is (num_instances, num_joints), with dtype wp.vec2f.
joint_ids – Joint indices. If None, then all joints are used.
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
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_limit_to_sim_mask(*, limits: torch.Tensor | wp.array | float, joint_mask: wp.array | None = None, env_mask: wp.array | None = None, warn_limit_violation: bool = True)[source]#
Write joint position limits over selected environment mask into the simulation.
Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
limits – Joint limits. Shape is (num_instances, num_joints, 2).
joint_mask – Joint mask. If None, then all joints are used.
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_velocity_limit_to_sim_index(*, limits: torch.Tensor | wp.array | float, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False)[source]#
Write joint max velocity over selected environment indices into 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 or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
limits – Joint max velocity. Shape is (len(env_ids), len(joint_ids)) or (num_instances, num_joints).
joint_ids – Joint indices. If None, then all joints are used.
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_joint_velocity_limit_to_sim_mask(*, limits: torch.Tensor | wp.array | float, joint_mask: wp.array | None = None, env_mask: wp.array | None = None) None[source]#
Write joint max velocity over selected environment mask into 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 using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
limits – Joint max velocity. Shape is (num_instances, num_joints).
joint_mask – Joint mask. If None, then all joints are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- write_joint_effort_limit_to_sim_index(*, limits: torch.Tensor | wp.array | float, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False)[source]#
Write joint effort limits over selected environment indices 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 or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
limits – Joint torque limits. Shape is (len(env_ids), len(joint_ids)) or (num_instances, num_joints).
joint_ids – Joint indices. If None, then all joints are used.
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_joint_effort_limit_to_sim_mask(*, limits: torch.Tensor | wp.array | float, joint_mask: wp.array | None = None, env_mask: wp.array | None = None)[source]#
Write joint effort limits over selected environment mask 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 using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
limits – Joint torque limits. Shape is (num_instances, num_joints).
joint_mask – Joint mask. If None, then all joints are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- write_joint_armature_to_sim_index(*, armature: torch.Tensor | wp.array | float, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False)[source]#
Write joint armature over selected environment indices 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 or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
armature – Joint armature. Shape is (len(env_ids), len(joint_ids)) or (num_instances, num_joints).
joint_ids – Joint indices. If None, then all joints are used.
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_joint_armature_to_sim_mask(*, armature: torch.Tensor | wp.array | float, joint_mask: wp.array | None = None, env_mask: wp.array | None = None)[source]#
Write joint armature over selected environment mask 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 using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
armature – Joint armature. Shape is (num_instances, num_joints).
joint_mask – Joint mask. If None, then all joints are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- write_joint_friction_coefficient_to_sim_index(*, joint_friction_coeff: torch.Tensor | wp.array | float, joint_dynamic_friction_coeff: torch.Tensor | wp.array | float | None = None, joint_viscous_friction_coeff: torch.Tensor | wp.array | float | None = None, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False)[source]#
Write joint friction coefficients over selected environment indices into the simulation.
For Isaac Sim versions below 5.0, only the static friction coefficient is set. This limits the resisting force or torque up to a maximum proportional to the transmitted spatial force: \(\|F_{resist}\| \leq \mu_s \, \|F_{spatial}\|\).
For Isaac Sim versions 5.0 and above, the static, dynamic, and viscous friction coefficients are set. The model combines Coulomb (static & dynamic) friction with a viscous term:
Static friction \(\mu_s\) defines the maximum effort that prevents motion at rest.
Dynamic friction \(\mu_d\) applies once motion begins and remains constant during motion.
Viscous friction \(c_v\) is a velocity-proportional resistive term.
Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
joint_friction_coeff – Static friction coefficient \(\mu_s\). Shape is (len(env_ids), len(joint_ids)) or (num_instances, num_joints).
joint_dynamic_friction_coeff – Dynamic (Coulomb) friction coefficient \(\mu_d\). Same shape as above. If None, the dynamic coefficient is not updated.
joint_viscous_friction_coeff – Viscous friction coefficient \(c_v\). Same shape as above. If None, the viscous coefficient is not updated.
joint_ids – Joint indices. If None, then all joints are used.
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_joint_friction_coefficient_to_sim_mask(*, joint_friction_coeff: torch.Tensor | wp.array, joint_dynamic_friction_coeff: torch.Tensor | wp.array | None = None, joint_viscous_friction_coeff: torch.Tensor | wp.array | None = None, joint_mask: wp.array | None = None, env_mask: wp.array | None = None)[source]#
Write joint friction coefficients over selected environment mask into the simulation.
For Isaac Sim versions below 5.0, only the static friction coefficient is set. This limits the resisting force or torque up to a maximum proportional to the transmitted spatial force: \(\|F_{resist}\| \leq \mu_s \, \|F_{spatial}\|\).
For Isaac Sim versions 5.0 and above, the static, dynamic, and viscous friction coefficients are set. The model combines Coulomb (static & dynamic) friction with a viscous term:
Static friction \(\mu_s\) defines the maximum effort that prevents motion at rest.
Dynamic friction \(\mu_d\) applies once motion begins and remains constant during motion.
Viscous friction \(c_v\) is a velocity-proportional resistive term.
Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
joint_friction_coeff – Static friction coefficient \(\mu_s\). Shape is (num_instances, num_joints).
joint_dynamic_friction_coeff – Dynamic (Coulomb) friction coefficient \(\mu_d\). Same shape as above. If None, the dynamic coefficient is not updated.
joint_viscous_friction_coeff – Viscous friction coefficient \(c_v\). Same shape as above. If None, the viscous coefficient is not updated.
joint_mask – Joint mask. If None, then all joints are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- write_joint_dynamic_friction_coefficient_to_sim_index(*, joint_dynamic_friction_coeff: torch.Tensor | wp.array, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False) None[source]#
Write joint dynamic friction coefficient over selected environment indices into the simulation.
Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
joint_dynamic_friction_coeff – Joint dynamic friction coefficient. Shape is (len(env_ids), len(joint_ids)) or (num_instances, num_joints) if full_data.
joint_ids – Joint indices. If None, then all joints are used.
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_joint_dynamic_friction_coefficient_to_sim_mask(*, joint_dynamic_friction_coeff: torch.Tensor | wp.array, joint_mask: wp.array | None = None, env_mask: wp.array | None = None) None[source]#
Write joint dynamic friction coefficient over selected environment mask into the simulation.
Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
joint_dynamic_friction_coeff – Joint dynamic friction coefficient. Shape is (num_instances, num_joints).
joint_mask – Joint mask. If None, then all joints are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- write_joint_viscous_friction_coefficient_to_sim_index(*, joint_viscous_friction_coeff: torch.Tensor | wp.array, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False) None[source]#
Write joint viscous friction coefficient over selected environment indices into the simulation.
Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
joint_viscous_friction_coeff – Joint viscous friction coefficient. Shape is (len(env_ids), len(joint_ids)) or (num_instances, num_joints) if full_data.
joint_ids – Joint indices. If None, then all joints are used.
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_joint_viscous_friction_coefficient_to_sim_mask(*, joint_viscous_friction_coeff: torch.Tensor | wp.array, joint_mask: wp.array | None = None, env_mask: wp.array | None = None) None[source]#
Write joint viscous friction coefficient over selected environment mask into the simulation.
Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
joint_viscous_friction_coeff – Joint viscous friction coefficient. Shape is (num_instances, num_joints).
joint_mask – Joint mask. If None, then all joints are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- 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, full_data: bool = False) None[source]#
Set masses of all bodies using indices.
Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
masses – Masses of all bodies. Shape is (len(env_ids), len(body_ids)) or (num_instances, num_bodies) if full_data.
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).
full_data – Whether to expect full data. Defaults to False.
- set_masses_mask(*, masses: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None[source]#
Set masses of all bodies using masks.
Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
masses – Masses of all bodies. Shape is (num_instances, num_bodies).
body_mask – Body mask. If None, then all bodies are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- 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, full_data: bool = False) None[source]#
Set center of mass pose of all bodies using indices.
Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
coms – Center of mass pose of all bodies. Shape is (len(env_ids), len(body_ids), 7) or (num_instances, num_bodies, 7) if full_data, or (len(env_ids), len(body_ids)) / (num_instances, num_bodies) 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 environments).
full_data – Whether to expect full data. Defaults to False.
- set_coms_mask(*, coms: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None[source]#
Set center of mass pose of all bodies using masks.
Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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 bodies are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- 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, full_data: bool = False) None[source]#
Set inertias of all bodies using indices.
Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
inertias – Inertias of all bodies. Shape is (len(env_ids), len(body_ids), 9) or (num_instances, num_bodies, 9) if full_data.
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).
full_data – Whether to expect full data. Defaults to False.
- set_inertias_mask(*, inertias: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None[source]#
Set inertias of all bodies using masks.
Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- 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, full_data: bool = False) None[source]#
Set joint position targets into internal buffers using 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.Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
target – Joint position targets. Shape is (len(env_ids), len(joint_ids)) or (num_instances, num_joints) if full_data.
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 environments).
full_data – Whether to expect full data. Defaults to False.
- set_joint_position_target_mask(*, target: torch.Tensor | wp.array, joint_mask: wp.array | None = None, env_mask: wp.array | None = None) None[source]#
Set joint position targets into internal buffers using masks.
Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
target – Joint position targets. Shape is (num_instances, num_joints).
joint_mask – Joint mask. If None, then all joints are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- 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, full_data: bool = False) None[source]#
Set joint velocity targets into internal buffers using 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.Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
target – Joint velocity targets. Shape is (len(env_ids), len(joint_ids)) or (num_instances, num_joints) if full_data.
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 environments).
full_data – Whether to expect full data. Defaults to False.
- set_joint_velocity_target_mask(*, target: torch.Tensor | wp.array, joint_mask: wp.array | None = None, env_mask: wp.array | None = None) None[source]#
Set joint velocity targets into internal buffers using masks.
Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
target – Joint velocity targets. Shape is (num_instances, num_joints).
joint_mask – Joint mask. If None, then all joints are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- 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, full_data: bool = False) None[source]#
Set joint efforts into internal buffers using 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.Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
target – Joint effort targets. Shape is (len(env_ids), len(joint_ids)) or (num_instances, num_joints) if full_data.
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 environments).
full_data – Whether to expect full data. Defaults to False.
- set_joint_effort_target_mask(*, target: torch.Tensor | wp.array, joint_mask: wp.array | None = None, env_mask: wp.array | None = None) None[source]#
Set joint efforts into internal buffers using masks.
Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
target – Joint effort targets. Shape is (num_instances, num_joints).
joint_mask – Joint mask. If None, then all joints are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- 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, full_data: bool = False) None[source]#
Set fixed tendon stiffness into internal buffers using indices.
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()method.Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
stiffness – Fixed tendon stiffness. Shape is (len(env_ids), len(fixed_tendon_ids)) or (num_instances, num_fixed_tendons) if full_data.
fixed_tendon_ids – The tendon indices to set the stiffness for. Defaults to None (all fixed tendons).
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- 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[source]#
Set fixed tendon stiffness into internal buffers using masks.
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()method.Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
stiffness – Fixed tendon stiffness. Shape is (num_instances, num_fixed_tendons).
fixed_tendon_mask – Fixed tendon mask. If None, then all fixed tendons are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- 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, full_data: bool = False) None[source]#
Set fixed tendon damping into internal buffers using indices.
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 or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
damping – Fixed tendon damping. Shape is (len(env_ids), len(fixed_tendon_ids)) or (num_instances, num_fixed_tendons) if full_data.
fixed_tendon_ids – The tendon indices to set the damping for. Defaults to None (all fixed tendons).
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- 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[source]#
Set fixed tendon damping into internal buffers using masks.
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()method.Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
damping – Fixed tendon damping. Shape is (num_instances, num_fixed_tendons).
fixed_tendon_mask – Fixed tendon mask. If None, then all fixed tendons are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- 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, full_data: bool = False) None[source]#
Set fixed tendon limit stiffness into internal buffers using indices.
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()method.Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
limit_stiffness – Fixed tendon limit stiffness. Shape is (len(env_ids), len(fixed_tendon_ids)) or (num_instances, num_fixed_tendons) if full_data.
fixed_tendon_ids – The tendon indices to set the limit stiffness for. Defaults to None (all fixed tendons).
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- 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[source]#
Set fixed tendon limit stiffness into internal buffers using masks.
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()method.Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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 fixed tendons are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- 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, full_data: bool = False) None[source]#
Set fixed tendon position limit into internal buffers using indices.
This function does not apply the tendon position limit to the simulation. It only fills the buffers with the desired values. To apply the tendon position limit, call the
write_fixed_tendon_properties_to_sim_index()method.Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
limit – Fixed tendon position limit. Shape is (len(env_ids), len(fixed_tendon_ids)) or (num_instances, num_fixed_tendons) if full_data.
fixed_tendon_ids – The tendon indices to set the position limit for. Defaults to None (all fixed tendons).
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- 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[source]#
Set fixed tendon position limit into internal buffers using masks.
This function does not apply the tendon position limit to the simulation. It only fills the buffers with the desired values. To apply the tendon position limit, call the
write_fixed_tendon_properties_to_sim_mask()method.Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
limit – Fixed tendon position limit. Shape is (num_instances, num_fixed_tendons).
fixed_tendon_mask – Fixed tendon mask. If None, then all fixed tendons are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- 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, full_data: bool = False) None[source]#
Set fixed tendon rest length into internal buffers using indices.
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()method.Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
rest_length – Fixed tendon rest length. Shape is (len(env_ids), len(fixed_tendon_ids)) or (num_instances, num_fixed_tendons) if full_data.
fixed_tendon_ids – The tendon indices to set the rest length for. Defaults to None (all fixed tendons).
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- 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[source]#
Set fixed tendon rest length into internal buffers using masks.
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()method.Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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 fixed tendons are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- 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, full_data: bool = False) None[source]#
Set fixed tendon offset into internal buffers using indices.
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()method.Note
This method expects partial data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
offset – Fixed tendon offset. Shape is (len(env_ids), len(fixed_tendon_ids)) or (num_instances, num_fixed_tendons) if full_data.
fixed_tendon_ids – The tendon indices to set the offset for. Defaults to None (all fixed tendons).
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- 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[source]#
Set fixed tendon offset into internal buffers using masks.
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()method.Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
offset – Fixed tendon offset. Shape is (num_instances, num_fixed_tendons).
fixed_tendon_mask – Fixed tendon mask. If None, then all fixed tendons are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- write_fixed_tendon_properties_to_sim_index(*, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[source]#
Write fixed tendon properties into the simulation using indices.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
fixed_tendon_ids – The fixed tendon indices to write the properties for. Defaults to None (all fixed tendons).
env_ids – Environment indices. If None, then all indices are used.
- write_fixed_tendon_properties_to_sim_mask(*, env_mask: wp.array | None = None) None[source]#
Write fixed tendon properties into the simulation using masks.
Tip
For maximum performance we recommend using the mask method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- 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, full_data: bool = False) None[source]#
Set spatial tendon stiffness into internal buffers using indices.
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()method.Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
stiffness – Spatial tendon stiffness. Shape is (len(env_ids), len(spatial_tendon_ids)) or (num_instances, num_spatial_tendons) if full_data.
spatial_tendon_ids – The tendon indices to set the stiffness for. Defaults to None (all spatial tendons).
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- 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[source]#
Set spatial tendon stiffness into internal buffers using masks.
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()method.Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
stiffness – Spatial tendon stiffness. Shape is (num_instances, num_spatial_tendons).
spatial_tendon_mask – Spatial tendon mask. If None, then all spatial tendons are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- 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, full_data: bool = False) None[source]#
Set spatial tendon damping into internal buffers using indices.
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()method.Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
damping – Spatial tendon damping. Shape is (len(env_ids), len(spatial_tendon_ids)) or (num_instances, num_spatial_tendons) if full_data.
spatial_tendon_ids – The tendon indices to set the damping for. Defaults to None (all spatial tendons).
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- 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[source]#
Set spatial tendon damping into internal buffers using masks.
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()method.Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
damping – Spatial tendon damping. Shape is (num_instances, num_spatial_tendons).
spatial_tendon_mask – Spatial tendon mask. If None, then all spatial tendons are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- 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, full_data: bool = False) None[source]#
Set spatial tendon limit stiffness into internal buffers using indices.
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()method.Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
limit_stiffness – Spatial tendon limit stiffness. Shape is (len(env_ids), len(spatial_tendon_ids)) or (num_instances, num_spatial_tendons) if full_data.
spatial_tendon_ids – The tendon indices to set the limit stiffness for. Defaults to None (all spatial tendons).
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- 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[source]#
Set spatial tendon limit stiffness into internal buffers using masks.
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()method.Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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 spatial tendons are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- 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, full_data: bool = False) None[source]#
Set spatial tendon offset into internal buffers using indices.
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()method.Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
offset – Spatial tendon offset. Shape is (len(env_ids), len(spatial_tendon_ids)) or (num_instances, num_spatial_tendons) if full_data.
spatial_tendon_ids – The tendon indices to set the offset for. Defaults to None (all spatial tendons).
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- 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[source]#
Set spatial tendon offset into internal buffers using masks.
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()method.Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
offset – Spatial tendon offset. Shape is (num_instances, num_spatial_tendons).
spatial_tendon_mask – Spatial tendon mask. If None, then all spatial tendons are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- write_spatial_tendon_properties_to_sim_index(*, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[source]#
Write spatial tendon properties into the simulation using indices.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
env_ids – Environment indices. If None, then all indices are used.
- write_spatial_tendon_properties_to_sim_mask(*, spatial_tendon_mask: wp.array | None = None, env_mask: wp.array | None = None) None[source]#
Write spatial tendon properties into the simulation using masks.
Tip
For maximum performance we recommend using the mask method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
spatial_tendon_mask – Spatial tendon mask. If None, then all spatial tendons are used.
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 | wp.array | float, joint_dynamic_friction_coeff: torch.Tensor | wp.array | float | None = None, joint_viscous_friction_coeff: torch.Tensor | wp.array | float | None = None, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False)[source]#
Deprecated, same as
write_joint_friction_coefficient_to_sim_index().
- write_joint_viscous_friction_coefficient_to_sim(joint_viscous_friction_coeff: torch.Tensor | wp.array, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False) None[source]#
Deprecated, same as
write_joint_viscous_friction_coefficient_to_sim_index().
- write_joint_dynamic_friction_coefficient_to_sim(joint_dynamic_friction_coeff: torch.Tensor | wp.array, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False) None[source]#
Deprecated, same as
write_joint_dynamic_friction_coefficient_to_sim_index().
- write_root_state_to_sim(root_state: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[source]#
Deprecated, same as
write_root_link_pose_to_sim_index()andwrite_root_com_velocity_to_sim_index().
- 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 withwp.float32).
- property has_debug_vis_implementation: bool#
Whether the asset has a debug visualization implemented.
- property is_initialized: bool#
Whether the asset is initialized.
Returns True if the asset is initialized, False otherwise.
- 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().
- 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().
- 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().
- 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().
- 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().
- 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().
- 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().
- 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().
- 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().
- 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().
- 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().
- 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().
- 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().
- 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().
- 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().
- 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().
- 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).
- 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().
- 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().
- 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().
- 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().
- 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().
- 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().
- 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().
- 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().
- 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().
- 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().
- write_root_com_state_to_sim(root_state: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[source]#
Deprecated, same as
write_root_com_pose_to_sim_index()andwrite_root_com_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().
- write_root_link_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_link_pose_to_sim_index().
- write_root_link_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_link_velocity_to_sim_index().
- 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().
- 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().
- 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().
- write_root_link_state_to_sim(root_state: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[source]#
Deprecated, same as
write_root_link_pose_to_sim_index()andwrite_root_link_velocity_to_sim_index().
- write_joint_state_to_sim(position: torch.Tensor | wp.array, 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)[source]#
Deprecated, same as
write_joint_position_to_sim_index()andwrite_joint_velocity_to_sim_index().
- class isaaclab_physx.assets.ArticulationData[source]#
Bases:
BaseArticulationDataData container for an articulation.
This class contains the data for an articulation in the simulation. The data includes the state of the root rigid body, the state of all the bodies in the articulation, and the joint state. The data is stored in the simulation world frame unless otherwise specified.
An articulation is comprised of multiple rigid bodies or links. For a rigid body, there are two frames of reference that are used:
Actor frame: The frame of reference of the rigid body prim. This typically corresponds to the Xform prim with the rigid body schema.
Center of mass frame: The frame of reference of the center of mass of the rigid body.
Depending on the settings, the two frames may not coincide with each other. In the robotics sense, the actor frame can be interpreted as the link frame.
Attributes:
Whether the articulation data is fully instantiated and ready to use.
Body names in the order parsed by the simulation view.
Joint names in the order parsed by the simulation view.
Fixed tendon names in the order parsed by the simulation view.
Spatial tendon names in the order parsed by the simulation view.
Default root pose
[pos, quat]in the local environment frame.Default root velocity
[lin_vel, ang_vel]in the local environment frame.Default joint positions of all joints.
Default joint velocities of all joints.
Joint position targets commanded by the user.
Joint velocity targets commanded by the user.
Joint effort targets commanded by the user.
Joint torques computed from the actuator model (before clipping).
Joint torques applied from the actuator model (after clipping).
Joint stiffness provided to the simulation.
Joint damping provided to the simulation.
Joint armature provided to the simulation.
Joint static friction coefficient provided to the simulation.
Joint dynamic friction coefficient provided to the simulation.
Joint viscous friction coefficient provided to the simulation.
Joint position limits provided to the simulation.
Joint maximum velocity provided to the simulation.
Joint maximum effort provided to the simulation.
Soft joint positions limits for all joints.
Soft joint velocity limits for all joints.
Gear ratio for relating motor torques to applied Joint torques.
Fixed tendon stiffness provided to the simulation.
Fixed tendon damping provided to the simulation.
Fixed tendon limit stiffness provided to the simulation.
Fixed tendon rest length provided to the simulation.
Fixed tendon offset provided to the simulation.
Fixed tendon position limits provided to the simulation.
Spatial tendon stiffness provided to the simulation.
Spatial tendon damping provided to the simulation.
Spatial tendon limit stiffness provided to the simulation.
Spatial tendon offset provided to the simulation.
Root link pose
[pos, quat]in simulation world frame.Root link velocity
[lin_vel, ang_vel]in simulation world frame.Root center of mass pose
[pos, quat]in simulation world frame.Root center of mass velocity
[lin_vel, ang_vel]in simulation world frame.Body mass in the world frame.
Flattened body inertia in the world frame.
Body link pose
[pos, quat]in simulation world frame.Body link velocity
[lin_vel, ang_vel]in simulation world frame.Body center of mass pose
[pos, quat]in simulation world frame.Body center of mass velocity
[lin_vel, ang_vel]in simulation world frame.Acceleration of all bodies center of mass
[lin_acc, ang_acc].Center of mass pose
[pos, quat]of all bodies in their respective body's link frames.Joint reaction wrench applied from body parent to child body in parent body frame.
Joint positions of all joints.
Joint velocities of all joints.
Joint acceleration of all joints.
Projection of the gravity direction on base frame.
Yaw heading of the base frame (in radians).
Root link linear velocity in base frame.
Root link angular velocity in base frame.
Root center of mass linear velocity in base frame.
Root center of mass angular velocity in base frame.
Root link position in simulation world frame.
Root link orientation (x, y, z, w) in simulation world frame.
Root linear velocity in simulation world frame.
Root link angular velocity in simulation world frame.
Root center of mass position in simulation world frame.
Root center of mass orientation (x, y, z, w) in simulation world frame.
Root center of mass linear velocity in simulation world frame.
Root center of mass angular velocity in simulation world frame.
Positions of all bodies in simulation world frame.
Orientation (x, y, z, w) of all bodies in simulation world frame.
Linear velocity of all bodies in simulation world frame.
Angular velocity of all bodies in simulation world frame.
Positions of all bodies' center of mass in simulation world frame.
Orientation (x, y, z, w) of the principal axes of inertia of all bodies in simulation world frame.
Linear velocity of all bodies in simulation world frame.
Angular velocity of all bodies in simulation world frame.
Linear acceleration of all bodies in simulation world frame.
Angular acceleration of all bodies in simulation world frame.
Center of mass position of all of the bodies in their respective link frames.
Orientation (x, y, z, w) of the principal axes of inertia of all of the bodies in their respective link frames.
Shorthand for
body_com_acc_w.Shorthand for
body_com_ang_acc_w.Shorthand for
body_com_ang_vel_w.Shorthand for
body_com_lin_acc_w.Shorthand for
body_com_lin_vel_w.Shorthand for
body_link_pos_w.Shorthand for
body_link_pose_w.Shorthand for
body_link_quat_w.Shorthand for
body_com_vel_w.Shorthand for
body_com_pos_b.Shorthand for
body_com_quat_b.Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Shorthand for
default_joint_pos_limits.Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Shorthand for
fixed_tendon_pos_limits.Shorthand for
joint_friction_coeff.Shorthand for
joint_pos_limits.Shorthand for
joint_vel_limits.Shorthand for
root_com_ang_vel_b.Shorthand for
root_com_ang_vel_w.Shorthand for
root_com_lin_vel_b.Shorthand for
root_com_lin_vel_w.Shorthand for
root_link_pos_w.Shorthand for
root_link_pose_w.Shorthand for
root_link_quat_w.Shorthand for
root_com_vel_w.Default root state
[pos, quat, lin_vel, ang_vel]in the local environment frame.Deprecated, same as
root_link_pose_wandroot_com_vel_w.Deprecated, same as
root_link_pose_wandroot_link_vel_w.Deprecated, same as
root_com_pose_wandroot_com_vel_w.State of all bodies [pos, quat, lin_vel, ang_vel] in simulation world frame.
State of all bodies' link frame`[pos, quat, lin_vel, ang_vel]` in simulation world frame.
State of all bodies center of mass [pos, quat, lin_vel, ang_vel] in simulation world frame.
Methods:
update(dt)Updates the data for the articulation.
- update(dt: float) None[source]#
Updates the data for the articulation.
- Parameters:
dt – The time step for the update. This must be a positive value.
- fixed_tendon_names: list[str] = None#
Fixed tendon names in the order parsed by the simulation view.
- spatial_tendon_names: list[str] = None#
Spatial tendon names in the order parsed by the simulation view.
- property default_root_pose: warp.array#
Default root pose
[pos, quat]in the local environment frame.The position and quaternion are of the articulation root’s actor frame. Shape is (num_instances,), dtype = wp.transformf. In torch this resolves to (num_instances, 7).
- property default_root_vel: warp.array#
Default root velocity
[lin_vel, ang_vel]in the local environment frame.The linear and angular velocities are of the articulation root’s center of mass frame. Shape is (num_instances,), dtype = wp.spatial_vectorf. In torch this resolves to (num_instances, 6).
- property default_joint_pos: warp.array#
Default joint positions of all joints.
Shape is (num_instances, num_joints), dtype = wp.float32. In torch this resolves to (num_instances, num_joints).
This quantity is configured through the
isaaclab.assets.ArticulationCfg.init_stateparameter.
- property default_joint_vel: warp.array#
Default joint velocities of all joints.
Shape is (num_instances, num_joints), dtype = wp.float32. In torch this resolves to (num_instances, num_joints).
This quantity is configured through the
isaaclab.assets.ArticulationCfg.init_stateparameter.
- property joint_pos_target: warp.array#
Joint position targets commanded by the user.
Shape is (num_instances, num_joints), dtype = wp.float32. In torch this resolves to (num_instances, num_joints).
For an implicit actuator model, the targets are directly set into the simulation. For an explicit actuator model, the targets are used to compute the joint torques (see
applied_torque), which are then set into the simulation.
- property joint_vel_target: warp.array#
Joint velocity targets commanded by the user.
Shape is (num_instances, num_joints), dtype = wp.float32. In torch this resolves to (num_instances, num_joints).
For an implicit actuator model, the targets are directly set into the simulation. For an explicit actuator model, the targets are used to compute the joint torques (see
applied_torque), which are then set into the simulation.
- property joint_effort_target: warp.array#
Joint effort targets commanded by the user.
Shape is (num_instances, num_joints), dtype = wp.float32. In torch this resolves to (num_instances, num_joints).
For an implicit actuator model, the targets are directly set into the simulation. For an explicit actuator model, the targets are used to compute the joint torques (see
applied_torque), which are then set into the simulation.
- property computed_torque: warp.array#
Joint torques computed from the actuator model (before clipping).
Shape is (num_instances, num_joints), dtype = wp.float32. In torch this resolves to (num_instances, num_joints).
This quantity is the raw torque output from the actuator mode, before any clipping is applied. It is exposed for users who want to inspect the computations inside the actuator model. For instance, to penalize the learning agent for a difference between the computed and applied torques.
- property applied_torque: warp.array#
Joint torques applied from the actuator model (after clipping).
Shape is (num_instances, num_joints), dtype = wp.float32. In torch this resolves to (num_instances, num_joints).
These torques are set into the simulation, after clipping the
computed_torquebased on the actuator model.
- property joint_stiffness: warp.array#
Joint stiffness provided to the simulation.
Shape is (num_instances, num_joints), dtype = wp.float32. In torch this resolves to (num_instances, num_joints).
In the case of explicit actuators, the value for the corresponding joints is zero.
- property joint_damping: warp.array#
Joint damping provided to the simulation.
Shape is (num_instances, num_joints), dtype = wp.float32. In torch this resolves to (num_instances, num_joints).
In the case of explicit actuators, the value for the corresponding joints is zero.
- property joint_armature: warp.array#
Joint armature provided to the simulation.
Shape is (num_instances, num_joints), dtype = wp.float32. In torch this resolves to (num_instances, num_joints).
- property joint_friction_coeff: warp.array#
Joint static friction coefficient provided to the simulation.
Shape is (num_instances, num_joints), dtype = wp.float32. In torch this resolves to (num_instances, num_joints).
- property joint_dynamic_friction_coeff: warp.array#
Joint dynamic friction coefficient provided to the simulation.
Shape is (num_instances, num_joints), dtype = wp.float32. In torch this resolves to (num_instances, num_joints).
- property joint_viscous_friction_coeff: warp.array#
Joint viscous friction coefficient provided to the simulation.
Shape is (num_instances, num_joints), dtype = wp.float32. In torch this resolves to (num_instances, num_joints).
- property joint_pos_limits: warp.array#
Joint position limits provided to the simulation.
Shape is (num_instances, num_joints), dtype = wp.vec2f. In torch this resolves to (num_instances, num_joints, 2).
The limits are in the order \([lower, upper]\).
- property joint_vel_limits: warp.array#
Joint maximum velocity provided to the simulation.
Shape is (num_instances, num_joints), dtype = wp.float32. In torch this resolves to (num_instances, num_joints).
- property joint_effort_limits: warp.array#
Joint maximum effort provided to the simulation.
Shape is (num_instances, num_joints), dtype = wp.float32. In torch this resolves to (num_instances, num_joints).
- property soft_joint_pos_limits: warp.array#
Soft joint positions limits for all joints.
Shape is (num_instances, num_joints), dtype = wp.vec2f. In torch this resolves to (num_instances, num_joints, 2).
The limits are in the order \([lower, upper]\).The soft joint position limits are computed as a sub-region of the
joint_pos_limitsbased on thesoft_joint_pos_limit_factorparameter.Consider the joint position limits \([lower, upper]\) and the soft joint position limits \([soft_lower, soft_upper]\). The soft joint position limits are computed as:
\[soft\_lower = (lower + upper) / 2 - factor * (upper - lower) / 2 soft\_upper = (lower + upper) / 2 + factor * (upper - lower) / 2\]The soft joint position limits help specify a safety region around the joint limits. It isn’t used by the simulation, but is useful for learning agents to prevent the joint positions from violating the limits.
- property soft_joint_vel_limits: warp.array#
Soft joint velocity limits for all joints.
Shape is (num_instances, num_joints), dtype = wp.float32. In torch this resolves to (num_instances, num_joints).
These are obtained from the actuator model. It may differ from
joint_vel_limitsif the actuator model has a variable velocity limit model. For instance, in a variable gear ratio actuator model.
- property gear_ratio: warp.array#
Gear ratio for relating motor torques to applied Joint torques.
Shape is (num_instances, num_joints), dtype = wp.float32. In torch this resolves to (num_instances, num_joints).
- property fixed_tendon_stiffness: warp.array#
Fixed tendon stiffness provided to the simulation.
Shape is (num_instances, num_fixed_tendons), dtype = wp.float32. In torch this resolves to (num_instances, num_fixed_tendons).
- property fixed_tendon_damping: warp.array#
Fixed tendon damping provided to the simulation.
Shape is (num_instances, num_fixed_tendons), dtype = wp.float32. In torch this resolves to (num_instances, num_fixed_tendons).
- property fixed_tendon_limit_stiffness: warp.array#
Fixed tendon limit stiffness provided to the simulation.
Shape is (num_instances, num_fixed_tendons), dtype = wp.float32. In torch this resolves to (num_instances, num_fixed_tendons).
- property fixed_tendon_rest_length: warp.array#
Fixed tendon rest length provided to the simulation.
Shape is (num_instances, num_fixed_tendons), dtype = wp.float32. In torch this resolves to (num_instances, num_fixed_tendons).
- property fixed_tendon_offset: warp.array#
Fixed tendon offset provided to the simulation.
Shape is (num_instances, num_fixed_tendons), dtype = wp.float32. In torch this resolves to (num_instances, num_fixed_tendons).
- property fixed_tendon_pos_limits: warp.array#
Fixed tendon position limits provided to the simulation.
Shape is (num_instances, num_fixed_tendons), dtype = wp.vec2f. In torch this resolves to (num_instances, num_fixed_tendons, 2).
- property spatial_tendon_stiffness: warp.array#
Spatial tendon stiffness provided to the simulation.
Shape is (num_instances, num_spatial_tendons), dtype = wp.float32. In torch this resolves to (num_instances, num_spatial_tendons).
- property spatial_tendon_damping: warp.array#
Spatial tendon damping provided to the simulation.
Shape is (num_instances, num_spatial_tendons), dtype = wp.float32. In torch this resolves to (num_instances, num_spatial_tendons).
- property spatial_tendon_limit_stiffness: warp.array#
Spatial tendon limit stiffness provided to the simulation.
Shape is (num_instances, num_spatial_tendons), dtype = wp.float32. In torch this resolves to (num_instances, num_spatial_tendons).
- property spatial_tendon_offset: warp.array#
Spatial tendon offset provided to the simulation.
Shape is (num_instances, num_spatial_tendons), dtype = wp.float32. In torch this resolves to (num_instances, num_spatial_tendons).
- property root_link_pose_w: warp.array#
Root link pose
[pos, quat]in simulation world frame. Shape is (num_instances,), dtype = wp.transformf. In torch this resolves to (num_instances, 7).This quantity is the pose of the articulation root’s actor frame relative to the world. The orientation is provided in (x, y, z, w) format.
- property root_link_vel_w: warp.array#
Root link velocity
[lin_vel, ang_vel]in simulation world frame. Shape is (num_instances,), dtype = wp.spatial_vectorf. In torch this resolves to (num_instances, 6).This quantity contains the linear and angular velocities of the articulation root’s actor frame relative to the world.
- property root_com_pose_w: warp.array#
Root center of mass pose
[pos, quat]in simulation world frame. Shape is (num_instances,), dtype = wp.transformf. In torch this resolves to (num_instances, 7).This quantity is the pose of the articulation root’s center of mass frame relative to the world. The orientation is provided in (x, y, z, w) format.
- property root_com_vel_w: warp.array#
Root center of mass velocity
[lin_vel, ang_vel]in simulation world frame. Shape is (num_instances,), dtype = wp.spatial_vectorf. In torch this resolves to (num_instances, 6).This quantity contains the linear and angular velocities of the articulation root’s center of mass frame relative to the world.
- property body_mass: warp.array#
Body mass in the world frame.
Shape is (num_instances, num_bodies), dtype = wp.float32. In torch this resolves to (num_instances, num_bodies).
- property body_inertia: warp.array#
Flattened body inertia in the world frame.
Shape is (num_instances, num_bodies, 9), dtype = wp.float32. In torch this resolves to (num_instances, num_bodies, 9).
- property body_link_pose_w: warp.array#
Body link pose
[pos, quat]in simulation world frame. Shape is (num_instances, num_bodies), dtype = wp.transformf. In torch this resolves to (num_instances, num_bodies, 7).This quantity is the pose of the articulation links’ actor frame relative to the world. The orientation is provided in (x, y, z, w) format.
- property body_link_vel_w: warp.array#
Body link velocity
[lin_vel, ang_vel]in simulation world frame. Shape is (num_instances, num_bodies), dtype = wp.spatial_vectorf. In torch this resolves to (num_instances, num_bodies, 6).This quantity contains the linear and angular velocities of the articulation links’ actor frame relative to the world.
- property body_com_pose_w: warp.array#
Body center of mass pose
[pos, quat]in simulation world frame. Shape is (num_instances, num_bodies), dtype = wp.transformf. In torch this resolves to (num_instances, num_bodies, 7).This quantity is the pose of the center of mass frame of the articulation links relative to the world. The orientation is provided in (x, y, z, w) format.
- property body_com_vel_w: warp.array#
Body center of mass velocity
[lin_vel, ang_vel]in simulation world frame. Shape is (num_instances, num_bodies), dtype = wp.spatial_vectorf. In torch this resolves to (num_instances, num_bodies, 6).This quantity contains the linear and angular velocities of the articulation links’ center of mass frame relative to the world.
- property body_com_acc_w#
Acceleration of all bodies center of mass
[lin_acc, ang_acc]. Shape is (num_instances, num_bodies), dtype = wp.spatial_vectorf. In torch this resolves to (num_instances, num_bodies, 6).All values are relative to the world.
- property body_com_pose_b: warp.array#
Center of mass pose
[pos, quat]of all bodies in their respective body’s link frames. Shape is (num_instances, num_bodies), dtype = wp.transformf. In torch this resolves to (num_instances, num_bodies, 7).This quantity is the pose of the center of mass frame of the rigid body relative to the body’s link frame. The orientation is provided in (x, y, z, w) format.
- property body_incoming_joint_wrench_b: warp.array#
Joint reaction wrench applied from body parent to child body in parent body frame.
Shape is (num_instances, num_bodies, 6). All body reaction wrenches are provided including the root body to the world of an articulation.
For more information on joint wrenches, please check the PhysX documentation and the underlying PhysX Tensor API.
- property joint_pos: warp.array#
Joint positions of all joints.
Shape is (num_instances, num_joints), dtype = wp.float32. In torch this resolves to (num_instances, num_joints).
- property joint_vel: warp.array#
Joint velocities of all joints.
Shape is (num_instances, num_joints), dtype = wp.float32. In torch this resolves to (num_instances, num_joints).
- property joint_acc: warp.array#
Joint acceleration of all joints.
Shape is (num_instances, num_joints), dtype = wp.float32. In torch this resolves to (num_instances, num_joints).
- property projected_gravity_b#
Projection of the gravity direction on base frame. Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3).
- property heading_w#
Yaw heading of the base frame (in radians). Shape is (num_instances,), dtype = wp.float32.
Note
This quantity is computed by assuming that the forward-direction of the base frame is along x-direction, i.e. \((1, 0, 0)\).
- property root_link_lin_vel_b: warp.array#
Root link linear velocity in base frame. Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3).
This quantity is the linear velocity of the articulation root’s actor frame with respect to its actor frame.
- property root_link_ang_vel_b: warp.array#
Root link angular velocity in base frame. Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3).
This quantity is the angular velocity of the articulation root’s actor frame with respect to its actor frame.
- property root_com_lin_vel_b: warp.array#
Root center of mass linear velocity in base frame. Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3).
This quantity is the linear velocity of the articulation root’s center of mass frame with respect to its actor frame.
- property root_com_ang_vel_b: warp.array#
Root center of mass angular velocity in base frame. Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3).
This quantity is the angular velocity of the articulation root’s center of mass frame with respect to its actor frame.
- property root_link_pos_w: warp.array#
Root link position in simulation world frame. Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3).
This quantity is the position of the actor frame of the root rigid body relative to the world.
- property root_link_quat_w: warp.array#
Root link orientation (x, y, z, w) in simulation world frame. Shape is (num_instances,), dtype = wp.quatf. In torch this resolves to (num_instances, 4).
This quantity is the orientation of the actor frame of the root rigid body.
- property root_link_lin_vel_w: warp.array#
Root linear velocity in simulation world frame. Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3).
This quantity is the linear velocity of the root rigid body’s actor frame relative to the world.
- property root_link_ang_vel_w: warp.array#
Root link angular velocity in simulation world frame. Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3).
This quantity is the angular velocity of the actor frame of the root rigid body relative to the world.
- property root_com_pos_w: warp.array#
Root center of mass position in simulation world frame. Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3).
This quantity is the position of the center of mass frame of the root rigid body relative to the world.
- property root_com_quat_w: warp.array#
Root center of mass orientation (x, y, z, w) in simulation world frame. Shape is (num_instances,), dtype = wp.quatf. In torch this resolves to (num_instances, 4).
This quantity is the orientation of the principal axes of inertia of the root rigid body relative to the world.
- property root_com_lin_vel_w: warp.array#
Root center of mass linear velocity in simulation world frame. Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3).
This quantity is the linear velocity of the root rigid body’s center of mass frame relative to the world.
- property root_com_ang_vel_w: warp.array#
Root center of mass angular velocity in simulation world frame. Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3).
This quantity is the angular velocity of the root rigid body’s center of mass frame relative to the world.
- property body_link_pos_w: warp.array#
Positions of all bodies in simulation world frame. Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3).
This quantity is the position of the articulation bodies’ actor frame relative to the world.
- property body_link_quat_w: warp.array#
Orientation (x, y, z, w) of all bodies in simulation world frame. Shape is (num_instances, num_bodies), dtype = wp.quatf. In torch this resolves to (num_instances, num_bodies, 4).
This quantity is the orientation of the articulation bodies’ actor frame relative to the world.
- property body_link_lin_vel_w: warp.array#
Linear velocity of all bodies in simulation world frame. Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3).
This quantity is the linear velocity of the articulation bodies’ actor frame relative to the world.
- property body_link_ang_vel_w: warp.array#
Angular velocity of all bodies in simulation world frame. Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3).
This quantity is the angular velocity of the articulation bodies’ actor frame relative to the world.
- property body_com_pos_w: warp.array#
Positions of all bodies’ center of mass in simulation world frame. Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3).
This quantity is the position of the articulation bodies’ center of mass frame.
- property body_com_quat_w: warp.array#
Orientation (x, y, z, w) of the principal axes of inertia of all bodies in simulation world frame. Shape is (num_instances, num_bodies), dtype = wp.quatf. In torch this resolves to (num_instances, num_bodies, 4).
This quantity is the orientation of the articulation bodies’ principal axes of inertia.
- property body_com_lin_vel_w: warp.array#
Linear velocity of all bodies in simulation world frame. Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3).
This quantity is the linear velocity of the articulation bodies’ center of mass frame.
- property body_com_ang_vel_w: warp.array#
Angular velocity of all bodies in simulation world frame. Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3).
This quantity is the angular velocity of the articulation bodies’ center of mass frame.
- property body_com_lin_acc_w: warp.array#
Linear acceleration of all bodies in simulation world frame. Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3).
This quantity is the linear acceleration of the articulation bodies’ center of mass frame.
- property body_com_ang_acc_w: warp.array#
Angular acceleration of all bodies in simulation world frame. Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3).
This quantity is the angular acceleration of the articulation bodies’ center of mass frame.
- property body_com_pos_b: warp.array#
Center of mass position of all of the bodies in their respective link frames. Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3).
This quantity is the center of mass location relative to its body’s link frame.
- property body_com_quat_b: warp.array#
Orientation (x, y, z, w) of the principal axes of inertia of all of the bodies in their respective link frames. Shape is (num_instances, num_bodies), dtype = wp.quatf. In torch this resolves to (num_instances, num_bodies, 4).
This quantity is the orientation of the principal axes of inertia relative to its body’s link frame.
- property body_acc_w: warp.array#
Shorthand for
body_com_acc_w.
- property body_ang_acc_w: warp.array#
Shorthand for
body_com_ang_acc_w.
- property body_ang_vel_w: warp.array#
Shorthand for
body_com_ang_vel_w.
- property body_lin_acc_w: warp.array#
Shorthand for
body_com_lin_acc_w.
- property body_lin_vel_w: warp.array#
Shorthand for
body_com_lin_vel_w.
- property body_pos_w: warp.array#
Shorthand for
body_link_pos_w.
- property body_pose_w: warp.array#
Shorthand for
body_link_pose_w.
- property body_quat_w: warp.array#
Shorthand for
body_link_quat_w.
- property body_vel_w: warp.array#
Shorthand for
body_com_vel_w.
- property com_pos_b: warp.array#
Shorthand for
body_com_pos_b.
- property com_quat_b: warp.array#
Shorthand for
body_com_quat_b.
- property default_fixed_tendon_damping: warp.array#
Deprecated property. Please use
fixed_tendon_dampinginstead and manage the default fixed tendon damping manually.
- property default_fixed_tendon_limit: warp.array#
Deprecated property. Please use
default_fixed_tendon_pos_limitsinstead.
- property default_fixed_tendon_limit_stiffness: warp.array#
Deprecated property. Please use
fixed_tendon_limit_stiffnessinstead and manage the default fixed tendon limit stiffness manually.
- property default_fixed_tendon_offset: warp.array#
Deprecated property. Please use
fixed_tendon_offsetinstead and manage the default fixed tendon offset manually.
- property default_fixed_tendon_pos_limits: warp.array#
Deprecated property. Please use
fixed_tendon_pos_limitsinstead and manage the default fixed tendon position limits manually.
- property default_fixed_tendon_rest_length: warp.array#
Deprecated property. Please use
fixed_tendon_rest_lengthinstead and manage the default fixed tendon rest length manually.
- property default_fixed_tendon_stiffness: warp.array#
Deprecated property. Please use
fixed_tendon_stiffnessinstead and manage the default fixed tendon stiffness manually.
- property default_inertia: warp.array#
Deprecated property. Please use
body_inertiainstead and manage the default inertia manually.
- property default_joint_armature: warp.array#
Deprecated property. Please use
joint_armatureinstead and manage the default joint armature manually.
- property default_joint_damping: warp.array#
Deprecated property. Please use
joint_dampinginstead and manage the default joint damping manually.
- property default_joint_friction: warp.array#
Deprecated property. Please use
default_joint_friction_coeffinstead.
- property default_joint_friction_coeff: warp.array#
Deprecated property. Please use
joint_friction_coeffinstead and manage the default joint friction coefficient manually.
- property default_joint_limits: warp.array#
Shorthand for
default_joint_pos_limits.
- property default_joint_pos_limits: warp.array#
Deprecated property. Please use
joint_pos_limitsinstead and manage the default joint position limits manually.
- property default_joint_stiffness: warp.array#
Deprecated property. Please use
joint_stiffnessinstead and manage the default joint stiffness manually.
- property default_joint_viscous_friction_coeff: warp.array#
Deprecated property. Please use
joint_viscous_friction_coeffinstead and manage the default joint viscous friction coefficient manually.
- property default_mass: warp.array#
Deprecated property. Please use
body_massinstead and manage the default mass manually.
- property default_spatial_tendon_damping: warp.array#
Deprecated property. Please use
spatial_tendon_dampinginstead and manage the default spatial tendon damping manually.
- property default_spatial_tendon_limit_stiffness: warp.array#
Deprecated property. Please use
spatial_tendon_limit_stiffnessinstead and manage the default spatial tendon limit stiffness manually.
- property default_spatial_tendon_offset: warp.array#
Deprecated property. Please use
spatial_tendon_offsetinstead and manage the default spatial tendon offset manually.
- property default_spatial_tendon_stiffness: warp.array#
Deprecated property. Please use
spatial_tendon_stiffnessinstead and manage the default spatial tendon stiffness manually.
- property fixed_tendon_limit: warp.array#
Shorthand for
fixed_tendon_pos_limits.
- property joint_friction: warp.array#
Shorthand for
joint_friction_coeff.
- property joint_limits: warp.array#
Shorthand for
joint_pos_limits.
- property joint_velocity_limits: warp.array#
Shorthand for
joint_vel_limits.
- property root_ang_vel_b: warp.array#
Shorthand for
root_com_ang_vel_b.
- property root_ang_vel_w: warp.array#
Shorthand for
root_com_ang_vel_w.
- property root_lin_vel_b: warp.array#
Shorthand for
root_com_lin_vel_b.
- property root_lin_vel_w: warp.array#
Shorthand for
root_com_lin_vel_w.
- property root_pos_w: warp.array#
Shorthand for
root_link_pos_w.
- property root_pose_w: warp.array#
Shorthand for
root_link_pose_w.
- property root_quat_w: warp.array#
Shorthand for
root_link_quat_w.
- property root_vel_w: warp.array#
Shorthand for
root_com_vel_w.
- property default_root_state: warp.array#
Default root state
[pos, quat, lin_vel, ang_vel]in the local environment frame.The position and quaternion are of the articulation root’s actor frame. Meanwhile, the linear and angular velocities are of its center of mass frame. Shape is (num_instances, 13).
This quantity is configured through the
isaaclab.assets.ArticulationCfg.init_stateparameter.
- property root_state_w: warp.array#
Deprecated, same as
root_link_pose_wandroot_com_vel_w.
- property root_link_state_w: warp.array#
Deprecated, same as
root_link_pose_wandroot_link_vel_w.
- property root_com_state_w: warp.array#
Deprecated, same as
root_com_pose_wandroot_com_vel_w.
- property body_state_w#
State of all bodies [pos, quat, lin_vel, ang_vel] in simulation world frame. Shape is (num_instances, num_bodies, 13).
The position and quaternion are of all the articulation links’ actor frame. Meanwhile, the linear and angular velocities are of the articulation links’ center of mass frame.
- property body_link_state_w#
State of all bodies’ link frame`[pos, quat, lin_vel, ang_vel]` in simulation world frame. Shape is (num_instances, num_bodies, 13).
The position, quaternion, and linear/angular velocity are of the body’s link frame relative to the world.
- property body_com_state_w#
State of all bodies center of mass [pos, quat, lin_vel, ang_vel] in simulation world frame. Shape is (num_instances, num_bodies, 13).
The position, quaternion, and linear/angular velocity are of the body’s center of mass frame relative to the world. Center of mass frame is assumed to be the same orientation as the link rather than the orientation of the principal inertia.
Rigid Object#
- class isaaclab_physx.assets.RigidObject[source]#
Bases:
BaseRigidObjectA rigid object asset class.
Rigid objects are assets comprising of rigid bodies. They can be used to represent dynamic objects such as boxes, spheres, etc. A rigid body is described by its pose, velocity and mass distribution.
For an asset to be considered a rigid object, the root prim of the asset must have the USD RigidBodyAPI applied to it. This API is used to define the simulation properties of the rigid body. On playing the simulation, the physics engine will automatically register the rigid body and create a corresponding rigid body handle. This handle can be accessed using the
root_viewattribute.Note
For users familiar with Isaac Sim, the PhysX view class API is not the exactly same as Isaac Sim view class API. Similar to Isaac Lab, Isaac Sim wraps around the PhysX view API. However, as of now (2023.1 release), we see a large difference in initializing the view classes in Isaac Sim. This is because the view classes in Isaac Sim perform additional USD-related operations which are slow and also not required.
Attributes:
Configuration instance for the rigid object.
Data related to the asset.
Number of instances of the asset.
Number of bodies in the asset.
Ordered names of bodies in the rigid object.
Root view for the asset.
Instantaneous wrench composer.
Permanent wrench composer.
Deprecated property.
Memory device for computation.
Whether the asset has a debug visualization implemented.
Whether the asset is initialized.
Methods:
__init__(cfg)Initialize the rigid object.
reset([env_ids, env_mask])Reset the rigid object.
Write external wrench to the simulation.
update(dt)Updates the simulation data.
find_bodies(name_keys[, preserve_order])Find bodies in the rigid body based on the name keys.
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_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_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_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.
Set the root center of mass velocity over selected environment indices into the simulation.
Set the root center of mass velocity over selected environment mask into the simulation.
Set the root link velocity over selected environment indices into the simulation.
Set the root link velocity over selected environment mask into the simulation.
set_masses_index(*, masses[, body_ids, ...])Set masses of all bodies using indices.
set_masses_mask(*, masses[, body_mask, env_mask])Set masses of all bodies using masks.
set_coms_index(*, coms[, body_ids, env_ids, ...])Set center of mass pose of all bodies using indices.
set_coms_mask(*, coms[, body_mask, env_mask])Set center of mass pose of all bodies using masks.
set_inertias_index(*, inertias[, body_ids, ...])Set inertias of all bodies using indices.
set_inertias_mask(*, inertias[, body_mask, ...])Set inertias of all bodies using masks.
write_root_state_to_sim(root_state[, env_ids])Deprecated, same as
write_root_link_pose_to_sim_index()andwrite_root_com_velocity_to_sim_index().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.
set_coms(coms[, body_ids, env_ids])Deprecated, same as
set_coms_index().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_masses(masses[, body_ids, env_ids])Deprecated, same as
set_masses_index().set_visibility(visible[, env_ids])Set the visibility of the prims corresponding to the asset.
write_root_com_pose_to_sim(root_pose[, env_ids])Deprecated, same as
write_root_com_pose_to_sim_index().write_root_com_state_to_sim(root_state[, ...])Deprecated, same as
write_root_com_pose_to_sim_index()andwrite_root_com_velocity_to_sim_index().write_root_com_velocity_to_sim(root_velocity)Deprecated, same as
write_root_com_velocity_to_sim_index().write_root_link_pose_to_sim(root_pose[, env_ids])Deprecated, same as
write_root_link_pose_to_sim_index().write_root_link_velocity_to_sim(root_velocity)Deprecated, same as
write_root_link_velocity_to_sim_index().write_root_pose_to_sim(root_pose[, env_ids])Deprecated, same as
write_root_pose_to_sim_index().write_root_velocity_to_sim(root_velocity[, ...])Deprecated, same as
write_root_velocity_to_sim_index().write_root_link_state_to_sim(root_state[, ...])Deprecated, same as
write_root_link_pose_to_sim_index()andwrite_root_link_velocity_to_sim_index().- cfg: RigidObjectCfg#
Configuration instance for the rigid object.
- __init__(cfg: RigidObjectCfg)[source]#
Initialize the rigid object.
- Parameters:
cfg – A configuration instance.
- property data: RigidObjectData#
Data related to the asset.
- 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_bodies: int#
Number of bodies in the asset.
This is always 1 since each object is a single rigid body.
- property root_view#
Root view for the asset.
Note
Use this view with caution. It requires handling of tensors in a specific way.
- property instantaneous_wrench_composer: WrenchComposer#
Instantaneous wrench composer.
Returns a
WrenchComposerinstance. 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 permanent_wrench_composer: WrenchComposer#
Permanent wrench composer.
Returns a
WrenchComposerinstance. 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.
- reset(env_ids: Sequence[int] | None = None, env_mask: wp.array | None = None) None[source]#
Reset the rigid object.
- 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,).
- write_data_to_sim() None[source]#
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.
- update(dt: float) None[source]#
Updates the simulation data.
- Parameters:
dt – The time step size in seconds.
- find_bodies(name_keys: str | Sequence[str], preserve_order: bool = False) tuple[list[int], list[str]][source]#
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.
- write_root_pose_to_sim_index(*, root_pose: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[source]#
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 using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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.
- write_root_pose_to_sim_mask(*, root_pose: torch.Tensor | wp.array, env_mask: wp.array | None = None) None[source]#
Set the root pose over selected environment mask into the simulation.
Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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,).
- write_root_velocity_to_sim_index(*, root_velocity: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[source]#
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 using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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.
- write_root_velocity_to_sim_mask(*, root_velocity: torch.Tensor | wp.array, env_mask: wp.array | None = None) None[source]#
Set the root center of mass velocity over selected environment mask into the simulation.
Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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_root_link_pose_to_sim_index(*, root_pose: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False) None[source]#
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 using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
root_pose – Root link poses in simulation frame. Shape is (len(env_ids), 7) or (num_instances, 7), or (len(env_ids),) / (num_instances,) with dtype wp.transformf.
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_root_link_pose_to_sim_mask(*, root_pose: torch.Tensor | wp.array, env_mask: wp.array | None = None) None[source]#
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 using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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,).
- write_root_com_pose_to_sim_index(*, root_pose: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False) None[source]#
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 or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
root_pose – Root center of mass poses in simulation frame. Shape is (len(env_ids), 7) or (num_instances, 7), or (len(env_ids),) / (num_instances,) with dtype wp.transformf.
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_root_com_pose_to_sim_mask(*, root_pose: torch.Tensor | wp.array, env_mask: wp.array | None = None) None[source]#
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 using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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,).
- write_root_com_velocity_to_sim_index(*, root_velocity: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False) None[source]#
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 or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
root_velocity – Root center of mass velocities in simulation world frame. Shape is (len(env_ids), 6) or (num_instances, 6), or (len(env_ids),) / (num_instances,) with dtype wp.spatial_vectorf.
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_root_com_velocity_to_sim_mask(*, root_velocity: torch.Tensor | wp.array, env_mask: wp.array | None = None) None[source]#
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 using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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_root_link_velocity_to_sim_index(*, root_velocity: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False) None[source]#
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 or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
root_velocity – Root frame velocities in simulation world frame. Shape is (len(env_ids), 6) or (num_instances, 6), or (len(env_ids),) / (num_instances,) with dtype wp.spatial_vectorf.
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_root_link_velocity_to_sim_mask(*, root_velocity: torch.Tensor | wp.array, env_mask: wp.array | None = None) None[source]#
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 using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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,).
- 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, full_data: bool = False) None[source]#
Set masses of all bodies using indices.
Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
masses – Masses of all bodies. Shape is (len(env_ids), len(body_ids)) or (num_instances, num_bodies) if full_data.
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).
full_data – Whether to expect full data. Defaults to False.
- set_masses_mask(*, masses: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None[source]#
Set masses of all bodies using masks.
Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
masses – Masses of all bodies. Shape is (num_instances, num_bodies).
body_mask – Body mask. If None, then all bodies are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- 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, full_data: bool = False) None[source]#
Set center of mass pose of all bodies using indices.
Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
coms – Center of mass pose of all bodies. Shape is (len(env_ids), len(body_ids), 7) or (num_instances, num_bodies, 7) if full_data.
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 environments).
full_data – Whether to expect full data. Defaults to False.
- set_coms_mask(*, coms: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None[source]#
Set center of mass pose of all bodies using masks.
Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
coms – Center of mass pose of all bodies. Shape is (num_instances, num_bodies, 7).
body_mask – Body mask. If None, then all bodies are used.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- 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, full_data: bool = False) None[source]#
Set inertias of all bodies using indices.
Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
inertias – Inertias of all bodies. Shape is (len(env_ids), len(body_ids), 9) or (num_instances, num_bodies, 9) if full_data.
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).
full_data – Whether to expect full data. Defaults to False.
- set_inertias_mask(*, inertias: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None[source]#
Set inertias of all bodies using masks.
Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- write_root_state_to_sim(root_state: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None)[source]#
Deprecated, same as
write_root_link_pose_to_sim_index()andwrite_root_com_velocity_to_sim_index().
- 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 withwp.float32).
- property has_debug_vis_implementation: bool#
Whether the asset has a debug visualization implemented.
- property is_initialized: bool#
Whether the asset is initialized.
Returns True if the asset is initialized, False otherwise.
- 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().
- 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().
- 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().
- 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).
- 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().
- write_root_com_state_to_sim(root_state: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None)[source]#
Deprecated, same as
write_root_com_pose_to_sim_index()andwrite_root_com_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().
- write_root_link_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_link_pose_to_sim_index().
- write_root_link_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_link_velocity_to_sim_index().
- 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().
- 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().
- write_root_link_state_to_sim(root_state: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None)[source]#
Deprecated, same as
write_root_link_pose_to_sim_index()andwrite_root_link_velocity_to_sim_index().
- class isaaclab_physx.assets.RigidObjectData[source]#
Bases:
BaseRigidObjectDataData container for a rigid object.
This class contains the data for a rigid object in the simulation. The data includes the state of the root rigid body and the state of all the bodies in the object. The data is stored in the simulation world frame unless otherwise specified.
For a rigid body, there are two frames of reference that are used:
Actor frame: The frame of reference of the rigid body prim. This typically corresponds to the Xform prim with the rigid body schema.
Center of mass frame: The frame of reference of the center of mass of the rigid body.
Depending on the settings of the simulation, the actor frame and the center of mass frame may be the same. This needs to be taken into account when interpreting the data.
The data is lazily updated, meaning that the data is only updated when it is accessed. This is useful when the data is expensive to compute or retrieve. The data is updated when the timestamp of the buffer is older than the current simulation timestamp. The timestamp is updated whenever the data is updated.
Attributes:
Whether the rigid object data is fully instantiated and ready to use.
Body names in the order parsed by the simulation view.
Default root pose
[pos, quat]in local environment frame.Default root velocity
[lin_vel, ang_vel]in local environment frame.Root link pose
[pos, quat]in simulation world frame.Root link velocity
[lin_vel, ang_vel]in simulation world frame.Root center of mass pose
[pos, quat]in simulation world frame.Root center of mass velocity
[lin_vel, ang_vel]in simulation world frame.Mass of all bodies in the simulation world frame.
Inertia of all bodies in the simulation world frame.
Body link pose
[pos, quat]in simulation world frame.Body link velocity
[lin_vel, ang_vel]in simulation world frame.Body center of mass pose
[pos, quat]in simulation world frame.Body center of mass velocity
[lin_vel, ang_vel]in simulation world frame.Acceleration of all bodies
[lin_acc, ang_acc]in the simulation world frame.Center of mass pose
[pos, quat]of all bodies in their respective body's link frames.Projection of the gravity direction on base frame.
Yaw heading of the base frame (in radians).
Root link linear velocity in base frame.
Root link angular velocity in base frame.
Root center of mass linear velocity in base frame.
Root center of mass angular velocity in base frame.
Root link position in simulation world frame.
Root link orientation (x, y, z, w) in simulation world frame.
Root linear velocity in simulation world frame.
Root link angular velocity in simulation world frame.
Root center of mass position in simulation world frame.
Root center of mass orientation (x, y, z, w) in simulation world frame.
Root center of mass linear velocity in simulation world frame.
Root center of mass angular velocity in simulation world frame.
Positions of all bodies in simulation world frame.
Orientation (x, y, z, w) of all bodies in simulation world frame.
Linear velocity of all bodies in simulation world frame.
Angular velocity of all bodies in simulation world frame.
Positions of all bodies' center of mass in simulation world frame.
Orientation (x, y, z, w) of the principal axes of inertia of all bodies in simulation world frame.
Linear velocity of all bodies in simulation world frame.
Angular velocity of all bodies in simulation world frame.
Linear acceleration of all bodies in simulation world frame.
Angular acceleration of all bodies in simulation world frame.
Center of mass position of all of the bodies in their respective link frames.
Orientation (x, y, z, w) of the principal axes of inertia of all of the bodies in their respective link frames.
Default root state
[pos, quat, lin_vel, ang_vel]in local environment frame.Deprecated, same as
root_link_pose_wandroot_com_vel_w.Shorthand for
body_com_acc_w.Shorthand for
body_com_ang_acc_w.Shorthand for
body_com_ang_vel_w.Shorthand for
body_com_lin_acc_w.Shorthand for
body_com_lin_vel_w.Shorthand for
body_link_pos_w.Shorthand for
body_link_pose_w.Shorthand for
body_link_quat_w.Shorthand for
body_com_vel_w.Shorthand for
body_com_pos_b.Shorthand for
body_com_quat_b.Deprecated property.
Deprecated property.
Shorthand for
root_com_ang_vel_b.Shorthand for
root_com_ang_vel_w.Shorthand for
root_com_lin_vel_b.Shorthand for
root_com_lin_vel_w.Deprecated, same as
root_link_pose_wandroot_link_vel_w.Shorthand for
root_link_pos_w.Shorthand for
root_link_pose_w.Shorthand for
root_link_quat_w.Shorthand for
root_com_vel_w.Deprecated, same as
root_com_pose_wandroot_com_vel_w.Deprecated, same as
body_link_pose_wandbody_com_vel_w.Deprecated, same as
body_link_pose_wandbody_link_vel_w.Deprecated, same as
body_com_pose_wandbody_com_vel_w.Methods:
update(dt)Updates the data for the rigid object.
- update(dt: float) None[source]#
Updates the data for the rigid object.
- Parameters:
dt – The time step for the update. This must be a positive value.
- property default_root_pose: warp.array#
Default root pose
[pos, quat]in local environment frame.Shape is (num_instances,), dtype = wp.transformf. In torch this resolves to (num_instances, 7). The position and quaternion are of the rigid body’s actor frame.
- property default_root_vel: warp.array#
Default root velocity
[lin_vel, ang_vel]in local environment frame.Shape is (num_instances,), dtype = wp.spatial_vectorf. In torch this resolves to (num_instances, 6). The linear and angular velocities are of the rigid body’s center of mass frame.
- property root_link_pose_w: warp.array#
Root link pose
[pos, quat]in simulation world frame.Shape is (num_instances,), dtype = wp.transformf. In torch this resolves to (num_instances, 7). This quantity is the pose of the actor frame of the root rigid body relative to the world. The orientation is provided in (x, y, z, w) format.
- property root_link_vel_w: warp.array#
Root link velocity
[lin_vel, ang_vel]in simulation world frame.Shape is (num_instances,), dtype = wp.spatial_vectorf. In torch this resolves to (num_instances, 6). This quantity contains the linear and angular velocities of the actor frame of the root rigid body relative to the world.
- property root_com_pose_w: warp.array#
Root center of mass pose
[pos, quat]in simulation world frame.Shape is (num_instances,), dtype = wp.transformf. In torch this resolves to (num_instances, 7). This quantity is the pose of the center of mass frame of the root rigid body relative to the world. The orientation is provided in (x, y, z, w) format.
- property root_com_vel_w: warp.array#
Root center of mass velocity
[lin_vel, ang_vel]in simulation world frame.Shape is (num_instances,), dtype = wp.spatial_vectorf. In torch this resolves to (num_instances, 6). This quantity contains the linear and angular velocities of the root rigid body’s center of mass frame relative to the world.
- property body_mass: warp.array#
Mass of all bodies in the simulation world frame.
Shape is (num_instances, 1), dtype = wp.float32. In torch this resolves to (num_instances, 1).
- property body_inertia: warp.array#
Inertia of all bodies in the simulation world frame.
Shape is (num_instances, 1, 9), dtype = wp.float32. In torch this resolves to (num_instances, 1, 9).
- property body_link_pose_w: warp.array#
Body link pose
[pos, quat]in simulation world frame.Shape is (num_instances, 1), dtype = wp.transformf. In torch this resolves to (num_instances, 1, 7). This quantity is the pose of the actor frame of the rigid body relative to the world. The orientation is provided in (x, y, z, w) format.
- property body_link_vel_w: warp.array#
Body link velocity
[lin_vel, ang_vel]in simulation world frame.Shape is (num_instances, 1), dtype = wp.spatial_vectorf. In torch this resolves to (num_instances, 1, 6). This quantity contains the linear and angular velocities of the actor frame of the root rigid body relative to the world.
- property body_com_pose_w: warp.array#
Body center of mass pose
[pos, quat]in simulation world frame.Shape is (num_instances, 1), dtype = wp.transformf. In torch this resolves to (num_instances, 1, 7). This quantity is the pose of the center of mass frame of the rigid body relative to the world. The orientation is provided in (x, y, z, w) format.
- property body_com_vel_w: warp.array#
Body center of mass velocity
[lin_vel, ang_vel]in simulation world frame.Shape is (num_instances, 1), dtype = wp.spatial_vectorf. In torch this resolves to (num_instances, 1, 6). This quantity contains the linear and angular velocities of the root rigid body’s center of mass frame relative to the world.
- property body_com_acc_w: warp.array#
Acceleration of all bodies
[lin_acc, ang_acc]in the simulation world frame.Shape is (num_instances, 1), dtype = wp.spatial_vectorf. In torch this resolves to (num_instances, 1, 6). This quantity is the acceleration of the rigid bodies’ center of mass frame relative to the world.
- property body_com_pose_b: warp.array#
Center of mass pose
[pos, quat]of all bodies in their respective body’s link frames.Shape is (num_instances, 1), dtype = wp.transformf. In torch this resolves to (num_instances, 1, 7). This quantity is the pose of the center of mass frame of the rigid body relative to the body’s link frame. The orientation is provided in (x, y, z, w) format.
- property projected_gravity_b: warp.array#
Projection of the gravity direction on base frame.
Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3).
- property heading_w: warp.array#
Yaw heading of the base frame (in radians).
Shape is (num_instances,), dtype = wp.float32. In torch this resolves to (num_instances,).
Note
This quantity is computed by assuming that the forward-direction of the base frame is along x-direction, i.e. \((1, 0, 0)\).
- property root_link_lin_vel_b: warp.array#
Root link linear velocity in base frame.
Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3). This quantity is the linear velocity of the actor frame of the root rigid body frame with respect to the rigid body’s actor frame.
- property root_link_ang_vel_b: warp.array#
Root link angular velocity in base frame.
Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3). This quantity is the angular velocity of the actor frame of the root rigid body frame with respect to the rigid body’s actor frame.
- property root_com_lin_vel_b: warp.array#
Root center of mass linear velocity in base frame.
Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3). This quantity is the linear velocity of the root rigid body’s center of mass frame with respect to the rigid body’s actor frame.
- property root_com_ang_vel_b: warp.array#
Root center of mass angular velocity in base frame.
Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3). This quantity is the angular velocity of the root rigid body’s center of mass frame with respect to the rigid body’s actor frame.
- property root_link_pos_w: warp.array#
Root link position in simulation world frame.
Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3). This quantity is the position of the actor frame of the root rigid body relative to the world.
- property root_link_quat_w: warp.array#
Root link orientation (x, y, z, w) in simulation world frame.
Shape is (num_instances,), dtype = wp.quatf. In torch this resolves to (num_instances, 4). This quantity is the orientation of the actor frame of the root rigid body.
- property root_link_lin_vel_w: warp.array#
Root linear velocity in simulation world frame.
Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3). This quantity is the linear velocity of the root rigid body’s actor frame relative to the world.
- property root_link_ang_vel_w: warp.array#
Root link angular velocity in simulation world frame.
Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3). This quantity is the angular velocity of the actor frame of the root rigid body relative to the world.
- property root_com_pos_w: warp.array#
Root center of mass position in simulation world frame.
Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3). This quantity is the position of the center of mass frame of the root rigid body relative to the world.
- property root_com_quat_w: warp.array#
Root center of mass orientation (x, y, z, w) in simulation world frame.
Shape is (num_instances,), dtype = wp.quatf. In torch this resolves to (num_instances, 4). This quantity is the orientation of the principal axes of inertia of the root rigid body relative to the world.
- property root_com_lin_vel_w: warp.array#
Root center of mass linear velocity in simulation world frame.
Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3). This quantity is the linear velocity of the root rigid body’s center of mass frame relative to the world.
- property root_com_ang_vel_w: warp.array#
Root center of mass angular velocity in simulation world frame.
Shape is (num_instances,), dtype = wp.vec3f. In torch this resolves to (num_instances, 3). This quantity is the angular velocity of the root rigid body’s center of mass frame relative to the world.
- property body_link_pos_w: warp.array#
Positions of all bodies in simulation world frame.
Shape is (num_instances, 1), dtype = wp.vec3f. In torch this resolves to (num_instances, 1, 3). This quantity is the position of the rigid bodies’ actor frame relative to the world.
- property body_link_quat_w: warp.array#
Orientation (x, y, z, w) of all bodies in simulation world frame.
Shape is (num_instances, 1), dtype = wp.quatf. In torch this resolves to (num_instances, 1, 4). This quantity is the orientation of the rigid bodies’ actor frame relative to the world.
- property body_link_lin_vel_w: warp.array#
Linear velocity of all bodies in simulation world frame.
Shape is (num_instances, 1), dtype = wp.vec3f. In torch this resolves to (num_instances, 1, 3). This quantity is the linear velocity of the rigid bodies’ actor frame relative to the world.
- property body_link_ang_vel_w: warp.array#
Angular velocity of all bodies in simulation world frame.
Shape is (num_instances, 1), dtype = wp.vec3f. In torch this resolves to (num_instances, 1, 3). This quantity is the angular velocity of the rigid bodies’ actor frame relative to the world.
- property body_com_pos_w: warp.array#
Positions of all bodies’ center of mass in simulation world frame.
Shape is (num_instances, 1), dtype = wp.vec3f. In torch this resolves to (num_instances, 1, 3). This quantity is the position of the rigid bodies’ center of mass frame.
- property body_com_quat_w: warp.array#
Orientation (x, y, z, w) of the principal axes of inertia of all bodies in simulation world frame.
Shape is (num_instances, 1), dtype = wp.quatf. In torch this resolves to (num_instances, 1, 4). This quantity is the orientation of the principal axes of inertia of the rigid bodies.
- property body_com_lin_vel_w: warp.array#
Linear velocity of all bodies in simulation world frame.
Shape is (num_instances, 1), dtype = wp.vec3f. In torch this resolves to (num_instances, 1, 3). This quantity is the linear velocity of the rigid bodies’ center of mass frame.
- property body_com_ang_vel_w: warp.array#
Angular velocity of all bodies in simulation world frame.
Shape is (num_instances, 1), dtype = wp.vec3f. In torch this resolves to (num_instances, 1, 3). This quantity is the angular velocity of the rigid bodies’ center of mass frame.
- property body_com_lin_acc_w: warp.array#
Linear acceleration of all bodies in simulation world frame.
Shape is (num_instances, 1), dtype = wp.vec3f. In torch this resolves to (num_instances, 1, 3). This quantity is the linear acceleration of the rigid bodies’ center of mass frame.
- property body_com_ang_acc_w: warp.array#
Angular acceleration of all bodies in simulation world frame.
Shape is (num_instances, 1), dtype = wp.vec3f. In torch this resolves to (num_instances, 1, 3). This quantity is the angular acceleration of the rigid bodies’ center of mass frame.
- property body_com_pos_b: warp.array#
Center of mass position of all of the bodies in their respective link frames.
Shape is (num_instances, 1), dtype = wp.vec3f. In torch this resolves to (num_instances, 1, 3). This quantity is the center of mass location relative to its body’s link frame.
- property body_com_quat_b: warp.array#
Orientation (x, y, z, w) of the principal axes of inertia of all of the bodies in their respective link frames.
Shape is (num_instances, 1), dtype = wp.quatf. In torch this resolves to (num_instances, 1, 4). This quantity is the orientation of the principal axes of inertia relative to its body’s link frame.
- property default_root_state: warp.array#
Default root state
[pos, quat, lin_vel, ang_vel]in local environment frame.The position and quaternion are of the rigid body’s actor frame. Meanwhile, the linear and angular velocities are of the center of mass frame. Shape is (num_instances, 13).
- property root_state_w: warp.array#
Deprecated, same as
root_link_pose_wandroot_com_vel_w.
- property body_acc_w: warp.array#
Shorthand for
body_com_acc_w.
- property body_ang_acc_w: warp.array#
Shorthand for
body_com_ang_acc_w.
- property body_ang_vel_w: warp.array#
Shorthand for
body_com_ang_vel_w.
- property body_lin_acc_w: warp.array#
Shorthand for
body_com_lin_acc_w.
- property body_lin_vel_w: warp.array#
Shorthand for
body_com_lin_vel_w.
- property body_pos_w: warp.array#
Shorthand for
body_link_pos_w.
- property body_pose_w: warp.array#
Shorthand for
body_link_pose_w.
- property body_quat_w: warp.array#
Shorthand for
body_link_quat_w.
- property body_vel_w: warp.array#
Shorthand for
body_com_vel_w.
- property com_pos_b: warp.array#
Shorthand for
body_com_pos_b.
- property com_quat_b: warp.array#
Shorthand for
body_com_quat_b.
- property default_inertia: warp.array#
Deprecated property. Please use
body_inertiainstead and manage the default inertia manually.
- property default_mass: warp.array#
Deprecated property. Please use
body_massinstead and manage the default mass manually.
- property root_ang_vel_b: warp.array#
Shorthand for
root_com_ang_vel_b.
- property root_ang_vel_w: warp.array#
Shorthand for
root_com_ang_vel_w.
- property root_lin_vel_b: warp.array#
Shorthand for
root_com_lin_vel_b.
- property root_lin_vel_w: warp.array#
Shorthand for
root_com_lin_vel_w.
- property root_link_state_w: warp.array#
Deprecated, same as
root_link_pose_wandroot_link_vel_w.
- property root_pos_w: warp.array#
Shorthand for
root_link_pos_w.
- property root_pose_w: warp.array#
Shorthand for
root_link_pose_w.
- property root_quat_w: warp.array#
Shorthand for
root_link_quat_w.
- property root_vel_w: warp.array#
Shorthand for
root_com_vel_w.
- property root_com_state_w: warp.array#
Deprecated, same as
root_com_pose_wandroot_com_vel_w.
- property body_state_w: warp.array#
Deprecated, same as
body_link_pose_wandbody_com_vel_w.
- property body_link_state_w: warp.array#
Deprecated, same as
body_link_pose_wandbody_link_vel_w.
- property body_com_state_w: warp.array#
Deprecated, same as
body_com_pose_wandbody_com_vel_w.
Rigid Object Collection#
- class isaaclab_physx.assets.RigidObjectCollection[source]#
Bases:
BaseRigidObjectCollectionA rigid object collection class.
This class represents a collection of rigid objects in the simulation, where the state of the rigid objects can be accessed and modified using a batched
(env_ids, object_ids)API.For each rigid body in the collection, the root prim of the asset must have the USD RigidBodyAPI applied to it. This API is used to define the simulation properties of the rigid bodies. On playing the simulation, the physics engine will automatically register the rigid bodies and create a corresponding rigid body handle. This handle can be accessed using the
root_viewattribute.Rigid objects in the collection are uniquely identified via the key of the dictionary
rigid_objectsin theRigidObjectCollectionCfgconfiguration class. This differs from theRigidObjectclass, where a rigid object is identified by the name of the Xform where the USD RigidBodyAPI is applied. This would not be possible for the rigid object collection since therigid_objectsdictionary could contain the same rigid object multiple times, leading to ambiguity.Methods:
__init__(cfg)Initialize the rigid object.
reset([env_ids, object_ids, env_mask, ...])Resets all internal buffers of selected environments and objects.
Write external wrench to the simulation.
update(dt)Updates the simulation data.
find_bodies(name_keys[, preserve_order])Find bodies in the rigid body collection based on the name keys.
write_body_pose_to_sim_index(*, body_poses)Set the body pose over selected environment and body indices into the simulation.
write_body_pose_to_sim_mask(*, body_poses[, ...])Set the body pose over selected environment mask into the simulation.
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 mask into the simulation.
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 mask into the simulation.
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 mask into the simulation.
Set the body center of mass velocity over selected environment and body indices into the simulation.
Set the body center of mass velocity over selected environment mask into the simulation.
Set the body link velocity over selected environment and body indices into the simulation.
Set the body link velocity over selected environment mask into the simulation.
set_masses_index(*, masses[, body_ids, ...])Set masses of all bodies using indices.
set_masses_mask(*, masses[, body_mask, env_mask])Set masses of all bodies using masks.
set_coms_index(*, coms[, body_ids, env_ids, ...])Set center of mass pose of all bodies using indices.
set_coms_mask(*, coms[, body_mask, env_mask])Set center of mass pose of all bodies using masks.
set_inertias_index(*, inertias[, body_ids, ...])Set inertias of all bodies using indices.
set_inertias_mask(*, inertias[, body_mask, ...])Set inertias of all bodies using masks.
reshape_view_to_data_2d(data[, device])Reshapes and arranges the data from the physics view to (num_instances, num_bodies, data_size).
reshape_view_to_data_3d(data, data_dim[, device])Reshapes and arranges 3D view data to (num_instances, num_bodies, data_dim).
reshape_data_to_view_2d(data[, device])Reshapes and arranges the data to the be consistent with data from the
root_view.reshape_data_to_view_3d(data, data_dim[, device])Reshapes and arranges 3D data to (num_bodies * num_instances, data_dim).
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_objects(name_keys[, preserve_order])Deprecated method.
set_coms(coms[, body_ids, env_ids])Deprecated, same as
set_coms_index().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_masses(masses[, body_ids, env_ids])Deprecated, same as
set_masses_index().set_visibility(visible[, env_ids])Set the visibility of the prims corresponding to the asset.
write_body_com_pose_to_sim(body_poses[, ...])Deprecated, same as
write_body_com_pose_to_sim_index().write_body_com_velocity_to_sim(body_velocities)Deprecated, same as
write_body_com_velocity_to_sim_index().write_body_link_pose_to_sim(body_poses[, ...])Deprecated, same as
write_body_link_pose_to_sim_index().write_body_link_velocity_to_sim(body_velocities)Deprecated, same as
write_body_link_velocity_to_sim_index().write_body_pose_to_sim(body_poses[, ...])Deprecated, same as
write_body_pose_to_sim_index().write_body_state_to_sim(body_states[, ...])Deprecated, same as
write_body_link_pose_to_sim_index()andwrite_body_com_velocity_to_sim_index().write_body_velocity_to_sim(body_velocities)Deprecated, same as
write_body_velocity_to_sim_index().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.
write_body_com_state_to_sim(body_states[, ...])Deprecated, same as
write_body_com_pose_to_sim_index()andwrite_body_com_velocity_to_sim_index().write_body_link_state_to_sim(body_states[, ...])Deprecated, same as
write_body_link_pose_to_sim_index()andwrite_body_link_velocity_to_sim_index().Attributes:
Configuration instance for the rigid object.
Data related to the asset.
Number of instances of the asset.
Number of bodies in the rigid object collection.
Ordered names of bodies in the rigid object collection.
Root view for the rigid object collection.
Instantaneous wrench composer.
Permanent wrench composer.
Deprecated property.
Memory device for computation.
Whether the asset has a debug visualization implemented.
Whether the asset is initialized.
Deprecated property.
Deprecated property.
- __init__(cfg: RigidObjectCollectionCfg)[source]#
Initialize the rigid object.
- Parameters:
cfg – A configuration instance.
- cfg: RigidObjectCollectionCfg#
Configuration instance for the rigid object.
- property data: RigidObjectCollectionData#
Data related to the asset.
- 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 root_view#
Root view for the rigid object collection.
Note
Use this view with caution. It requires handling of tensors in a specific way.
- property instantaneous_wrench_composer: WrenchComposer#
Instantaneous wrench composer.
Returns a
WrenchComposerinstance. 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 permanent_wrench_composer: WrenchComposer#
Permanent wrench composer.
Returns a
WrenchComposerinstance. 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.
- reset(env_ids: torch.Tensor | None = None, object_ids: slice | torch.Tensor | None = None, env_mask: wp.array | None = None, object_mask: wp.array | None = None) None[source]#
Resets all internal buffers of selected environments and objects.
- Parameters:
env_ids – Environment indices. If None, then all indices are used.
object_ids – Object indices. If None, then all indices are used.
- write_data_to_sim() None[source]#
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.
- update(dt: float) None[source]#
Updates the simulation data.
- Parameters:
dt – The time step size in seconds.
- find_bodies(name_keys: str | Sequence[str], preserve_order: bool = False) tuple[torch.Tensor, list[str]][source]#
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.
- write_body_pose_to_sim_index(*, body_poses: torch.Tensor | wp.array, body_ids: Sequence[int] | torch.Tensor | wp.array | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[source]#
Set the body pose 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 using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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.
- 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[source]#
Set the body pose over selected environment 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 using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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 updated. Shape is (num_bodies,).
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- write_body_velocity_to_sim_index(*, body_velocities: torch.Tensor | wp.array, body_ids: Sequence[int] | torch.Tensor | wp.array | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[source]#
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 using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
body_velocities – Body velocities in simulation frame. Shape is (len(env_ids), len(body_ids), 6) or (num_instances, num_bodies, 6), or (len(env_ids), len(body_ids)) / (num_instances, num_bodies) 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.
- 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[source]#
Set the body 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 body’s center of mass rather than the body’s frame.
Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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 updated. Shape is (num_bodies,).
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- write_body_link_pose_to_sim_index(*, body_poses: torch.Tensor | wp.array, body_ids: Sequence[int] | torch.Tensor | wp.array | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False) None[source]#
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 using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
body_poses – Body link poses in simulation frame. Shape is (len(env_ids), len(body_ids), 7) or (num_instances, num_bodies, 7), or (len(env_ids), len(body_ids)) / (num_instances, num_bodies) 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.
full_data – Whether to expect full data. Defaults to False.
- write_body_link_pose_to_sim_mask(*, body_poses: torch.Tensor | wp.array, env_mask: wp.array | None = None, body_ids: Sequence[int] | torch.Tensor | wp.array | slice | None = None) None[source]#
Set the body link pose over selected environment 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 using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
body_ids – Body indices. If None, then all indices are used.
- write_body_com_pose_to_sim_index(*, body_poses: torch.Tensor | wp.array, body_ids: Sequence[int] | torch.Tensor | wp.array | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False) None[source]#
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 using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
body_poses – Body center of mass poses in simulation frame. Shape is (len(env_ids), len(body_ids), 7) or (num_instances, num_bodies, 7), or (len(env_ids), len(body_ids)) / (num_instances, num_bodies) 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.
full_data – Whether to expect full data. Defaults to False.
- write_body_com_pose_to_sim_mask(*, body_poses: torch.Tensor | wp.array, env_mask: wp.array | None = None, body_ids: Sequence[int] | torch.Tensor | wp.array | slice | None = None) None[source]#
Set the body center of mass pose over selected environment 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 using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
body_ids – Body indices. If None, then all indices are used.
- write_body_com_velocity_to_sim_index(*, body_velocities: torch.Tensor | wp.array, body_ids: Sequence[int] | torch.Tensor | wp.array | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False) None[source]#
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 using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
body_velocities – Body center of mass velocities in simulation frame. Shape is (len(env_ids), len(body_ids), 6) or (num_instances, num_bodies, 6), or (len(env_ids), len(body_ids)) / (num_instances, num_bodies) 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.
full_data – Whether to expect full data. Defaults to False.
- write_body_com_velocity_to_sim_mask(*, body_velocities: torch.Tensor | wp.array, env_mask: wp.array | None = None, body_ids: Sequence[int] | torch.Tensor | wp.array | slice | None = None) None[source]#
Set the body 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 body’s center of mass rather than the body’s frame.
Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
body_ids – Body indices. If None, then all indices are used.
- write_body_link_velocity_to_sim_index(*, body_velocities: torch.Tensor | wp.array, body_ids: Sequence[int] | torch.Tensor | wp.array | slice | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False) None[source]#
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 using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
body_velocities – Body link velocities in simulation frame. Shape is (len(env_ids), len(body_ids), 6) or (num_instances, num_bodies, 6), or (len(env_ids), len(body_ids)) / (num_instances, num_bodies) 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.
full_data – Whether to expect full data. Defaults to False.
- write_body_link_velocity_to_sim_mask(*, body_velocities: torch.Tensor | wp.array, env_mask: wp.array | None = None, body_ids: Sequence[int] | torch.Tensor | wp.array | slice | None = None) None[source]#
Set the body 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 body’s frame rather than the body’s center of mass.
Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to 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.
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
body_ids – Body indices. If None, then all indices are used.
- 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, full_data: bool = False) None[source]#
Set masses of all bodies using indices.
Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
masses – Masses of all bodies. Shape is
(len(env_ids), len(body_ids))or(num_instances, num_bodies)if full_data.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).
full_data – Whether to expect full data. Defaults to False.
- set_masses_mask(*, masses: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None[source]#
Set masses of all bodies using masks.
Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
masses – Masses of all bodies. Shape is
(num_instances, num_bodies).body_mask – Body mask. If None, then all bodies are updated. Shape is (num_bodies,).
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- 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, full_data: bool = False) None[source]#
Set center of mass pose of all bodies using indices.
Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
coms – Center of mass pose of all bodies. Shape is
(len(env_ids), len(body_ids), 7)or(num_instances, num_bodies, 7)if full_data.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 environments).
full_data – Whether to expect full data. Defaults to False.
- set_coms_mask(*, coms: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None[source]#
Set center of mass pose of all bodies using masks.
Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
coms – Center of mass pose of all bodies. Shape is
(num_instances, num_bodies, 7).body_mask – Body mask. If None, then all bodies are updated. Shape is (num_bodies,).
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- 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, full_data: bool = False) None[source]#
Set inertias of all bodies using indices.
Note
This method expects partial data or full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
inertias – Inertias of all bodies. Shape is
(len(env_ids), len(body_ids), 9)or(num_instances, num_bodies, 9)if full_data.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).
full_data – Whether to expect full data. Defaults to False.
- set_inertias_mask(*, inertias: torch.Tensor | wp.array, body_mask: wp.array | None = None, env_mask: wp.array | None = None) None[source]#
Set inertias of all bodies using masks.
Note
This method expects full data.
Tip
For maximum performance we recommend using the index method. This is because in PhysX, the tensor API is only supporting indexing, hence masks need to be converted to indices.
- Parameters:
inertias – Inertias of all bodies. Shape is
(num_instances, num_bodies, 9).body_mask – Body mask. If None, then all bodies are updated. Shape is (num_bodies,).
env_mask – Environment mask. If None, then all the instances are updated. Shape is (num_instances,).
- reshape_view_to_data_2d(data: warp.array, device: str = 'cpu') warp.array[source]#
Reshapes and arranges the data from the physics view to (num_instances, num_bodies, data_size).
The view returns data ordered as:
(num_bodies * num_instances,)[body0_env0, body0_env1, ..., body1_env0, body1_env1, ...]This function returns the data arranged as:
[[env_0_body_0, env_0_body_1, ...], [env_1_body_0, env_1_body_1, ...], ...]
The shape of the returned data is
(num_instances, num_bodies).- Parameters:
data – The data from the physics view. Shape is (num_instances * num_bodies).
- Returns:
The reshaped data. Shape is (num_instances, num_bodies).
- reshape_view_to_data_3d(data: warp.array, data_dim: int, device: str = 'cpu') warp.array[source]#
Reshapes and arranges 3D view data to (num_instances, num_bodies, data_dim).
The view returns data ordered as
(num_bodies * num_instances, data_dim):[[body0_env0_data_0, body0_env0_data_1, ...], [body0_env1_data_0, body0_env1_data_1, ...], ...]
This function returns the data arranged as
(num_instances, num_bodies, data_dim):[ [[env_0_body_0_data_0, env_0_body_0_data_1, ...], [env_0_body_1_data_0, env_0_body_1_data_1, ...], ...], [[env_1_body_0_data_0, env_1_body_0_data_1, ...], [env_1_body_1_data_0, env_1_body_1_data_1, ...], ...], ..., ]
- Parameters:
data – The data from the physics view. Shape is (num_bodies * num_instances, data_dim).
data_dim – The trailing dimension size.
- Returns:
The reshaped data. Shape is (num_instances, num_bodies, data_dim).
- reshape_data_to_view_2d(data: warp.array, device: str = 'cpu') warp.array[source]#
Reshapes and arranges the data to the be consistent with data from the
root_view.- Our internal methods consume and return data arranged as:
- [[env_0_body_0, env_0_body_1, …],
[env_1_body_0, env_1_body_1, …], …]
- The view needs data ordered as: (num_bodies * num_instances,)
[body0_env0, body0_env1, …, body1_env0, body1_env1, …]
- Parameters:
data – The data to be formatted for the view. Shape is (num_instances, num_bodies).
- Returns:
The data formatted for the view. Shape is (num_bodies * num_instances,).
- reshape_data_to_view_3d(data: warp.array, data_dim: int, device: str = 'cpu') warp.array[source]#
Reshapes and arranges 3D data to (num_bodies * num_instances, data_dim).
Our internal methods consume and return data arranged as
(num_instances, num_bodies, data_dim):[ [[env_0_body_0_data_0, env_0_body_0_data_1, ...], [env_0_body_1_data_0, env_0_body_1_data_1, ...], ...], [[env_1_body_0_data_0, env_1_body_0_data_1, ...], [env_1_body_1_data_0, env_1_body_1_data_1, ...], ...], ..., ]
The view needs data ordered as
(num_bodies * num_instances, data_dim):[[body0_env0_data_0, body0_env0_data_1, ...], [body0_env1_data_0, body0_env1_data_1, ...], ...]
- Parameters:
data – The data to be formatted for the view. Shape is (num_instances, num_bodies, data_dim).
data_dim – The trailing dimension size.
- Returns:
The data formatted for the view. Shape is (num_bodies * num_instances, data_dim).
- property root_physx_view: omni.physics.tensors.impl.api.RigidBodyView#
Deprecated property. Please use
root_viewinstead.
- 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 withwp.float32).
- find_objects(name_keys: str | Sequence[str], preserve_order: bool = False) tuple[torch.Tensor, list[str]]#
Deprecated method. Please use
find_bodies()instead.
- property has_debug_vis_implementation: bool#
Whether the asset has a debug visualization implemented.
- property is_initialized: bool#
Whether the asset is initialized.
Returns True if the asset is initialized, False otherwise.
- property num_objects: int#
Deprecated property. Please use
num_bodiesinstead.
- property object_names: list[str]#
Deprecated property. Please use
body_namesinstead.
- 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().
- 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().
- 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().
- 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).
- 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().
- 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().
- write_body_link_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_link_pose_to_sim_index().
- write_body_link_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_link_velocity_to_sim_index().
- 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().
- 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[source]#
Deprecated, same as
write_body_link_pose_to_sim_index()andwrite_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().
- 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()andwrite_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.
- write_object_link_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_link_pose_to_sim_index()instead.
- write_object_link_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()andwrite_body_link_velocity_to_sim_index()instead.
- write_object_link_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_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()andwrite_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.
- 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[source]#
Deprecated, same as
write_body_com_pose_to_sim_index()andwrite_body_com_velocity_to_sim_index().
- write_body_link_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[source]#
Deprecated, same as
write_body_link_pose_to_sim_index()andwrite_body_link_velocity_to_sim_index().
- class isaaclab_physx.assets.RigidObjectCollectionData[source]#
Bases:
BaseRigidObjectCollectionDataData container for a rigid object collection.
This class contains the data for a rigid object collection in the simulation. The data includes the state of all the bodies in the collection. The data is stored in the simulation world frame unless otherwise specified. The data is in the order
(num_instances, num_objects, data_size), where data_size is the size of the data.For a rigid body, there are two frames of reference that are used:
Actor frame: The frame of reference of the rigid body prim. This typically corresponds to the Xform prim with the rigid body schema.
Center of mass frame: The frame of reference of the center of mass of the rigid body.
Depending on the settings of the simulation, the actor frame and the center of mass frame may be the same. This needs to be taken into account when interpreting the data.
The data is lazily updated, meaning that the data is only updated when it is accessed. This is useful when the data is expensive to compute or retrieve. The data is updated when the timestamp of the buffer is older than the current simulation timestamp. The timestamp is updated whenever the data is updated.
Attributes:
Whether the rigid object collection data is fully instantiated and ready to use.
Body names in the order parsed by the simulation view.
Default body pose
[pos, quat]in local environment frame.Default body velocity
[lin_vel, ang_vel]in local environment frame.Body link pose
[pos, quat]in simulation world frame.Body link velocity
[lin_vel, ang_vel]in simulation world frame.Body center of mass pose
[pos, quat]in simulation world frame.Body center of mass velocity
[lin_vel, ang_vel]in simulation world frame.Acceleration of all bodies
[lin_acc, ang_acc]in the simulation world frame.Center of mass pose
[pos, quat]of all bodies in their respective body's link frames.Mass of all bodies in the simulation world frame.
Inertia of all bodies in the simulation world frame.
Projection of the gravity direction on base frame.
Yaw heading of the base frame (in radians).
Root link linear velocity in base frame.
Root link angular velocity in base frame.
Root center of mass linear velocity in base frame.
Root center of mass angular velocity in base frame.
Positions of all bodies in simulation world frame.
Orientation (x, y, z, w) of all bodies in simulation world frame.
Linear velocity of all bodies in simulation world frame.
Angular velocity of all bodies in simulation world frame.
Positions of all bodies' center of mass in simulation world frame.
Orientation (x, y, z, w) of the principal axes of inertia of all bodies in simulation world frame.
Linear velocity of all bodies in simulation world frame.
Angular velocity of all bodies in simulation world frame.
Linear acceleration of all bodies in simulation world frame.
Angular acceleration of all bodies in simulation world frame.
Center of mass position of all of the bodies in their respective link frames.
Orientation (x, y, z, w) of the principal axes of inertia of all of the bodies in their respective link frames.
Shorthand for
body_com_acc_w.Shorthand for
body_com_ang_acc_w.Shorthand for
body_com_ang_vel_w.Shorthand for
body_com_lin_acc_w.Shorthand for
body_com_lin_vel_w.Shorthand for
body_link_pos_w.Shorthand for
body_link_pose_w.Shorthand for
body_link_quat_w.Shorthand for
body_com_vel_w.Shorthand for
body_com_pos_b.Shorthand for
body_com_quat_b.Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Deprecated property.
Default root state
[pos, quat, lin_vel, ang_vel]in local environment frame.Deprecated, same as
body_link_pose_wandbody_com_vel_w.Deprecated, same as
body_link_pose_wandbody_link_vel_w.Deprecated, same as
body_com_pose_wandbody_com_vel_w.Methods:
update(dt)Updates the data for the rigid object collection.
- property is_primed: bool#
Whether the rigid object collection data is fully instantiated and ready to use.
- update(dt: float) None[source]#
Updates the data for the rigid object collection.
- Parameters:
dt – The time step for the update. This must be a positive value.
- property default_body_pose: warp.array#
Default body pose
[pos, quat]in local environment frame.The position and quaternion are of the rigid body’s actor frame. Shape is (num_instances, num_bodies), dtype = wp.transformf. In torch this resolves to (num_instances, num_bodies, 7).
- property default_body_vel: warp.array#
Default body velocity
[lin_vel, ang_vel]in local environment frame.The linear and angular velocities are of the rigid body’s center of mass frame. Shape is (num_instances, num_bodies), dtype = wp.spatial_vectorf. In torch this resolves to (num_instances, num_bodies, 6).
- property body_link_pose_w: warp.array#
Body link pose
[pos, quat]in simulation world frame.Shape is (num_instances, num_bodies), dtype = wp.transformf. In torch this resolves to (num_instances, num_bodies, 7). This quantity is the pose of the actor frame of the rigid body relative to the world. The orientation is provided in (x, y, z, w) format.
- property body_link_vel_w: warp.array#
Body link velocity
[lin_vel, ang_vel]in simulation world frame.Shape is (num_instances, num_bodies), dtype = wp.spatial_vectorf. In torch this resolves to (num_instances, num_bodies, 6). This quantity contains the linear and angular velocities of the actor frame of the root rigid body relative to the world.
- property body_com_pose_w: warp.array#
Body center of mass pose
[pos, quat]in simulation world frame.Shape is (num_instances, num_bodies), dtype = wp.transformf. In torch this resolves to (num_instances, num_bodies, 7). This quantity is the pose of the center of mass frame of the rigid body relative to the world. The orientation is provided in (x, y, z, w) format.
- property body_com_vel_w: warp.array#
Body center of mass velocity
[lin_vel, ang_vel]in simulation world frame.Shape is (num_instances, num_bodies), dtype = wp.spatial_vectorf. In torch this resolves to (num_instances, num_bodies, 6). This quantity contains the linear and angular velocities of the root rigid body’s center of mass frame relative to the world.
- property body_com_acc_w: warp.array#
Acceleration of all bodies
[lin_acc, ang_acc]in the simulation world frame.Shape is (num_instances, num_bodies), dtype = wp.spatial_vectorf. In torch this resolves to (num_instances, num_bodies, 6). This quantity is the acceleration of the rigid bodies’ center of mass frame relative to the world.
- property body_com_pose_b: warp.array#
Center of mass pose
[pos, quat]of all bodies in their respective body’s link frames.Shape is (num_instances, num_bodies), dtype = wp.transformf. In torch this resolves to (num_instances, num_bodies, 7). This quantity is the pose of the center of mass frame of the rigid body relative to the body’s link frame. The orientation is provided in (x, y, z, w) format.
- property body_mass: warp.array#
Mass of all bodies in the simulation world frame.
Shape is (num_instances, num_bodies), dtype = wp.float32. In torch this resolves to (num_instances, num_bodies).
- property body_inertia: warp.array#
Inertia of all bodies in the simulation world frame.
Shape is (num_instances, num_bodies, 9), dtype = wp.float32. In torch this resolves to (num_instances, num_bodies, 9).
- property projected_gravity_b: warp.array#
Projection of the gravity direction on base frame.
Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3).
- property heading_w: warp.array#
Yaw heading of the base frame (in radians).
Shape is (num_instances, num_bodies), dtype = wp.float32. In torch this resolves to (num_instances, num_bodies).
Note
This quantity is computed by assuming that the forward-direction of the base frame is along x-direction, i.e. \((1, 0, 0)\).
- property body_link_lin_vel_b: warp.array#
Root link linear velocity in base frame.
Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3). This quantity is the linear velocity of the actor frame of the root rigid body frame with respect to the rigid body’s actor frame.
- property body_link_ang_vel_b: warp.array#
Root link angular velocity in base frame.
Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3). This quantity is the angular velocity of the actor frame of the root rigid body frame with respect to the rigid body’s actor frame.
- property body_com_lin_vel_b: warp.array#
Root center of mass linear velocity in base frame.
Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3). This quantity is the linear velocity of the root rigid body’s center of mass frame with respect to the rigid body’s actor frame.
- property body_com_ang_vel_b: warp.array#
Root center of mass angular velocity in base frame.
Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3). This quantity is the angular velocity of the root rigid body’s center of mass frame with respect to the rigid body’s actor frame.
- property body_link_pos_w: warp.array#
Positions of all bodies in simulation world frame.
Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3). This quantity is the position of the rigid bodies’ actor frame relative to the world.
- property body_link_quat_w: warp.array#
Orientation (x, y, z, w) of all bodies in simulation world frame.
Shape is (num_instances, num_bodies), dtype = wp.quatf. In torch this resolves to (num_instances, num_bodies, 4). This quantity is the orientation of the rigid bodies’ actor frame relative to the world.
- property body_link_lin_vel_w: warp.array#
Linear velocity of all bodies in simulation world frame.
Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3). This quantity is the linear velocity of the rigid bodies’ actor frame relative to the world.
- property body_link_ang_vel_w: warp.array#
Angular velocity of all bodies in simulation world frame.
Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3). This quantity is the angular velocity of the rigid bodies’ actor frame relative to the world.
- property body_com_pos_w: warp.array#
Positions of all bodies’ center of mass in simulation world frame.
Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3). This quantity is the position of the rigid bodies’ center of mass frame.
- property body_com_quat_w: warp.array#
Orientation (x, y, z, w) of the principal axes of inertia of all bodies in simulation world frame.
Shape is (num_instances, num_bodies), dtype = wp.quatf. In torch this resolves to (num_instances, num_bodies, 4). This quantity is the orientation of the principal axes of inertia of the rigid bodies.
- property body_com_lin_vel_w: warp.array#
Linear velocity of all bodies in simulation world frame.
Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3). This quantity is the linear velocity of the rigid bodies’ center of mass frame.
- property body_com_ang_vel_w: warp.array#
Angular velocity of all bodies in simulation world frame.
Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3). This quantity is the angular velocity of the rigid bodies’ center of mass frame.
- property body_com_lin_acc_w: warp.array#
Linear acceleration of all bodies in simulation world frame.
Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3). This quantity is the linear acceleration of the rigid bodies’ center of mass frame.
- property body_com_ang_acc_w: warp.array#
Angular acceleration of all bodies in simulation world frame.
Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3). This quantity is the angular acceleration of the rigid bodies’ center of mass frame.
- property body_com_pos_b: warp.array#
Center of mass position of all of the bodies in their respective link frames.
Shape is (num_instances, num_bodies), dtype = wp.vec3f. In torch this resolves to (num_instances, num_bodies, 3). This quantity is the center of mass location relative to its body’s link frame.
- property body_com_quat_b: warp.array#
Orientation (x, y, z, w) of the principal axes of inertia of all of the bodies in their respective link frames.
Shape is (num_instances, num_bodies), dtype = wp.quatf. In torch this resolves to (num_instances, num_bodies, 4). This quantity is the orientation of the principal axes of inertia relative to its body’s link frame.
- property body_acc_w: warp.array#
Shorthand for
body_com_acc_w.
- property body_ang_acc_w: warp.array#
Shorthand for
body_com_ang_acc_w.
- property body_ang_vel_w: warp.array#
Shorthand for
body_com_ang_vel_w.
- property body_lin_acc_w: warp.array#
Shorthand for
body_com_lin_acc_w.
- property body_lin_vel_w: warp.array#
Shorthand for
body_com_lin_vel_w.
- property body_pos_w: warp.array#
Shorthand for
body_link_pos_w.
- property body_pose_w: warp.array#
Shorthand for
body_link_pose_w.
- property body_quat_w: warp.array#
Shorthand for
body_link_quat_w.
- property body_vel_w: warp.array#
Shorthand for
body_com_vel_w.
- property com_pos_b: warp.array#
Shorthand for
body_com_pos_b.
- property com_quat_b: warp.array#
Shorthand for
body_com_quat_b.
- property default_inertia: warp.array#
Deprecated property. Please use
body_inertiainstead and manage the default inertia manually.
- property default_mass: warp.array#
Deprecated property. Please use
body_massinstead and manage the default mass manually.
- property default_object_pose: warp.array#
Deprecated property. Please use
default_body_poseinstead.
- property default_object_state: warp.array#
Deprecated property. Please use
default_body_stateinstead.
- property default_object_vel: warp.array#
Deprecated property. Please use
default_body_velinstead.
- property object_acc_w: warp.array#
Deprecated property. Please use
body_com_acc_winstead.
- property object_ang_acc_w: warp.array#
Deprecated property. Please use
body_com_ang_acc_winstead.
- property object_ang_vel_b: warp.array#
Deprecated property. Please use
body_com_ang_vel_binstead.
- property object_ang_vel_w: warp.array#
Deprecated property. Please use
body_com_ang_vel_winstead.
- property object_com_acc_w#
Deprecated property. Please use
body_com_acc_winstead.
- property object_com_ang_acc_w: warp.array#
Deprecated property. Please use
body_com_ang_acc_winstead.
- property object_com_ang_vel_b: warp.array#
Deprecated property. Please use
body_com_ang_vel_binstead.
- property object_com_ang_vel_w: warp.array#
Deprecated property. Please use
body_com_ang_vel_winstead.
- property object_com_lin_acc_w: warp.array#
Deprecated property. Please use
body_com_lin_acc_winstead.
- property object_com_lin_vel_b: warp.array#
Deprecated property. Please use
body_com_lin_vel_binstead.
- property object_com_lin_vel_w: warp.array#
Deprecated property. Please use
body_com_lin_vel_winstead.
- property object_com_pos_b: warp.array#
Deprecated property. Please use
body_com_pos_binstead.
- property object_com_pos_w: warp.array#
Deprecated property. Please use
body_com_pos_winstead.
- property object_com_pose_b#
Deprecated property. Please use
body_com_pose_binstead.
- property object_com_pose_w#
Deprecated property. Please use
body_com_pose_winstead.
- property object_com_quat_b: warp.array#
Deprecated property. Please use
body_com_quat_binstead.
- property object_com_quat_w: warp.array#
Deprecated property. Please use
body_com_quat_winstead.
- property object_com_state_w#
Deprecated property. Please use
body_com_state_winstead.
- property object_com_vel_w#
Deprecated property. Please use
body_com_vel_winstead.
- property object_lin_acc_w: warp.array#
Deprecated property. Please use
body_com_lin_acc_winstead.
- property object_lin_vel_b: warp.array#
Deprecated property. Please use
body_com_lin_vel_binstead.
- property object_lin_vel_w: warp.array#
Deprecated property. Please use
body_com_lin_vel_winstead.
- property object_link_ang_vel_b: warp.array#
Deprecated property. Please use
body_link_ang_vel_binstead.
- property object_link_ang_vel_w: warp.array#
Deprecated property. Please use
body_link_ang_vel_winstead.
- property object_link_lin_vel_b: warp.array#
Deprecated property. Please use
body_link_lin_vel_binstead.
- property object_link_lin_vel_w: warp.array#
Deprecated property. Please use
body_link_lin_vel_winstead.
- property object_link_pos_w: warp.array#
Deprecated property. Please use
body_link_pos_winstead.
- property object_link_pose_w#
Deprecated property. Please use
body_link_pose_winstead.
- property object_link_quat_w: warp.array#
Deprecated property. Please use
body_link_quat_winstead.
- property object_link_state_w#
Deprecated property. Please use
body_link_state_winstead.
- property object_link_vel_w#
Deprecated property. Please use
body_link_vel_winstead.
- property object_pos_w: warp.array#
Deprecated property. Please use
body_link_pos_winstead.
- property object_pose_w: warp.array#
Deprecated property. Please use
body_link_pose_winstead.
- property object_quat_w: warp.array#
Deprecated property. Please use
body_link_quat_winstead.
- property object_state_w#
Deprecated property. Please use
body_state_winstead.
- property object_vel_w: warp.array#
Deprecated property. Please use
body_com_vel_winstead.
- property default_body_state: warp.array#
Default root state
[pos, quat, lin_vel, ang_vel]in local environment frame.The position and quaternion are of the rigid body’s actor frame. Meanwhile, the linear and angular velocities are of the center of mass frame. Shape is (num_instances, num_bodies, 13).
- property body_state_w: warp.array#
Deprecated, same as
body_link_pose_wandbody_com_vel_w.
- property body_link_state_w: warp.array#
Deprecated, same as
body_link_pose_wandbody_link_vel_w.
- property body_com_state_w: warp.array#
Deprecated, same as
body_com_pose_wandbody_com_vel_w.
Deformable Object#
- class isaaclab_physx.assets.DeformableObject[source]#
Bases:
AssetBaseA deformable object asset class.
Deformable objects are assets that can be deformed in the simulation. They are typically used for soft bodies, such as stuffed animals and food items.
Unlike rigid object assets, deformable objects have a more complex structure and require additional handling for simulation. The simulation of deformable objects follows a finite element approach, where the object is discretized into a mesh of nodes and elements. The nodes are connected by elements, which define the material properties of the object. The nodes can be moved and deformed, and the elements respond to these changes.
The state of a deformable object comprises of its nodal positions and velocities, and not the object’s root position and orientation. The nodal positions and velocities are in the simulation frame.
Soft bodies can be partially kinematic, where some nodes are driven by kinematic targets, and the rest are simulated. The kinematic targets are the desired positions of the nodes, and the simulation drives the nodes towards these targets. This is useful for partial control of the object, such as moving a stuffed animal’s head while the rest of the body is simulated.
Attention
This class is experimental and subject to change due to changes on the underlying PhysX API on which it depends. We will try to maintain backward compatibility as much as possible but some changes may be necessary.
Attributes:
Configuration instance for the deformable object.
Data related to the asset.
Number of instances of the asset.
Number of bodies in the asset.
Deformable body view for the asset.
Deprecated property.
Deformable material view for the asset (PhysX).
The maximum number of simulation mesh elements per deformable body.
The maximum number of collision mesh elements per deformable body.
The maximum number of simulation mesh vertices per deformable body.
The maximum number of collision mesh vertices per deformable body.
Memory device for computation.
Whether the asset has a debug visualization implemented.
Whether the asset is initialized.
Methods:
__init__(cfg)Initialize the deformable object.
reset([env_ids, env_mask])Reset the deformable object.
Writes data to the simulator.
update(dt)Update the internal buffers.
write_nodal_state_to_sim_index(nodal_state)Set the nodal state over selected environment indices into the simulation.
write_nodal_state_to_sim_mask(nodal_state[, ...])Set the nodal state over selected environment mask into the simulation.
write_nodal_pos_to_sim_index(nodal_pos[, ...])Set the nodal positions over selected environment indices into the simulation.
write_nodal_pos_to_sim_mask(nodal_pos[, ...])Set the nodal positions over selected environment mask into the simulation.
write_nodal_velocity_to_sim_index(nodal_vel)Set the nodal velocity over selected environment indices into the simulation.
write_nodal_velocity_to_sim_mask(nodal_vel)Set the nodal velocity over selected environment mask into the simulation.
Set the kinematic targets of the simulation mesh for the deformable bodies using indices.
Set the kinematic targets of the simulation mesh for the deformable bodies using mask.
write_nodal_state_to_sim(nodal_state[, env_ids])Deprecated.
write_nodal_kinematic_target_to_sim(targets)Deprecated.
write_nodal_pos_to_sim(nodal_pos[, env_ids])Deprecated.
write_nodal_velocity_to_sim(nodal_vel[, env_ids])Deprecated.
transform_nodal_pos(nodal_pos[, pos, quat])Transform the nodal positions based on the pose transformation.
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.
set_debug_vis(debug_vis)Sets whether to visualize the asset data.
set_visibility(visible[, env_ids])Set the visibility of the prims corresponding to the asset.
- cfg: DeformableObjectCfg#
Configuration instance for the deformable object.
- __init__(cfg: DeformableObjectCfg)[source]#
Initialize the deformable object.
- Parameters:
cfg – A configuration instance.
- property data: DeformableObjectData#
Data related to the asset.
- 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_bodies: int#
Number of bodies in the asset.
This is always 1 since each object is a single deformable body.
- property root_view: omni.physics.tensors.impl.api.SoftBodyView#
Deformable body view for the asset.
Note
Use this view with caution. It requires handling of tensors in a specific way.
- property root_physx_view: omni.physics.tensors.impl.api.SoftBodyView#
Deprecated property. Please use
root_viewinstead.
- property material_physx_view: physx.SoftBodyMaterialView | None#
Deformable material view for the asset (PhysX).
This view is optional and may not be available if the material is not bound to the deformable body. If the material is not available, then the material properties will be set to default values.
Note
Use this view with caution. It requires handling of tensors in a specific way.
- property max_sim_elements_per_body: int#
The maximum number of simulation mesh elements per deformable body.
- property max_collision_elements_per_body: int#
The maximum number of collision mesh elements per deformable body.
- property max_sim_vertices_per_body: int#
The maximum number of simulation mesh vertices per deformable body.
- property max_collision_vertices_per_body: int#
The maximum number of collision mesh vertices per deformable body.
- reset(env_ids: Sequence[int] | None = None, env_mask: wp.array | None = None) None[source]#
Reset the deformable object.
- 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,).
- update(dt: float)[source]#
Update the internal buffers.
The time step
dtis 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
updatecall.
- write_nodal_state_to_sim_index(nodal_state: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False) None[source]#
Set the nodal state over selected environment indices into the simulation.
The nodal state comprises of the nodal positions and velocities. Since these are nodes, the velocity only has a translational component. All the quantities are in the simulation frame.
- Parameters:
nodal_state – Nodal state in simulation frame. Shape is (len(env_ids), max_sim_vertices_per_body, 6) or (num_instances, max_sim_vertices_per_body, 6).
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_nodal_state_to_sim_mask(nodal_state: torch.Tensor | wp.array, env_mask: wp.array | None = None) None[source]#
Set the nodal state over selected environment mask into the simulation.
The nodal state comprises of the nodal positions and velocities. Since these are nodes, the velocity only has a translational component. All the quantities are in the simulation frame.
- Parameters:
nodal_state – Nodal state in simulation frame. Shape is (num_instances, max_sim_vertices_per_body, 6).
env_mask – Environment mask. If None, then all indices are used.
- write_nodal_pos_to_sim_index(nodal_pos: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False) None[source]#
Set the nodal positions over selected environment indices into the simulation.
The nodal position comprises of individual nodal positions of the simulation mesh for the deformable body. The positions are in the simulation frame.
- Parameters:
nodal_pos – Nodal positions in simulation frame. Shape is (len(env_ids), max_sim_vertices_per_body, 3) or (num_instances, max_sim_vertices_per_body, 3).
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_nodal_pos_to_sim_mask(nodal_pos: torch.Tensor | wp.array, env_mask: wp.array | None = None) None[source]#
Set the nodal positions over selected environment mask into the simulation.
The nodal position comprises of individual nodal positions of the simulation mesh for the deformable body. The positions are in the simulation frame.
- Parameters:
nodal_pos – Nodal positions in simulation frame. Shape is (num_instances, max_sim_vertices_per_body, 3).
env_mask – Environment mask. If None, then all indices are used.
- write_nodal_velocity_to_sim_index(nodal_vel: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False) None[source]#
Set the nodal velocity over selected environment indices into the simulation.
The nodal velocity comprises of individual nodal velocities of the simulation mesh for the deformable body. Since these are nodes, the velocity only has a translational component. The velocities are in the simulation frame.
- Parameters:
nodal_vel – Nodal velocities in simulation frame. Shape is (len(env_ids), max_sim_vertices_per_body, 3) or (num_instances, max_sim_vertices_per_body, 3).
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_nodal_velocity_to_sim_mask(nodal_vel: torch.Tensor | wp.array, env_mask: wp.array | None = None) None[source]#
Set the nodal velocity over selected environment mask into the simulation.
The nodal velocity comprises of individual nodal velocities of the simulation mesh for the deformable body. Since these are nodes, the velocity only has a translational component. The velocities are in the simulation frame.
- Parameters:
nodal_vel – Nodal velocities in simulation frame. Shape is (num_instances, max_sim_vertices_per_body, 3).
env_mask – Environment mask. If None, then all indices are used.
- write_nodal_kinematic_target_to_sim_index(targets: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False) None[source]#
Set the kinematic targets of the simulation mesh for the deformable bodies using indices.
The kinematic targets comprise of individual nodal positions of the simulation mesh for the deformable body and a flag indicating whether the node is kinematically driven or not. The positions are in the simulation frame.
Note
The flag is set to 0.0 for kinematically driven nodes and 1.0 for free nodes.
- Parameters:
targets – The kinematic targets comprising of nodal positions and flags. Shape is (len(env_ids), max_sim_vertices_per_body, 4) or (num_instances, max_sim_vertices_per_body, 4).
env_ids – Environment indices. If None, then all indices are used.
full_data – Whether to expect full data. Defaults to False.
- write_nodal_kinematic_target_to_sim_mask(targets: torch.Tensor | wp.array, env_mask: wp.array | None = None) None[source]#
Set the kinematic targets of the simulation mesh for the deformable bodies using mask.
The kinematic targets comprise of individual nodal positions of the simulation mesh for the deformable body and a flag indicating whether the node is kinematically driven or not. The positions are in the simulation frame.
Note
The flag is set to 0.0 for kinematically driven nodes and 1.0 for free nodes.
- Parameters:
targets – The kinematic targets comprising of nodal positions and flags. Shape is (num_instances, max_sim_vertices_per_body, 4).
env_mask – Environment mask. If None, then all indices are used.
- write_nodal_state_to_sim(nodal_state: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[source]#
Deprecated. Please use
write_nodal_state_to_sim_index()instead.
- write_nodal_kinematic_target_to_sim(targets: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[source]#
Deprecated. Please use
write_nodal_kinematic_target_to_sim_index()instead.
- write_nodal_pos_to_sim(nodal_pos: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[source]#
Deprecated. Please use
write_nodal_pos_to_sim_index()instead.
- write_nodal_velocity_to_sim(nodal_vel: torch.Tensor | wp.array, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[source]#
Deprecated. Please use
write_nodal_velocity_to_sim_index()instead.
- transform_nodal_pos(nodal_pos: torch.tensor, pos: torch.Tensor | None = None, quat: torch.Tensor | None = None) torch.Tensor[source]#
Transform the nodal positions based on the pose transformation.
This function computes the transformation of the nodal positions based on the pose transformation. It multiplies the nodal positions with the rotation matrix of the pose and adds the translation. Internally, it calls the
isaaclab.utils.math.transform_points()function.- Parameters:
nodal_pos – The nodal positions in the simulation frame. Shape is (N, max_sim_vertices_per_body, 3).
pos – The position transformation. Shape is (N, 3). Defaults to None, in which case the position is assumed to be zero.
quat – The orientation transformation as quaternion (x, y, z, w). Shape is (N, 4). Defaults to None, in which case the orientation is assumed to be identity.
- Returns:
The transformed nodal positions. Shape is (N, max_sim_vertices_per_body, 3).
- 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 withwp.float32).
- property has_debug_vis_implementation: bool#
Whether the asset has a debug visualization implemented.
- property is_initialized: bool#
Whether the asset is initialized.
Returns True if the asset is initialized, False otherwise.
- 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_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).
- class isaaclab_physx.assets.DeformableObjectData[source]#
Bases:
objectData container for a deformable object.
This class contains the data for a deformable object in the simulation. The data includes the nodal states of the root deformable body in the object. The data is stored in the simulation world frame unless otherwise specified.
A deformable object in PhysX uses two tetrahedral meshes to represent the object:
Simulation mesh: This mesh is used for the simulation and is the one that is deformed by the solver.
Collision mesh: This mesh only needs to match the surface of the simulation mesh and is used for collision detection.
The APIs exposed provides the data for both the simulation and collision meshes. These are specified by the sim and collision prefixes in the property names.
The data is lazily updated, meaning that the data is only updated when it is accessed. This is useful when the data is expensive to compute or retrieve. The data is updated when the timestamp of the buffer is older than the current simulation timestamp. The timestamp is updated whenever the data is updated.
Methods:
update(dt)Updates the data for the deformable object.
Attributes:
Default nodal state
[nodal_pos, nodal_vel]in simulation world frame.Simulation mesh kinematic targets for the deformable bodies.
Nodal positions in simulation world frame.
Nodal velocities in simulation world frame.
Nodal state
[nodal_pos, nodal_vel]in simulation world frame.Simulation mesh element-wise rotations as quaternions for the deformable bodies in simulation world frame.
Collision mesh element-wise rotations as quaternions for the deformable bodies in simulation world frame.
Simulation mesh element-wise second-order deformation gradient tensors for the deformable bodies in simulation world frame.
Collision mesh element-wise second-order deformation gradient tensors for the deformable bodies in simulation world frame.
Simulation mesh element-wise second-order Cauchy stress tensors for the deformable bodies in simulation world frame.
Collision mesh element-wise second-order Cauchy stress tensors for the deformable bodies in simulation world frame.
Root position from nodal positions of the simulation mesh for the deformable bodies in simulation world frame.
Root velocity from vertex velocities for the deformable bodies in simulation world frame.
- update(dt: float)[source]#
Updates the data for the deformable object.
- Parameters:
dt – The time step for the update. This must be a positive value.
- default_nodal_state_w: warp.array = None#
Default nodal state
[nodal_pos, nodal_vel]in simulation world frame. Shape is (num_instances, max_sim_vertices_per_body) with dtype vec6f.
- nodal_kinematic_target: warp.array = None#
Simulation mesh kinematic targets for the deformable bodies. Shape is (num_instances, max_sim_vertices_per_body) with dtype vec4f.
The kinematic targets are used to drive the simulation mesh vertices to the target positions. The targets are stored as (x, y, z, is_not_kinematic) where “is_not_kinematic” is a binary flag indicating whether the vertex is kinematic or not. The flag is set to 0 for kinematic vertices and 1 for non-kinematic vertices.
- property nodal_pos_w: warp.array#
Nodal positions in simulation world frame. Shape is (num_instances, max_sim_vertices_per_body) vec3f.
- property nodal_vel_w: warp.array#
Nodal velocities in simulation world frame. Shape is (num_instances, max_sim_vertices_per_body) vec3f.
- property nodal_state_w: warp.array#
Nodal state
[nodal_pos, nodal_vel]in simulation world frame. Shape is (num_instances, max_sim_vertices_per_body) vec6f.
- property sim_element_quat_w: warp.array#
Simulation mesh element-wise rotations as quaternions for the deformable bodies in simulation world frame. Shape is (num_instances, max_sim_elements_per_body, 4).
The rotations are stored as quaternions in the order (x, y, z, w).
- property collision_element_quat_w: warp.array#
Collision mesh element-wise rotations as quaternions for the deformable bodies in simulation world frame. Shape is (num_instances, max_collision_elements_per_body, 4).
The rotations are stored as quaternions in the order (x, y, z, w).
- property sim_element_deform_gradient_w: warp.array#
Simulation mesh element-wise second-order deformation gradient tensors for the deformable bodies in simulation world frame. Shape is (num_instances, max_sim_elements_per_body, 3, 3).
- property collision_element_deform_gradient_w: warp.array#
Collision mesh element-wise second-order deformation gradient tensors for the deformable bodies in simulation world frame. Shape is (num_instances, max_collision_elements_per_body, 3, 3).
- property sim_element_stress_w: warp.array#
Simulation mesh element-wise second-order Cauchy stress tensors for the deformable bodies in simulation world frame. Shape is (num_instances, max_sim_elements_per_body, 3, 3).
- property collision_element_stress_w: warp.array#
Collision mesh element-wise second-order Cauchy stress tensors for the deformable bodies in simulation world frame. Shape is (num_instances, max_collision_elements_per_body, 3, 3).
- property root_pos_w: warp.array#
Root position from nodal positions of the simulation mesh for the deformable bodies in simulation world frame. Shape is (num_instances, 3).
This quantity is computed as the mean of the nodal positions.
- property root_vel_w: warp.array#
Root velocity from vertex velocities for the deformable bodies in simulation world frame. Shape is (num_instances, 3).
This quantity is computed as the mean of the nodal velocities.
- class isaaclab_physx.assets.DeformableObjectCfg[source]#
Bases:
AssetBaseCfgConfiguration parameters for a deformable object.
Attributes:
Prim path (or expression) to the asset.
Spawn configuration for the asset.
Initial state of the rigid object.
Collision group of the asset.
Whether to enable debug visualization for the asset.
The configuration object for the visualization markers.
- 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}/Robotwill 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).
- visualizer_cfg: VisualizationMarkersCfg#
The configuration object for the visualization markers. Defaults to DEFORMABLE_TARGET_MARKER_CFG.
Note
This attribute is only used when debug visualization is enabled.
Surface Gripper#
- class isaaclab_physx.assets.SurfaceGripper[source]#
Bases:
AssetBaseA surface gripper actuator class.
Surface grippers are actuators capable of grasping objects when in close proximity with them.
Each surface gripper in the collection must be a Isaac Sim SurfaceGripper primitive. On playing the simulation, the physics engine will automatically register the surface grippers into a SurfaceGripperView object. This object can be accessed using the
gripper_viewattribute.To interact with the surface grippers, the user can use the
stateto get the current state of the grippers,commandto get the current command sent to the grippers, andupdate_gripper_properties()to update the properties of the grippers at runtime. Finally, theset_grippers_command()function should be used to set the desired command for the grippers.Note
- The
set_grippers_command()function does not write to the simulation. The simulation automatically calls
write_data_to_sim()function to write the command to the simulation. Similarly, the update function is called automatically for every simulation step, and does not need to be called by the user.
Note
The SurfaceGripper is only supported on CPU for now. Please set the simulation backend to run on CPU. Use –device cpu to run the simulation on CPU.
Methods:
__init__(cfg)Initialize the surface gripper.
set_grippers_command_index(states[, ...])Set the internal gripper command buffer.
set_grippers_command_mask(states[, env_mask])Set the internal gripper command buffer using a boolean mask.
set_grippers_command(states[, indices])Set the internal gripper command buffer.
Update the gripper properties.
Update the gripper properties using a boolean mask.
update_gripper_properties([...])Update the gripper properties.
update(dt)Update the gripper state using the SurfaceGripperView.
Write the gripper command to the SurfaceGripperView.
reset_index([env_ids])Reset the gripper command buffer.
reset_mask([env_mask])Reset the gripper command buffer using a boolean mask.
reset([indices])Reset the gripper command buffer.
parse_gripper_parameter(cfg_value, default_value)Parse the gripper parameter.
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.
set_debug_vis(debug_vis)Sets whether to visualize the asset data.
set_visibility(visible[, env_ids])Set the visibility of the prims corresponding to the asset.
Attributes:
Data related to the asset.
Number of instances of the gripper.
Returns the gripper state buffer.
Returns the gripper command buffer.
Returns the gripper view object.
Memory device for computation.
Whether the asset has a debug visualization implemented.
Whether the asset is initialized.
- __init__(cfg: SurfaceGripperCfg)[source]#
Initialize the surface gripper.
- Parameters:
cfg – A configuration instance.
- property data#
Data related to the asset.
- property num_instances: int#
Number of instances of the gripper.
This is equal to the total number of grippers (the view can only contain one gripper per environment).
- property state: warp.array#
Returns the gripper state buffer.
The gripper state is a list of integers: - -1 –> Open - 0 –> Closing - 1 –> Closed
- property command: warp.array#
Returns the gripper command buffer.
The gripper command is a list of floats: - [-1, -0.3] –> Open - [-0.3, 0.3] –> Do nothing - [0.3, 1] –> Close
- property gripper_view: GripperView#
Returns the gripper view object.
- set_grippers_command_index(states: torch.Tensor | wp.array, env_ids: wp.array | None = None, full_data: bool = False) None[source]#
Set the internal gripper command buffer. This function does not write to the simulation.
- Possible values for the gripper command are:
[-1, -0.3] –> Open
]-0.3, 0.3[ –> Do nothing
[0.3, 1] –> Close
- Parameters:
states – A tensor/array of floats representing the gripper command.
env_ids – Environment indices. Defaults to None (all environments).
full_data – Whether
statesis indexed byenv_ids(True) or is compact (False).
- set_grippers_command_mask(states: torch.Tensor | wp.array, env_mask: torch.Tensor | None = None) None[source]#
Set the internal gripper command buffer using a boolean mask.
- Parameters:
states – A tensor/array of floats representing the gripper command (full size).
env_mask – Boolean mask of shape (num_envs,). Defaults to None (all environments).
- set_grippers_command(states: torch.Tensor, indices: torch.Tensor | None = None) None[source]#
Set the internal gripper command buffer. This function does not write to the simulation.
Deprecated since version v2.0.0: Use
set_grippers_command_index()instead.- Parameters:
states – A tensor of integers representing the gripper command.
indices – A tensor of integers representing the indices. Defaults to None.
- update_gripper_properties_index(max_grip_distance: wp.array | None = None, coaxial_force_limit: wp.array | None = None, shear_force_limit: wp.array | None = None, retry_interval: wp.array | None = None, env_ids: wp.array | None = None, full_data: bool = False) None[source]#
Update the gripper properties.
- Parameters:
max_grip_distance – The maximum grip distance. Shape (num_envs,) or (len(env_ids),).
coaxial_force_limit – The coaxial force limit. Shape (num_envs,) or (len(env_ids),).
shear_force_limit – The shear force limit. Shape (num_envs,) or (len(env_ids),).
retry_interval – The retry interval. Shape (num_envs,) or (len(env_ids),).
env_ids – Environment indices. Defaults to None (all environments).
full_data – Whether input arrays are indexed by
env_ids(True) or compact (False).
- update_gripper_properties_mask(max_grip_distance: wp.array | None = None, coaxial_force_limit: wp.array | None = None, shear_force_limit: wp.array | None = None, retry_interval: wp.array | None = None, env_mask: torch.Tensor | None = None) None[source]#
Update the gripper properties using a boolean mask.
- Parameters:
max_grip_distance – The maximum grip distance. Shape (num_envs,).
coaxial_force_limit – The coaxial force limit. Shape (num_envs,).
shear_force_limit – The shear force limit. Shape (num_envs,).
retry_interval – The retry interval. Shape (num_envs,).
env_mask – Boolean mask of shape (num_envs,). Defaults to None (all environments).
- update_gripper_properties(max_grip_distance: torch.Tensor | None = None, coaxial_force_limit: torch.Tensor | None = None, shear_force_limit: torch.Tensor | None = None, retry_interval: torch.Tensor | None = None, indices: torch.Tensor | None = None) None[source]#
Update the gripper properties.
Deprecated since version v2.0.0: Use
update_gripper_properties_index()instead.- Parameters:
max_grip_distance – The maximum grip distance. Shape (num_envs,).
coaxial_force_limit – The coaxial force limit. Shape (num_envs,).
shear_force_limit – The shear force limit. Shape (num_envs,).
retry_interval – The retry interval. Shape (num_envs,).
indices – The indices of the grippers to update. Defaults to None.
- update(dt: float) None[source]#
Update the gripper state using the SurfaceGripperView.
This function is called every simulation step. The data fetched from the gripper view is a list of strings containing 3 possible states:
“Open” –> 0
“Closing” –> 1
“Closed” –> 2
To make this more neural network friendly, we convert the list of strings to a list of floats:
“Open” –> -1.0
“Closing” –> 0.0
“Closed” –> 1.0
Note
We need to do this conversion for every single step of the simulation because the gripper can lose contact with the object if some conditions are met: such as if a large force is applied to the gripped object.
- write_data_to_sim() None[source]#
Write the gripper command to the SurfaceGripperView.
- The gripper command is a list of integers that needs to be converted to a list of strings:
[-1, -0.3] –> Open
]-0.3, 0.3[ –> Do nothing
[0.3, 1] –> Closed
The Do nothing command is not applied, and is only used to indicate whether the gripper state has changed.
- reset_index(env_ids: wp.array | None = None) None[source]#
Reset the gripper command buffer.
- Parameters:
env_ids – Environment indices. Defaults to None (all environments).
- reset_mask(env_mask: torch.Tensor | None = None) None[source]#
Reset the gripper command buffer using a boolean mask.
- Parameters:
env_mask – Boolean mask of shape (num_envs,). Defaults to None (all environments).
- reset(indices: torch.Tensor | None = None) None[source]#
Reset the gripper command buffer.
Deprecated since version v2.0.0: Use
reset_index()instead.- Parameters:
indices – A tensor of integers representing the indices of the grippers to reset. Defaults to None.
- parse_gripper_parameter(cfg_value: float | int | tuple | None, default_value: float | int | tuple | None, ndim: int = 0) warp.array[source]#
Parse the gripper parameter.
- Parameters:
cfg_value – The value to parse. Can be a float, int, tuple, or None.
default_value – The default value to use if cfg_value is None. Can be a float, int, tuple, or None.
ndim – The number of dimensions of the parameter. Defaults to 0.
- Returns:
A warp array of float32 values.
- 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 withwp.float32).
- property has_debug_vis_implementation: bool#
Whether the asset has a debug visualization implemented.
- property is_initialized: bool#
Whether the asset is initialized.
Returns True if the asset is initialized, False otherwise.
- 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_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).
- The
- class isaaclab_physx.assets.SurfaceGripperCfg[source]#
Bases:
AssetBaseCfgConfiguration parameters for a surface gripper actuator.
Attributes:
The expression to find the grippers in the stage.
The maximum grip distance of the gripper.
The coaxial force limit of the gripper.
Spawn configuration for the asset.
Initial state of the rigid object.
Collision group of the asset.
Whether to enable debug visualization for the asset.
The shear force limit of the gripper.
The amount of time the gripper will spend trying to grasp an object.
- 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).