isaaclab_newton.assets

Contents

isaaclab_newton.assets#

Classes

Articulation

An articulation asset class.

ArticulationData

Data container for an articulation.

RigidObject

A rigid object asset class.

RigidObjectData

Data container for a rigid object.

RigidObjectCollection

A rigid object collection class.

RigidObjectCollectionData

Data container for a rigid object collection.

DeformableObject

A deformable object asset class (Newton backend).

DeformableObjectData

Data container for a deformable object (Newton backend).

Articulation#

class isaaclab_newton.assets.Articulation[source]#

Bases: BaseArticulation

An 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_base attribute.

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_path attribute.

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.actuators module. The actuator models are specified using the ArticulationCfg.actuators attribute. 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:

cfg

Configuration instance for the articulations.

actuators

Dictionary of actuator instances for the articulation.

data

Data related to the asset.

num_instances

Number of instances of the asset.

is_fixed_base

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

num_joints

Number of joints in articulation.

num_fixed_tendons

Number of fixed tendons in articulation.

num_spatial_tendons

Number of spatial tendons in articulation.

num_bodies

Number of bodies in articulation.

num_shapes_per_body

Number of collision shapes per body in the articulation.

joint_names

Ordered names of joints in articulation.

fixed_tendon_names

Ordered names of fixed tendons in articulation.

spatial_tendon_names

Ordered names of spatial tendons in articulation.

body_names

Ordered names of bodies in articulation.

root_view

Root view for the asset.

instantaneous_wrench_composer

Instantaneous wrench composer.

permanent_wrench_composer

Permanent wrench composer.

device

Memory device for computation.

has_debug_vis_implementation

Whether the asset has a debug visualization implemented.

is_initialized

Whether the asset is initialized.

num_base_dofs

Number of free DoFs of the floating base.

Methods:

__init__(cfg)

Initialize the articulation.

reset([env_ids, env_mask])

Reset the articulation.

write_data_to_sim()

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.

write_root_com_velocity_to_sim_index(*, ...)

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

write_root_com_velocity_to_sim_mask(*, ...)

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

write_root_link_velocity_to_sim_index(*, ...)

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

write_root_link_velocity_to_sim_mask(*, ...)

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

write_joint_state_to_sim_index(*, position, ...)

Write joint positions and velocities in a single fused kernel launch.

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_actuator_stiffness_to_sim(*, ...)

Write actuator kp at the (env_ids, joint_ids) sub-grid and propagate to controllers.

write_actuator_damping_to_sim(*, damping, ...)

Write actuator kd at the (env_ids, joint_ids) sub-grid and propagate to controllers.

write_joint_position_limit_to_sim_index(*, ...)

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_velocity_limit_to_sim_index(*, ...)

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_coefficient_to_sim_index(*, ...)

Write Newton joint friction force/torque values over selected environment indices into the simulation.

write_joint_friction_coefficient_to_sim_mask(*, ...)

Write Newton joint friction force/torque values over selected environment mask into the simulation.

set_masses_index(*, masses[, body_ids, env_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 position of all bodies using indices.

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

Set center of mass position 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_index(*, ...)

Set fixed tendon limit stiffness into internal buffers using indices.

set_fixed_tendon_limit_stiffness_mask(*, ...)

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_to_sim_index(*)

Write fixed tendon properties into the simulation using indices.

write_fixed_tendon_properties_to_sim_mask(*)

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_index(*, ...)

Set spatial tendon limit stiffness into internal buffers using indices.

set_spatial_tendon_limit_stiffness_mask(*, ...)

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_to_sim_index(*)

Write spatial tendon properties into the simulation using indices.

write_spatial_tendon_properties_to_sim_mask(*)

Write spatial tendon properties into the simulation using masks.

write_joint_friction_coefficient_to_sim(...)

Deprecated, same as write_joint_friction_coefficient_to_sim_index().

write_root_state_to_sim(root_state[, env_ids])

Deprecated, same as write_root_link_pose_to_sim_index() and write_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.

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.

write_fixed_tendon_properties_to_sim([...])

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() and write_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_spatial_tendon_properties_to_sim([...])

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() and write_root_link_velocity_to_sim_index().

write_joint_state_to_sim(position, velocity)

Deprecated, same as write_joint_state_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.actuators attribute. They are used to compute the joint commands during the write_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 is_fixed_base: bool#

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

property num_joints: int#

Number of joints in articulation.

property num_fixed_tendons: int#

Number of fixed tendons in articulation.

property num_spatial_tendons: int#

Number of spatial tendons in articulation.

property num_bodies: int#

Number of bodies in articulation.

property num_shapes_per_body: list[int]#

Number of collision shapes per body in the articulation.

This property returns a list where each element represents the number of collision shapes for the corresponding body in the articulation. This is cached for efficient access during material property randomization and other operations.

Returns:

List of integers representing the number of shapes per body.

property joint_names: list[str]#

Ordered names of joints in articulation.

property fixed_tendon_names: list[str]#

Ordered names of fixed tendons in articulation.

property spatial_tendon_names: list[str]#

Ordered names of spatial tendons in articulation.

property body_names: list[str]#

Ordered names of bodies in articulation.

property root_view: newton.selection.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 WrenchComposer instance. Wrenches added or set to this wrench composer are only valid for the current simulation step. At the end of the simulation step, the wrenches set to this object are discarded. This is useful to apply forces that change all the time, things like drag forces for instance.

property permanent_wrench_composer: WrenchComposer#

Permanent wrench composer.

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

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 expects partial data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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 expects full data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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,).

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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.

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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,).

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

write_root_com_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 center of mass pose over selected environment indices into the simulation.

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

Note

This method expects partial data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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,).

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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 expects full data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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) 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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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_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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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,).

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

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

Note

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

Note

This method expects partial data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

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

Note

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

Note

This method expects full data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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_index(*, 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]#

Write joint positions and velocities in a single fused kernel launch.

Note

This method expects partial data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

  • velocity – Joint velocities. Shape is (len(env_ids), len(joint_ids)).

  • joint_ids – Joint indices. If None, then all joints are used.

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

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 expects full data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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. Shape is (num_joints,).

  • 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)[source]#

Write joint positions over selected environment indices into the simulation.

Note

This method expects partial or full data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

  • joint_ids – Joint indices. If None, then all joints are used.

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

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

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 expects full data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

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)[source]#

Write joint velocities to the simulation.

Note

This method expects partial data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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.

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 expects full data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

  • 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)[source]#

Write joint stiffness over selected environment indices into the simulation.

Note

This method expects partial data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

  • joint_ids – Joint indices. If None, then all joints are used.

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

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 expects full data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

write_joint_damping_to_sim_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)[source]#

Write joint damping over selected environment indices into the simulation.

Note

This method expects partial data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

  • joint_ids – Joint indices. If None, then all joints are used.

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

write_actuator_stiffness_to_sim(*, stiffness: torch.Tensor, env_ids: torch.Tensor, joint_ids: torch.Tensor) None[source]#

Write actuator kp at the (env_ids, joint_ids) sub-grid and propagate to controllers.

Iterates the global adapter’s Newton actuators and uses ArticulationView.get_actuator_parameter() / set_actuator_parameter() to patch each controller’s kp array. Actuators belonging to a different articulation are no-ops because the view’s per-DOF mapping returns -1 for DOFs outside this articulation’s range.

Parameters:
  • stiffness – Sub-grid of new kp values, shape (len(env_ids), len(joint_ids)).

  • env_ids – 1D torch tensor of env indices.

  • joint_ids – 1D torch tensor of articulation-local joint indices.

No-op when the Newton fast path is not active.

write_actuator_damping_to_sim(*, damping: torch.Tensor, env_ids: torch.Tensor, joint_ids: torch.Tensor) None[source]#

Write actuator kd at the (env_ids, joint_ids) sub-grid and propagate to controllers.

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, warn_limit_violation: bool = True)[source]#

Write joint position limits over selected environment indices into the simulation.

Note

This method expects partial data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

  • joint_ids – Joint indices. If None, then all joints are used.

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

  • 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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

  • warn_limit_violation – Whether to use warning or info level logging when default joint positions exceed the new limits. Defaults to True.

write_joint_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)[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.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

  • joint_ids – Joint indices. If None, then all joints are used.

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

write_joint_effort_limit_to_sim_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)[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.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

  • joint_ids – Joint indices. If None, then all joints are used.

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

  • 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)[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.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

  • joint_ids – Joint indices. If None, then all joints are used.

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

write_joint_friction_coefficient_to_sim_index(*, joint_friction_coeff: 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)[source]#

Write Newton joint friction force/torque values over selected environment indices into the simulation.

This writes to Newton’s Model.joint_friction field. Despite the coeff suffix in the Isaac Lab API name, Newton treats this value as an absolute friction force/torque [N or N·m, depending on joint type], not as a unitless coefficient.

For example, the MJWarp solver copies this value into MuJoCo Warp’s dof_frictionloss. Setting joint_friction_coeff to 0.2 configures a dry-friction loss limit of 0.2 N·m on a revolute joint DOF, or 0.2 N on a prismatic joint DOF.

Note

Solver support is defined by the active Newton solver. Unsupported solvers may ignore Model.joint_friction.

Note

This method expects partial data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

Parameters:
  • joint_friction_coeff – Joint friction force/torque [N or N·m, depending on joint type]. Shape is (len(env_ids), len(joint_ids)).

  • joint_ids – Joint indices. If None, then all joints are used.

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

write_joint_friction_coefficient_to_sim_mask(*, joint_friction_coeff: torch.Tensor | wp.array, joint_mask: wp.array | None = None, env_mask: wp.array | None = None)[source]#

Write Newton joint friction force/torque values over selected environment mask into the simulation.

This writes to Newton’s Model.joint_friction field. Despite the coeff suffix in the Isaac Lab API name, Newton treats this value as an absolute friction force/torque [N or N·m, depending on joint type], not as a unitless coefficient.

For example, the MJWarp solver copies this value into MuJoCo Warp’s dof_frictionloss. Setting joint_friction_coeff to 0.2 configures a dry-friction loss limit of 0.2 N·m on a revolute joint DOF, or 0.2 N on a prismatic joint DOF.

Note

Solver support is defined by the active Newton solver. Unsupported solvers may ignore Model.joint_friction.

Note

This method expects full data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

Parameters:
  • joint_friction_coeff – Joint friction force/torque [N or N·m, depending on joint type]. Shape is (num_instances, num_joints).

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

  • 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) None[source]#

Set masses of all bodies using indices.

Note

This method expects partial data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

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

Set center of mass position of all bodies using indices.

Note

This method expects partial data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

Caution

Unlike the PhysX version of this method, this method does not set the center of mass orientation. Only the position is set. This is because Newton considers the center of mass orientation to always be aligned with the body frame.

Parameters:
  • coms – Center of mass position of all bodies. Shape is (len(env_ids), len(body_ids), 3). In warp the expected shape is (num_instances, num_bodies), with dtype wp.vec3f.

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

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

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 position of all bodies using masks.

Note

This method expects full data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

Caution

Unlike the PhysX version of this method, this method does not set the center of mass orientation. Only the position is set. This is because Newton considers the center of mass orientation to always be aligned with the body frame.

Parameters:
  • coms – Center of mass position of all bodies. Shape is (num_instances, num_bodies, 3) or (num_instances, num_bodies, 7) (transformf convention — only position is used). In warp the expected shape is (num_instances, num_bodies), with dtype wp.vec3f or wp.transformf.

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

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

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

Set inertias of all bodies using indices.

Note

This method expects partial data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

Parameters:
  • inertias – Inertias of all bodies. Shape is (len(env_ids), len(body_ids), 9). In warp the expected shape is (num_instances, num_bodies, 9), with dtype wp.float32.

  • 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).

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

set_joint_position_target_index(*, target: torch.Tensor | wp.array, joint_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[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.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

  • 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) 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.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

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 full data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

  • 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) 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.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

  • 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) 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.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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. Shape is (num_fixed_tendons,).

  • 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) 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.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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. Shape is (num_fixed_tendons,).

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

set_fixed_tendon_limit_stiffness_index(*, limit_stiffness: float | torch.Tensor | wp.array, fixed_tendon_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[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.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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. Shape is (num_fixed_tendons,).

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

set_fixed_tendon_position_limit_index(*, limit: float | torch.Tensor | wp.array, fixed_tendon_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[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.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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. Shape is (num_fixed_tendons,).

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

set_fixed_tendon_rest_length_index(*, rest_length: float | torch.Tensor | wp.array, fixed_tendon_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[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.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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. Shape is (num_fixed_tendons,).

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

set_fixed_tendon_offset_index(*, offset: float | torch.Tensor | wp.array, fixed_tendon_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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. Shape is (num_fixed_tendons,).

  • 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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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. Shape is (num_spatial_tendons,).

  • 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) 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.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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. Shape is (num_spatial_tendons,).

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

set_spatial_tendon_limit_stiffness_index(*, limit_stiffness: float | torch.Tensor | wp.array, spatial_tendon_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[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.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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. Shape is (num_spatial_tendons,).

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

set_spatial_tendon_offset_index(*, offset: float | torch.Tensor | wp.array, spatial_tendon_ids: Sequence[int] | torch.Tensor | wp.array | None = None, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[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.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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. Shape is (num_spatial_tendons,).

  • 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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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_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_root_state_to_sim(root_state: torch.Tensor, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[source]#

Deprecated, same as write_root_link_pose_to_sim_index() and write_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.

Controlled by AssetBaseCfg.disable_shape_checks. When checks are disabled this method is a no-op.

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

Controlled by AssetBaseCfg.disable_shape_checks. When checks are disabled this method is a no-op.

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

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

  • dtype – The expected warp dtype.

  • name – Optional parameter name for error messages.

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

property device: str#

Memory device for computation.

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_base_dofs: int#

Number of free DoFs of the floating base.

A floating-base articulation can translate and rotate freely in space, so its base contributes 6 DoFs (3 linear, 3 angular). A fixed-base articulation is bolted to the world and contributes 0.

Use this to map an actuated-joint index j to its column in the Jacobian / mass matrix / gravity vector: column = j + num_base_dofs.

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. Resets target environments, then adds forces and torques via the permanent wrench composer.

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, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None[source]#

Deprecated, same as write_root_com_pose_to_sim_index() and write_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().

Deprecated, same as write_root_link_pose_to_sim_index().

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().

Deprecated, same as write_root_link_pose_to_sim_index() and write_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_state_to_sim_index().

class isaaclab_newton.assets.ArticulationData[source]#

Bases: BaseArticulationData

Data 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:

is_primed

Whether the articulation data is fully instantiated and ready to use.

body_names

Body names in the order parsed by the simulation view.

joint_names

Joint names in the order parsed by the simulation view.

fixed_tendon_names

Fixed tendon names in the order parsed by the simulation view.

spatial_tendon_names

Spatial tendon names in the order parsed by the simulation view.

default_root_pose

Default root pose [pos, quat] in the local environment frame.

default_root_vel

Default root velocity [lin_vel, ang_vel] in the local environment frame.

default_joint_pos

Default joint positions of all joints.

default_joint_vel

Default joint velocities of all joints.

joint_pos_target

Joint position targets commanded by the user.

joint_vel_target

Joint velocity targets commanded by the user.

joint_effort_target

Joint effort targets commanded by the user.

computed_torque

Joint torques computed from the actuator model (before clipping).

applied_torque

Joint torques applied from the actuator model (after clipping).

joint_stiffness

Joint stiffness provided to the simulation.

joint_damping

Joint damping provided to the simulation.

joint_armature

Joint armature provided to the simulation.

joint_friction_coeff

Newton joint friction force/torque provided to the simulation.

joint_pos_limits_lower

Joint position limits lower provided to the simulation.

joint_pos_limits_upper

Joint position limits upper provided to the simulation.

joint_pos_limits

Joint position limits provided to the simulation.

joint_vel_limits

Joint maximum velocity provided to the simulation.

joint_effort_limits

Joint maximum effort provided to the simulation.

soft_joint_pos_limits

Soft joint positions limits for all joints.

soft_joint_vel_limits

Soft joint velocity limits for all joints.

gear_ratio

Gear ratio for relating motor torques to applied Joint torques.

fixed_tendon_stiffness

Fixed tendon stiffness provided to the simulation.

fixed_tendon_damping

Fixed tendon damping provided to the simulation.

fixed_tendon_limit_stiffness

Fixed tendon limit stiffness provided to the simulation.

fixed_tendon_rest_length

Fixed tendon rest length provided to the simulation.

fixed_tendon_offset

Fixed tendon offset provided to the simulation.

fixed_tendon_pos_limits

Fixed tendon position limits provided to the simulation.

spatial_tendon_stiffness

Spatial tendon stiffness provided to the simulation.

spatial_tendon_damping

Spatial tendon damping provided to the simulation.

spatial_tendon_limit_stiffness

Spatial tendon limit stiffness provided to the simulation.

spatial_tendon_offset

Spatial tendon offset provided to the simulation.

root_link_pose_w

Root link pose [pos, quat] in simulation world frame.

root_link_vel_w

Root link velocity [lin_vel, ang_vel] in simulation world frame.

root_com_pose_w

Root center of mass pose [pos, quat] in simulation world frame.

root_com_vel_w

Root center of mass velocity [lin_vel, ang_vel] in simulation world frame.

body_mass

Body mass wp.float32 in the world frame.

body_inertia

Flattened body inertia in the world frame.

body_link_pose_w

Body link pose [pos, quat] in simulation world frame.

body_link_vel_w

Body link velocity [lin_vel, ang_vel] in simulation world frame.

body_com_pose_w

Body center of mass pose [pos, quat] in simulation world frame.

body_com_vel_w

Body center of mass velocity [lin_vel, ang_vel] in simulation world frame.

body_com_acc_w

Acceleration of all bodies center of mass [lin_acc, ang_acc].

body_com_pos_b

Center of mass position of all of the bodies in their respective link frames.

body_com_pose_b

Center of mass pose [pos, quat] of all bodies in their respective body's link frames.

body_com_jacobian_w

See isaaclab.assets.BaseArticulationData.body_com_jacobian_w.

body_link_jacobian_w

See isaaclab.assets.BaseArticulationData.body_link_jacobian_w.

mass_matrix

See isaaclab.assets.BaseArticulationData.mass_matrix.

gravity_compensation_forces

See isaaclab.assets.BaseArticulationData.gravity_compensation_forces.

joint_pos

Joint positions of all joints.

joint_vel

Joint velocities of all joints.

joint_acc

Joint acceleration of all joints.

projected_gravity_b

Projection of the gravity direction on base frame.

heading_w

Yaw heading of the base frame (in radians).

root_link_lin_vel_b

Root link linear velocity in base frame.

root_link_ang_vel_b

Root link angular velocity in base frame.

root_com_lin_vel_b

Root center of mass linear velocity in base frame.

root_com_ang_vel_b

Root center of mass angular velocity in base frame.

root_link_pos_w

Root link position in simulation world frame.

root_link_quat_w

Root link orientation (x, y, z, w) in simulation world frame.

root_link_lin_vel_w

Root linear velocity in simulation world frame.

root_link_ang_vel_w

Root link angular velocity in simulation world frame.

root_com_pos_w

Root center of mass position in simulation world frame.

root_com_quat_w

Root center of mass orientation (x, y, z, w) in simulation world frame.

root_com_lin_vel_w

Root center of mass linear velocity in simulation world frame.

root_com_ang_vel_w

Root center of mass angular velocity in simulation world frame.

body_link_pos_w

Positions of all bodies in simulation world frame.

body_link_quat_w

Orientation (x, y, z, w) of all bodies in simulation world frame.

body_link_lin_vel_w

Linear velocity of all bodies in simulation world frame.

body_link_ang_vel_w

Angular velocity of all bodies in simulation world frame.

body_com_pos_w

Positions of all bodies in simulation world frame.

body_com_quat_w

Orientation (x, y, z, w) of the principal axes of inertia of all bodies in simulation world frame.

body_com_lin_vel_w

Linear velocity of all bodies in simulation world frame.

body_com_ang_vel_w

Angular velocity of all bodies in simulation world frame.

body_com_lin_acc_w

Linear acceleration of all bodies in simulation world frame.

body_com_ang_acc_w

Angular acceleration of all bodies in simulation world frame.

body_com_quat_b

Orientation (x, y, z, w) of the principal axes of inertia of all of the bodies in their respective link frames.

body_acc_w

Shorthand for body_com_acc_w.

body_ang_acc_w

Shorthand for body_com_ang_acc_w.

body_ang_vel_w

Shorthand for body_com_ang_vel_w.

body_lin_acc_w

Shorthand for body_com_lin_acc_w.

body_lin_vel_w

Shorthand for body_com_lin_vel_w.

body_pos_w

Shorthand for body_link_pos_w.

body_pose_w

Shorthand for body_link_pose_w.

body_quat_w

Shorthand for body_link_quat_w.

body_vel_w

Shorthand for body_com_vel_w.

com_pos_b

Shorthand for body_com_pos_b.

com_quat_b

Shorthand for body_com_quat_b.

default_fixed_tendon_damping

Deprecated property.

default_fixed_tendon_limit

Deprecated property.

default_fixed_tendon_limit_stiffness

Deprecated property.

default_fixed_tendon_offset

Deprecated property.

default_fixed_tendon_pos_limits

Deprecated property.

default_fixed_tendon_rest_length

Deprecated property.

default_fixed_tendon_stiffness

Deprecated property.

default_inertia

Deprecated property.

default_joint_armature

Deprecated property.

default_joint_damping

Deprecated property.

default_joint_friction

Deprecated property.

default_joint_friction_coeff

Deprecated property.

default_joint_limits

Shorthand for default_joint_pos_limits.

default_joint_pos_limits

Deprecated property.

default_joint_stiffness

Deprecated property.

default_joint_viscous_friction_coeff

Deprecated property.

default_mass

Deprecated property.

default_spatial_tendon_damping

Deprecated property.

default_spatial_tendon_limit_stiffness

Deprecated property.

default_spatial_tendon_offset

Deprecated property.

default_spatial_tendon_stiffness

Deprecated property.

fixed_tendon_limit

Shorthand for fixed_tendon_pos_limits.

joint_friction

Shorthand for joint_friction_coeff.

joint_limits

Shorthand for joint_pos_limits.

joint_velocity_limits

Shorthand for joint_vel_limits.

root_ang_vel_b

Shorthand for root_com_ang_vel_b.

root_ang_vel_w

Shorthand for root_com_ang_vel_w.

root_lin_vel_b

Shorthand for root_com_lin_vel_b.

root_lin_vel_w

Shorthand for root_com_lin_vel_w.

root_pos_w

Shorthand for root_link_pos_w.

root_pose_w

Shorthand for root_link_pose_w.

root_quat_w

Shorthand for root_link_quat_w.

root_vel_w

Shorthand for root_com_vel_w.

root_state_w

Deprecated, same as root_link_pose_w and root_com_vel_w.

root_link_state_w

Deprecated, same as root_link_pose_w and root_link_vel_w.

root_com_state_w

Deprecated, same as root_com_pose_w and root_com_vel_w.

default_root_state

Default root state [pos, quat, lin_vel, ang_vel] in the local environment frame.

body_state_w

State of all bodies [pos, quat, lin_vel, ang_vel] in simulation world frame.

body_link_state_w

State of all bodies' link frame`[pos, quat, lin_vel, ang_vel]` in simulation world frame.

body_com_state_w

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.

property is_primed: bool#

Whether the articulation data is fully instantiated and ready to use.

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.

body_names: list[str] = None#

Body names in the order parsed by the simulation view.

joint_names: list[str] = None#

Joint names in the order parsed by the simulation view.

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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_state parameter.

property default_joint_vel: ProxyArray#

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_state parameter.

property joint_pos_target: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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_torque based on the actuator model.

property joint_stiffness: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

Newton joint friction force/torque provided to the simulation.

Despite the coeff suffix in the Isaac Lab API name, Newton stores this as an absolute joint friction force/torque [N or N·m, depending on joint type].

For example, the MJWarp solver copies this value into MuJoCo Warp’s dof_frictionloss. Setting joint_friction_coeff to 0.2 configures a dry-friction loss limit of 0.2 N·m on a revolute joint DOF, or 0.2 N on a prismatic joint DOF.

Shape is (num_instances, num_joints), dtype = wp.float32. In torch this resolves to (num_instances, num_joints).

property joint_pos_limits_lower: ProxyArray#

Joint position limits lower provided to the simulation. Shape is (num_instances, num_joints).

property joint_pos_limits_upper: ProxyArray#

Joint position limits upper provided to the simulation. Shape is (num_instances, num_joints).

property joint_pos_limits: ProxyArray#

Joint position limits provided to the simulation.

Shape is (num_instances, num_joints, 2), 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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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_limits based on the soft_joint_pos_limit_factor parameter.

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: ProxyArray#

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_limits if the actuator model has a variable velocity limit model. For instance, in a variable gear ratio actuator model.

property gear_ratio: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

Fixed tendon position limits provided to the simulation.

Shape is (num_instances, num_fixed_tendons, 2), dtype = wp.vec2f. In torch this resolves to (num_instances, num_fixed_tendons, 2).

property spatial_tendon_stiffness: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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

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.

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

Body mass wp.float32 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: ProxyArray#

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

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.

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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_pos_b: ProxyArray#

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_pose_b: ProxyArray#

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_com_jacobian_w: ProxyArray#

See isaaclab.assets.BaseArticulationData.body_com_jacobian_w.

Newton implementation: eval_jacobian (writes the model-wide buffer) then a gather kernel extracts this view’s rows. link_offset drops Newton’s fixed- root row for fixed-base; the DoF axis is preserved in full.

See isaaclab.assets.BaseArticulationData.body_link_jacobian_w.

Newton implementation: applies the COM→origin shift kernel to body_com_jacobian_w (Newton’s eval_jacobian is COM-referenced).

property mass_matrix: ProxyArray#

See isaaclab.assets.BaseArticulationData.mass_matrix.

Newton implementation: eval_mass_matrix (writes the model-wide buffer) then a gather kernel extracts this view’s rows.

property gravity_compensation_forces: ProxyArray#

See isaaclab.assets.BaseArticulationData.gravity_compensation_forces.

Newton implementation: raises NotImplementedError — Newton’s ArticulationView exposes only eval_fk / eval_jacobian / eval_mass_matrix. Use PhysX, or set the controller’s gravity_compensation=False until upstream Newton adds the primitive. Tracking upstream: newton#2497, newton#2529, newton#2625.

property joint_pos: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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)\).

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.

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: ProxyArray#

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: ProxyArray#

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.

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.

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.

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.

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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.

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.

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.

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.

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: ProxyArray#

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’ center of mass frame.

property body_com_quat_w: ProxyArray#

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 articulation bodies.

property body_com_lin_vel_w: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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_quat_b: ProxyArray#

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: ProxyArray#

Shorthand for body_com_acc_w.

property body_ang_acc_w: ProxyArray#

Shorthand for body_com_ang_acc_w.

property body_ang_vel_w: ProxyArray#

Shorthand for body_com_ang_vel_w.

property body_lin_acc_w: ProxyArray#

Shorthand for body_com_lin_acc_w.

property body_lin_vel_w: ProxyArray#

Shorthand for body_com_lin_vel_w.

property body_pos_w: ProxyArray#

Shorthand for body_link_pos_w.

property body_pose_w: ProxyArray#

Shorthand for body_link_pose_w.

property body_quat_w: ProxyArray#

Shorthand for body_link_quat_w.

property body_vel_w: ProxyArray#

Shorthand for body_com_vel_w.

property com_pos_b: ProxyArray#

Shorthand for body_com_pos_b.

property com_quat_b: ProxyArray#

Shorthand for body_com_quat_b.

property default_fixed_tendon_damping: ProxyArray#

Deprecated property. Please use fixed_tendon_damping instead and manage the default fixed tendon damping manually.

property default_fixed_tendon_limit: ProxyArray#

Deprecated property. Please use default_fixed_tendon_pos_limits instead.

property default_fixed_tendon_limit_stiffness: ProxyArray#

Deprecated property. Please use fixed_tendon_limit_stiffness instead and manage the default fixed tendon limit stiffness manually.

property default_fixed_tendon_offset: ProxyArray#

Deprecated property. Please use fixed_tendon_offset instead and manage the default fixed tendon offset manually.

property default_fixed_tendon_pos_limits: ProxyArray#

Deprecated property. Please use fixed_tendon_pos_limits instead and manage the default fixed tendon position limits manually.

property default_fixed_tendon_rest_length: ProxyArray#

Deprecated property. Please use fixed_tendon_rest_length instead and manage the default fixed tendon rest length manually.

property default_fixed_tendon_stiffness: ProxyArray#

Deprecated property. Please use fixed_tendon_stiffness instead and manage the default fixed tendon stiffness manually.

property default_inertia: ProxyArray#

Deprecated property. Please use body_inertia instead and manage the default inertia manually.

property default_joint_armature: ProxyArray#

Deprecated property. Please use joint_armature instead and manage the default joint armature manually.

property default_joint_damping: ProxyArray#

Deprecated property. Please use joint_damping instead and manage the default joint damping manually.

property default_joint_friction: ProxyArray#

Deprecated property. Please use default_joint_friction_coeff instead.

property default_joint_friction_coeff: ProxyArray#

Deprecated property. Please use joint_friction_coeff instead and manage the default joint friction coefficient manually.

property default_joint_limits: ProxyArray#

Shorthand for default_joint_pos_limits.

property default_joint_pos_limits: ProxyArray#

Deprecated property. Please use joint_pos_limits instead and manage the default joint position limits manually.

property default_joint_stiffness: ProxyArray#

Deprecated property. Please use joint_stiffness instead and manage the default joint stiffness manually.

property default_joint_viscous_friction_coeff: ProxyArray#

Deprecated property. Please use joint_viscous_friction_coeff instead and manage the default joint viscous friction coefficient manually.

property default_mass: ProxyArray#

Deprecated property. Please use body_mass instead and manage the default mass manually.

property default_spatial_tendon_damping: ProxyArray#

Deprecated property. Please use spatial_tendon_damping instead and manage the default spatial tendon damping manually.

property default_spatial_tendon_limit_stiffness: ProxyArray#

Deprecated property. Please use spatial_tendon_limit_stiffness instead and manage the default spatial tendon limit stiffness manually.

property default_spatial_tendon_offset: ProxyArray#

Deprecated property. Please use spatial_tendon_offset instead and manage the default spatial tendon offset manually.

property default_spatial_tendon_stiffness: ProxyArray#

Deprecated property. Please use spatial_tendon_stiffness instead and manage the default spatial tendon stiffness manually.

property fixed_tendon_limit: ProxyArray#

Shorthand for fixed_tendon_pos_limits.

property joint_friction: ProxyArray#

Shorthand for joint_friction_coeff.

property joint_limits: ProxyArray#

Shorthand for joint_pos_limits.

property joint_velocity_limits: ProxyArray#

Shorthand for joint_vel_limits.

property root_ang_vel_b: ProxyArray#

Shorthand for root_com_ang_vel_b.

property root_ang_vel_w: ProxyArray#

Shorthand for root_com_ang_vel_w.

property root_lin_vel_b: ProxyArray#

Shorthand for root_com_lin_vel_b.

property root_lin_vel_w: ProxyArray#

Shorthand for root_com_lin_vel_w.

property root_pos_w: ProxyArray#

Shorthand for root_link_pos_w.

property root_pose_w: ProxyArray#

Shorthand for root_link_pose_w.

property root_quat_w: ProxyArray#

Shorthand for root_link_quat_w.

property root_vel_w: ProxyArray#

Shorthand for root_com_vel_w.

property root_state_w: ProxyArray#

Deprecated, same as root_link_pose_w and root_com_vel_w.

Deprecated, same as root_link_pose_w and root_link_vel_w.

property root_com_state_w: ProxyArray#

Deprecated, same as root_com_pose_w and root_com_vel_w.

property default_root_state: ProxyArray#

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_state parameter.

property body_state_w: ProxyArray#

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’s center of mass frame.

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: ProxyArray#

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_newton.assets.RigidObject[source]#

Bases: BaseRigidObject

A 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_view attribute.

Attributes:

cfg

Configuration instance for the rigid object.

data

Data related to the asset.

num_instances

Number of instances of the asset.

num_bodies

Number of bodies in the asset.

body_names

Ordered names of bodies in the rigid object.

root_view

Root view for the asset.

instantaneous_wrench_composer

Instantaneous wrench composer.

permanent_wrench_composer

Permanent wrench composer.

device

Memory device for computation.

has_debug_vis_implementation

Whether the asset has a debug visualization implemented.

is_initialized

Whether the asset is initialized.

Methods:

__init__(cfg)

Initialize the rigid object.

reset([env_ids, env_mask])

Reset the rigid object.

write_data_to_sim()

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.

write_root_com_velocity_to_sim_index(*, ...)

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

write_root_com_velocity_to_sim_mask(*, ...)

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

write_root_link_velocity_to_sim_index(*, ...)

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

write_root_link_velocity_to_sim_mask(*, ...)

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

set_masses_index(*, masses[, body_ids, env_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 position of all bodies using indices.

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

Set center of mass position 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() and write_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.

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() and write_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() and write_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 body_names: list[str]#

Ordered names of bodies in the rigid object.

property root_view: newton.selection.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 WrenchComposer instance. Wrenches added or set to this wrench composer are only valid for the current simulation step. At the end of the simulation step, the wrenches set to this object are discarded. This is useful to apply forces that change all the time, things like drag forces for instance.

property permanent_wrench_composer: WrenchComposer#

Permanent wrench composer.

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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,).

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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.

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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,).

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

write_root_com_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 center of mass pose over selected environment indices into the simulation.

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

Note

This method expects partial data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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.

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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,).

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

write_root_com_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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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.

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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,).

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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.

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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,).

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

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

Set masses of all bodies using indices.

Note

This method expects partial data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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) None[source]#

Set center of mass position of all bodies using indices.

Note

This method expects partial data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

Caution

Unlike the PhysX version of this method, this method does not set the center of mass orientation. Only the position is set. This is because Newton considers the center of mass orientation to always be aligned with the body frame.

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

  • 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).

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 position of all bodies using masks.

Note

This method expects full data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

Caution

Unlike the PhysX version of this method, this method does not set the center of mass orientation. Only the position is set. This is because Newton considers the center of mass orientation to always be aligned with the body frame.

Parameters:
  • coms – Center of mass position of all bodies. Shape is (num_instances, num_bodies, 3).

  • 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) None[source]#

Set inertias of all bodies using indices.

Note

This method expects partial data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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, env_ids: Sequence[int] | torch.Tensor | None = None)[source]#

Deprecated, same as write_root_link_pose_to_sim_index() and write_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.

Controlled by AssetBaseCfg.disable_shape_checks. When checks are disabled this method is a no-op.

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

Controlled by AssetBaseCfg.disable_shape_checks. When checks are disabled this method is a no-op.

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

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

  • dtype – The expected warp dtype.

  • name – Optional parameter name for error messages.

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

property device: str#

Memory device for computation.

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. Resets target environments, then adds forces and torques via the permanent wrench composer.

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, env_ids: Sequence[int] | torch.Tensor | None = None)[source]#

Deprecated, same as write_root_com_pose_to_sim_index() and write_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().

Deprecated, same as write_root_link_pose_to_sim_index().

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().

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

class isaaclab_newton.assets.RigidObjectData[source]#

Bases: BaseRigidObjectData

Data 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:

is_primed

Whether the rigid object data is fully instantiated and ready to use.

body_names

Body names in the order parsed by the simulation view.

default_root_pose

Default root pose [pos, quat] in local environment frame.

default_root_vel

Default root velocity [lin_vel, ang_vel] in local environment frame.

root_link_pose_w

Root link pose [pos, quat] in simulation world frame.

root_link_vel_w

Root link velocity [lin_vel, ang_vel] in simulation world frame.

root_com_pose_w

Root center of mass pose [pos, quat] in simulation world frame.

root_com_vel_w

Root center of mass velocity [lin_vel, ang_vel] in simulation world frame.

body_mass

Mass of all bodies in the simulation world frame.

body_inertia

Inertia of all bodies in the simulation world frame.

body_link_pose_w

Body link pose [pos, quat] in simulation world frame.

body_link_vel_w

Body link velocity [lin_vel, ang_vel] in simulation world frame.

body_com_pose_w

Body center of mass pose [pos, quat] in simulation world frame.

body_com_vel_w

Body center of mass velocity [lin_vel, ang_vel] in simulation world frame.

body_com_acc_w

Acceleration of all bodies [lin_acc, ang_acc] in the simulation world frame.

body_com_pos_b

Center of mass position of all of the bodies in their respective link frames.

body_com_pose_b

Center of mass pose [pos, quat] of all bodies in their respective body's link frames.

projected_gravity_b

Projection of the gravity direction on base frame.

heading_w

Yaw heading of the base frame (in radians).

root_link_lin_vel_b

Root link linear velocity in base frame.

root_link_ang_vel_b

Root link angular velocity in base frame.

root_com_lin_vel_b

Root center of mass linear velocity in base frame.

root_com_ang_vel_b

Root center of mass angular velocity in base frame.

root_link_pos_w

Root link position in simulation world frame.

root_link_quat_w

Root link orientation (x, y, z, w) in simulation world frame.

root_link_lin_vel_w

Root linear velocity in simulation world frame.

root_link_ang_vel_w

Root link angular velocity in simulation world frame.

root_com_pos_w

Root center of mass position in simulation world frame.

root_com_quat_w

Root center of mass orientation (x, y, z, w) in simulation world frame.

root_com_lin_vel_w

Root center of mass linear velocity in simulation world frame.

root_com_ang_vel_w

Root center of mass angular velocity in simulation world frame.

body_link_pos_w

Positions of all bodies in simulation world frame.

body_link_quat_w

Orientation (x, y, z, w) of all bodies in simulation world frame.

body_link_lin_vel_w

Linear velocity of all bodies in simulation world frame.

body_link_ang_vel_w

Angular velocity of all bodies in simulation world frame.

body_com_pos_w

Positions of all bodies' center of mass in simulation world frame.

body_com_quat_w

Orientation (x, y, z, w) of the principal axes of inertia of all bodies in simulation world frame.

body_com_lin_vel_w

Linear velocity of all bodies in simulation world frame.

body_com_ang_vel_w

Angular velocity of all bodies in simulation world frame.

body_com_lin_acc_w

Linear acceleration of all bodies in simulation world frame.

body_com_ang_acc_w

Angular acceleration of all bodies in simulation world frame.

body_com_quat_b

Orientation (x, y, z, w) of the principal axes of inertia of all of the bodies in their respective link frames.

root_state_w

Deprecated, same as root_link_pose_w and root_com_vel_w.

root_link_state_w

Deprecated, same as root_link_pose_w and root_link_vel_w.

body_acc_w

Shorthand for body_com_acc_w.

body_ang_acc_w

Shorthand for body_com_ang_acc_w.

body_ang_vel_w

Shorthand for body_com_ang_vel_w.

body_lin_acc_w

Shorthand for body_com_lin_acc_w.

body_lin_vel_w

Shorthand for body_com_lin_vel_w.

body_pos_w

Shorthand for body_link_pos_w.

body_pose_w

Shorthand for body_link_pose_w.

body_quat_w

Shorthand for body_link_quat_w.

body_vel_w

Shorthand for body_com_vel_w.

com_pos_b

Shorthand for body_com_pos_b.

com_quat_b

Shorthand for body_com_quat_b.

default_inertia

Deprecated property.

default_mass

Deprecated property.

root_ang_vel_b

Shorthand for root_com_ang_vel_b.

root_ang_vel_w

Shorthand for root_com_ang_vel_w.

root_com_state_w

Deprecated, same as root_com_pose_w and root_com_vel_w.

root_lin_vel_b

Shorthand for root_com_lin_vel_b.

root_lin_vel_w

Shorthand for root_com_lin_vel_w.

root_pos_w

Shorthand for root_link_pos_w.

root_pose_w

Shorthand for root_link_pose_w.

root_quat_w

Shorthand for root_link_quat_w.

root_vel_w

Shorthand for root_com_vel_w.

default_root_state

Default root state [pos, quat, lin_vel, ang_vel] in local environment frame.

body_state_w

Deprecated, same as body_link_pose_w and body_com_vel_w.

body_link_state_w

Deprecated, same as body_link_pose_w and body_link_vel_w.

body_com_state_w

Deprecated, same as body_com_pose_w and body_com_vel_w.

Methods:

update(dt)

Updates the data for the rigid object.

property is_primed: bool#

Whether the rigid object data is fully instantiated and ready to use.

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.

body_names: list[str] = None#

Body names in the order parsed by the simulation view.

property default_root_pose: ProxyArray#

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: ProxyArray#

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.

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.

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

Mass of all bodies in the simulation world frame.

Shape is (num_instances, 1, 1), dtype = wp.float32. In torch this resolves to (num_instances, 1, 1).

property body_inertia: ProxyArray#

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

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.

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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_pos_b: ProxyArray#

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_pose_b: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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)\).

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.

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: ProxyArray#

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: ProxyArray#

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.

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.

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.

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.

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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.

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.

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.

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.

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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_quat_b: ProxyArray#

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 root_state_w: ProxyArray#

Deprecated, same as root_link_pose_w and root_com_vel_w.

Deprecated, same as root_link_pose_w and root_link_vel_w.

property body_acc_w: ProxyArray#

Shorthand for body_com_acc_w.

property body_ang_acc_w: ProxyArray#

Shorthand for body_com_ang_acc_w.

property body_ang_vel_w: ProxyArray#

Shorthand for body_com_ang_vel_w.

property body_lin_acc_w: ProxyArray#

Shorthand for body_com_lin_acc_w.

property body_lin_vel_w: ProxyArray#

Shorthand for body_com_lin_vel_w.

property body_pos_w: ProxyArray#

Shorthand for body_link_pos_w.

property body_pose_w: ProxyArray#

Shorthand for body_link_pose_w.

property body_quat_w: ProxyArray#

Shorthand for body_link_quat_w.

property body_vel_w: ProxyArray#

Shorthand for body_com_vel_w.

property com_pos_b: ProxyArray#

Shorthand for body_com_pos_b.

property com_quat_b: ProxyArray#

Shorthand for body_com_quat_b.

property default_inertia: ProxyArray#

Deprecated property. Please use body_inertia instead and manage the default inertia manually.

property default_mass: ProxyArray#

Deprecated property. Please use body_mass instead and manage the default mass manually.

property root_ang_vel_b: ProxyArray#

Shorthand for root_com_ang_vel_b.

property root_ang_vel_w: ProxyArray#

Shorthand for root_com_ang_vel_w.

property root_com_state_w: ProxyArray#

Deprecated, same as root_com_pose_w and root_com_vel_w.

property root_lin_vel_b: ProxyArray#

Shorthand for root_com_lin_vel_b.

property root_lin_vel_w: ProxyArray#

Shorthand for root_com_lin_vel_w.

property root_pos_w: ProxyArray#

Shorthand for root_link_pos_w.

property root_pose_w: ProxyArray#

Shorthand for root_link_pose_w.

property root_quat_w: ProxyArray#

Shorthand for root_link_quat_w.

property root_vel_w: ProxyArray#

Shorthand for root_com_vel_w.

property default_root_state: ProxyArray#

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 body_state_w: ProxyArray#

Deprecated, same as body_link_pose_w and body_com_vel_w.

Deprecated, same as body_link_pose_w and body_link_vel_w.

property body_com_state_w: ProxyArray#

Deprecated, same as body_com_pose_w and body_com_vel_w.

Rigid Object Collection#

class isaaclab_newton.assets.RigidObjectCollection[source]#

Bases: BaseRigidObjectCollection

A 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_view attribute.

Rigid objects in the collection are uniquely identified via the key of the dictionary rigid_objects in the RigidObjectCollectionCfg configuration class. This differs from the RigidObject class, 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 the rigid_objects dictionary could contain the same rigid object multiple times, leading to ambiguity.

Methods:

__init__(cfg)

Initialize the rigid object collection.

reset([env_ids, object_ids, env_mask, ...])

Resets all internal buffers of selected environments and objects.

write_data_to_sim()

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.

write_body_com_velocity_to_sim_index(*, ...)

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

write_body_com_velocity_to_sim_mask(*, ...)

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

write_body_link_velocity_to_sim_index(*, ...)

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

write_body_link_velocity_to_sim_mask(*, ...)

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

set_masses_index(*, masses[, body_ids, env_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 position of all bodies using indices.

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

Set center of mass position 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.

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.

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() and write_body_com_velocity_to_sim_index().

write_body_velocity_to_sim(body_velocities)

Deprecated, same as write_body_velocity_to_sim_index().

write_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() and write_body_com_velocity_to_sim_index().

write_body_link_state_to_sim(body_states[, ...])

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

Attributes:

cfg

Configuration instance for the rigid object.

data

Data related to the asset.

num_instances

Number of instances of the asset.

num_bodies

Number of bodies in the rigid object collection.

body_names

Ordered names of bodies in the rigid object collection.

root_view

Root view for the rigid object collection.

instantaneous_wrench_composer

Instantaneous wrench composer.

permanent_wrench_composer

Permanent wrench composer.

root_physx_view

Deprecated property.

device

Memory device for computation.

has_debug_vis_implementation

Whether the asset has a debug visualization implemented.

is_initialized

Whether the asset is initialized.

num_objects

Deprecated property.

object_names

Deprecated property.

__init__(cfg: RigidObjectCollectionCfg)[source]#

Initialize the rigid object collection.

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 num_bodies: int#

Number of bodies in the rigid object collection.

property body_names: list[str]#

Ordered names of bodies in the rigid object collection.

property root_view: newton.selection.ArticulationView#

Root view for the rigid object collection.

A single ArticulationView matching all body types. The 2nd dimension (matches per world) corresponds to the different body types.

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 WrenchComposer instance. Wrenches added or set to this wrench composer are only valid for the current simulation step. At the end of the simulation step, the wrenches set to this object are discarded. This is useful to apply forces that change all the time, things like drag forces for instance.

property permanent_wrench_composer: WrenchComposer#

Permanent wrench composer.

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

reset(env_ids: Sequence[int] | torch.Tensor | wp.array | 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.

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

  • object_mask – Object mask. Not used currently.

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 [s].

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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,).

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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.

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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.

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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.

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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.

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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.

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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.

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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.

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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.

Note

Triggers per-environment FK recomputation and solver reset (Kamino) for the affected environments.

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

Set masses of all bodies using indices.

Note

This method expects partial data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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) None[source]#

Set center of mass position of all bodies using indices.

Note

This method expects partial data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

Caution

Unlike the PhysX version of this method, this method does not set the center of mass orientation. Only the position is set. This is because Newton considers the center of mass orientation to always be aligned with the body frame.

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

  • 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).

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 position of all bodies using masks.

Note

This method expects full data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

Caution

Unlike the PhysX version of this method, this method does not set the center of mass orientation. Only the position is set. This is because Newton considers the center of mass orientation to always be aligned with the body frame.

Parameters:
  • coms – Center of mass position of all bodies. Shape is (num_instances, num_bodies, 3).

  • 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) None[source]#

Set inertias of all bodies using indices.

Note

This method expects partial data.

Tip

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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

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

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

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

Both the index and mask methods have dedicated optimized implementations. Performance is similar for both. However, to allow graphed pipelines, the mask method must be used.

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,).

property root_physx_view#

Deprecated property. Please use root_view instead.

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.

Controlled by AssetBaseCfg.disable_shape_checks. When checks are disabled this method is a no-op.

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

Controlled by AssetBaseCfg.disable_shape_checks. When checks are disabled this method is a no-op.

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

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

  • dtype – The expected warp dtype.

  • name – Optional parameter name for error messages.

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

property device: str#

Memory device for computation.

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_bodies instead.

property object_names: list[str]#

Deprecated property. Please use body_names instead.

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. Resets target environments, then adds forces and torques via the permanent wrench composer.

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().

Deprecated, same as write_body_link_pose_to_sim_index().

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() and write_body_com_velocity_to_sim_index().

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

Deprecated, same as write_body_velocity_to_sim_index().

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

Deprecated method. Please use write_body_com_pose_to_sim_index() instead.

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

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

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

Deprecated method. Please use write_body_com_velocity_to_sim_index() instead.

Deprecated method. Please use write_body_link_pose_to_sim_index() instead.

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

Deprecated method. Please use write_body_link_velocity_to_sim_index() instead.

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

Deprecated method. Please use write_body_pose_to_sim_index() instead.

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

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

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

Deprecated method. Please use write_body_com_velocity_to_sim_index() instead.

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() and write_body_com_velocity_to_sim_index().

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

class isaaclab_newton.assets.RigidObjectCollectionData[source]#

Bases: BaseRigidObjectCollectionData

Data 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:

is_primed

Whether the rigid object collection data is fully instantiated and ready to use.

body_names

Body names in the order parsed by the simulation view.

default_body_pose

Default body pose [pos, quat] in local environment frame.

default_body_vel

Default body velocity [lin_vel, ang_vel] in local environment frame.

body_link_pose_w

Body link pose [pos, quat] in simulation world frame.

body_link_vel_w

Body link velocity [lin_vel, ang_vel] in simulation world frame.

body_com_pose_w

Body center of mass pose [pos, quat] in simulation world frame.

body_com_vel_w

Body center of mass velocity [lin_vel, ang_vel] in simulation world frame.

body_com_acc_w

Acceleration of all bodies [lin_acc, ang_acc] in the simulation world frame.

body_com_pose_b

Center of mass pose [pos, quat] of all bodies in their respective body's link frames.

body_com_pos_b

Center of mass position of all of the bodies in their respective link frames.

body_mass

Mass of all bodies in the simulation world frame.

body_inertia

Inertia of all bodies in the simulation world frame.

projected_gravity_b

Projection of the gravity direction on base frame.

heading_w

Yaw heading of the base frame (in radians).

body_link_lin_vel_b

Root link linear velocity in base frame.

body_link_ang_vel_b

Root link angular velocity in base frame.

body_com_lin_vel_b

Root center of mass linear velocity in base frame.

body_com_ang_vel_b

Root center of mass angular velocity in base frame.

body_link_pos_w

Positions of all bodies in simulation world frame.

body_link_quat_w

Orientation (x, y, z, w) of all bodies in simulation world frame.

body_link_lin_vel_w

Linear velocity of all bodies in simulation world frame.

body_link_ang_vel_w

Angular velocity of all bodies in simulation world frame.

body_com_pos_w

Positions of all bodies' center of mass in simulation world frame.

body_com_quat_w

Orientation (x, y, z, w) of the principal axes of inertia of all bodies in simulation world frame.

body_com_lin_vel_w

Linear velocity of all bodies in simulation world frame.

body_com_ang_vel_w

Angular velocity of all bodies in simulation world frame.

body_com_lin_acc_w

Linear acceleration of all bodies in simulation world frame.

body_com_ang_acc_w

Angular acceleration of all bodies in simulation world frame.

body_com_quat_b

Orientation (x, y, z, w) of the principal axes of inertia of all of the bodies in their respective link frames.

body_acc_w

Shorthand for body_com_acc_w.

body_ang_acc_w

Shorthand for body_com_ang_acc_w.

body_ang_vel_w

Shorthand for body_com_ang_vel_w.

body_lin_acc_w

Shorthand for body_com_lin_acc_w.

body_lin_vel_w

Shorthand for body_com_lin_vel_w.

body_pos_w

Shorthand for body_link_pos_w.

body_pose_w

Shorthand for body_link_pose_w.

body_quat_w

Shorthand for body_link_quat_w.

body_vel_w

Shorthand for body_com_vel_w.

com_pos_b

Shorthand for body_com_pos_b.

com_quat_b

Shorthand for body_com_quat_b.

default_inertia

Deprecated property.

default_mass

Deprecated property.

default_object_pose

Deprecated property.

default_object_state

Deprecated property.

default_object_vel

Deprecated property.

object_acc_w

Deprecated property.

object_ang_acc_w

Deprecated property.

object_ang_vel_b

Deprecated property.

object_ang_vel_w

Deprecated property.

object_com_acc_w

Deprecated property.

object_com_ang_acc_w

Deprecated property.

object_com_ang_vel_b

Deprecated property.

object_com_ang_vel_w

Deprecated property.

object_com_lin_acc_w

Deprecated property.

object_com_lin_vel_b

Deprecated property.

object_com_lin_vel_w

Deprecated property.

object_com_pos_b

Deprecated property.

object_com_pos_w

Deprecated property.

object_com_pose_b

Deprecated property.

object_com_pose_w

Deprecated property.

object_com_quat_b

Deprecated property.

object_com_quat_w

Deprecated property.

object_com_state_w

Deprecated property.

object_com_vel_w

Deprecated property.

object_lin_acc_w

Deprecated property.

object_lin_vel_b

Deprecated property.

object_lin_vel_w

Deprecated property.

object_link_ang_vel_b

Deprecated property.

object_link_ang_vel_w

Deprecated property.

object_link_lin_vel_b

Deprecated property.

object_link_lin_vel_w

Deprecated property.

object_link_pos_w

Deprecated property.

object_link_pose_w

Deprecated property.

object_link_quat_w

Deprecated property.

object_link_state_w

Deprecated property.

object_link_vel_w

Deprecated property.

object_pos_w

Deprecated property.

object_pose_w

Deprecated property.

object_quat_w

Deprecated property.

object_state_w

Deprecated property.

object_vel_w

Deprecated property.

default_body_state

Default root state [pos, quat, lin_vel, ang_vel] in local environment frame.

body_state_w

Deprecated, same as body_link_pose_w and body_com_vel_w.

body_link_state_w

Deprecated, same as body_link_pose_w and body_link_vel_w.

body_com_state_w

Deprecated, same as body_com_pose_w and body_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.

body_names: list[str] = None#

Body names in the order parsed by the simulation view.

property default_body_pose: ProxyArray#

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: ProxyArray#

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

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.

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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_com_pos_b: ProxyArray#

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_mass: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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)\).

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.

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: ProxyArray#

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: ProxyArray#

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.

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.

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.

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.

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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: ProxyArray#

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_quat_b: ProxyArray#

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: ProxyArray#

Shorthand for body_com_acc_w.

property body_ang_acc_w: ProxyArray#

Shorthand for body_com_ang_acc_w.

property body_ang_vel_w: ProxyArray#

Shorthand for body_com_ang_vel_w.

property body_lin_acc_w: ProxyArray#

Shorthand for body_com_lin_acc_w.

property body_lin_vel_w: ProxyArray#

Shorthand for body_com_lin_vel_w.

property body_pos_w: ProxyArray#

Shorthand for body_link_pos_w.

property body_pose_w: ProxyArray#

Shorthand for body_link_pose_w.

property body_quat_w: ProxyArray#

Shorthand for body_link_quat_w.

property body_vel_w: ProxyArray#

Shorthand for body_com_vel_w.

property com_pos_b: ProxyArray#

Shorthand for body_com_pos_b.

property com_quat_b: ProxyArray#

Shorthand for body_com_quat_b.

property default_inertia: ProxyArray#

Deprecated property. Please use body_inertia instead and manage the default inertia manually.

property default_mass: ProxyArray#

Deprecated property. Please use body_mass instead and manage the default mass manually.

property default_object_pose: ProxyArray#

Deprecated property. Please use default_body_pose instead.

property default_object_state: ProxyArray#

Deprecated property. Please use default_body_state instead.

property default_object_vel: ProxyArray#

Deprecated property. Please use default_body_vel instead.

property object_acc_w: ProxyArray#

Deprecated property. Please use body_com_acc_w instead.

property object_ang_acc_w: ProxyArray#

Deprecated property. Please use body_com_ang_acc_w instead.

property object_ang_vel_b: ProxyArray#

Deprecated property. Please use body_com_ang_vel_b instead.

property object_ang_vel_w: ProxyArray#

Deprecated property. Please use body_com_ang_vel_w instead.

property object_com_acc_w#

Deprecated property. Please use body_com_acc_w instead.

property object_com_ang_acc_w: ProxyArray#

Deprecated property. Please use body_com_ang_acc_w instead.

property object_com_ang_vel_b: ProxyArray#

Deprecated property. Please use body_com_ang_vel_b instead.

property object_com_ang_vel_w: ProxyArray#

Deprecated property. Please use body_com_ang_vel_w instead.

property object_com_lin_acc_w: ProxyArray#

Deprecated property. Please use body_com_lin_acc_w instead.

property object_com_lin_vel_b: ProxyArray#

Deprecated property. Please use body_com_lin_vel_b instead.

property object_com_lin_vel_w: ProxyArray#

Deprecated property. Please use body_com_lin_vel_w instead.

property object_com_pos_b: ProxyArray#

Deprecated property. Please use body_com_pos_b instead.

property object_com_pos_w: ProxyArray#

Deprecated property. Please use body_com_pos_w instead.

property object_com_pose_b#

Deprecated property. Please use body_com_pose_b instead.

property object_com_pose_w#

Deprecated property. Please use body_com_pose_w instead.

property object_com_quat_b: ProxyArray#

Deprecated property. Please use body_com_quat_b instead.

property object_com_quat_w: ProxyArray#

Deprecated property. Please use body_com_quat_w instead.

property object_com_state_w#

Deprecated property. Please use body_com_state_w instead.

property object_com_vel_w#

Deprecated property. Please use body_com_vel_w instead.

property object_lin_acc_w: ProxyArray#

Deprecated property. Please use body_com_lin_acc_w instead.

property object_lin_vel_b: ProxyArray#

Deprecated property. Please use body_com_lin_vel_b instead.

property object_lin_vel_w: ProxyArray#

Deprecated property. Please use body_com_lin_vel_w instead.

Deprecated property. Please use body_link_ang_vel_b instead.

Deprecated property. Please use body_link_ang_vel_w instead.

Deprecated property. Please use body_link_lin_vel_b instead.

Deprecated property. Please use body_link_lin_vel_w instead.

Deprecated property. Please use body_link_pos_w instead.

Deprecated property. Please use body_link_pose_w instead.

Deprecated property. Please use body_link_quat_w instead.

Deprecated property. Please use body_link_state_w instead.

Deprecated property. Please use body_link_vel_w instead.

property object_pos_w: ProxyArray#

Deprecated property. Please use body_link_pos_w instead.

property object_pose_w: ProxyArray#

Deprecated property. Please use body_link_pose_w instead.

property object_quat_w: ProxyArray#

Deprecated property. Please use body_link_quat_w instead.

property object_state_w#

Deprecated property. Please use body_state_w instead.

property object_vel_w: ProxyArray#

Deprecated property. Please use body_com_vel_w instead.

property default_body_state: ProxyArray#

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: ProxyArray#

Deprecated, same as body_link_pose_w and body_com_vel_w.

Deprecated, same as body_link_pose_w and body_link_vel_w.

property body_com_state_w: ProxyArray#

Deprecated, same as body_com_pose_w and body_com_vel_w.

Deformable Object#

Note

isaaclab.assets.DeformableObjectCfg is the shared configuration class for deformable objects. The Newton extension exposes the Newton implementation of isaaclab.assets.DeformableObject, while deformable schema and material cfgs referenced by spawn remain backend-specific.

class isaaclab_newton.assets.DeformableObject[source]#

Bases: BaseDeformableObject

A deformable object asset class (Newton backend).

This class manages cloth/deformable bodies in the Newton physics engine. Newton stores all particles in flat arrays (state.particle_q, state.particle_qd). This class builds a per-instance indexing layer on top of those flat arrays, enabling the standard BaseDeformableObject interface for reading/writing nodal state.

The cloth mesh is added to the Newton ModelBuilder during the MODEL_INIT phase. The mesh data is read from the USD prim at cfg.prim_path, and cloth simulation parameters (density, stiffness, etc.) come from DeformableObjectCfg.

Attributes:

cfg

Configuration instance for the deformable object.

data

Data container for the deformable object.

num_instances

Number of instances of the asset.

num_bodies

Number of bodies in the asset.

max_sim_vertices_per_body

The maximum number of simulation mesh vertices per deformable body.

device

Memory device for computation.

has_debug_vis_implementation

Whether the asset has a debug visualization implemented.

is_initialized

Whether the asset is initialized.

Methods:

__init__(cfg)

Initialize the deformable object.

reset([env_ids, env_mask])

Reset the deformable object.

write_data_to_sim()

Apply kinematic targets to the Newton simulation.

update(dt)

Update the internal buffers.

write_nodal_pos_to_sim_index(nodal_pos[, ...])

Set the nodal positions over selected environment indices into the simulation.

write_nodal_velocity_to_sim_index(nodal_vel)

Set the nodal velocity over selected environment indices into the simulation.

write_nodal_kinematic_target_to_sim_index(targets)

Set the kinematic targets of the simulation mesh for the deformable bodies.

write_nodal_state_to_sim_mask(nodal_state[, ...])

Set the nodal state over selected environment mask 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_mask(nodal_vel)

Set the nodal velocity over selected environment mask into the simulation.

write_nodal_kinematic_target_to_sim_mask(targets)

Set the kinematic targets over selected environment mask into the target buffer.

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.

transform_nodal_pos(nodal_pos[, pos, quat])

Transform the nodal positions based on the pose transformation.

write_nodal_kinematic_target_to_sim(targets)

Deprecated.

write_nodal_pos_to_sim(nodal_pos[, env_ids])

Deprecated.

write_nodal_state_to_sim(nodal_state[, env_ids])

Deprecated.

write_nodal_state_to_sim_index(nodal_state)

Set the nodal state over selected environment indices into the simulation.

write_nodal_velocity_to_sim(nodal_vel[, env_ids])

Deprecated.

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 container for the deformable object.

property num_instances: int#

Number of instances of the asset.

property num_bodies: int#

Number of bodies in the asset.

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

property max_sim_vertices_per_body: int#

The maximum number of simulation mesh vertices per deformable body.

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

Reset the deformable object.

No-op to match the PhysX deformable object convention.

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]#

Apply kinematic targets to the Newton simulation.

Reads the stored kinematic target buffer and enforces it on particles: kinematic particles (flag=0) get inv_mass=0, particle_flags=0, target position, and zero velocity; free particles (flag=1) get their original inv_mass and particle_flags=1 (ACTIVE) restored.

Writes to both state_0 and state_1 so kinematic positions survive the state swaps that happen between substeps.

update(dt: float)[source]#

Update the internal buffers.

Parameters:

dt – The amount of time passed from last update() call [s].

write_nodal_pos_to_sim_index(nodal_pos: torch.Tensor | wp.array | ProxyArray, 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.

Parameters:
  • nodal_pos – Nodal positions in simulation frame [m]. 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_index(nodal_vel: torch.Tensor | wp.array | ProxyArray, 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.

Parameters:
  • nodal_vel – Nodal velocities in simulation frame [m/s]. 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_kinematic_target_to_sim_index(targets: torch.Tensor | wp.array | ProxyArray, 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.

Newton has no native kinematic target API. Instead: - Kinematic (flag=0.0): set particle_inv_mass to 0, write target pos, zero vel - Free (flag=1.0): restore original particle_inv_mass

Parameters:
  • targets – The kinematic targets comprising of nodal positions and flags [m]. 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_state_to_sim_mask(nodal_state: torch.Tensor | wp.array | ProxyArray, env_mask: wp.array | torch.Tensor | None = None) None[source]#

Set the nodal state over selected environment mask into the simulation.

Parameters:
  • nodal_state – Nodal state in simulation frame [m, m/s]. Shape is (num_instances, max_sim_vertices_per_body, 6).

  • env_mask – Environment mask. If None, then all indices are used. Shape is (num_instances,).

write_nodal_pos_to_sim_mask(nodal_pos: torch.Tensor | wp.array | ProxyArray, env_mask: wp.array | torch.Tensor | None = None) None[source]#

Set the nodal positions over selected environment mask into the simulation.

Parameters:
  • nodal_pos – Nodal positions in simulation frame [m]. Shape is (num_instances, max_sim_vertices_per_body, 3).

  • env_mask – Environment mask. If None, then all indices are used. Shape is (num_instances,).

write_nodal_velocity_to_sim_mask(nodal_vel: torch.Tensor | wp.array | ProxyArray, env_mask: wp.array | torch.Tensor | None = None) None[source]#

Set the nodal velocity over selected environment mask into the simulation.

Parameters:
  • nodal_vel – Nodal velocities in simulation frame [m/s]. Shape is (num_instances, max_sim_vertices_per_body, 3).

  • env_mask – Environment mask. If None, then all indices are used. Shape is (num_instances,).

write_nodal_kinematic_target_to_sim_mask(targets: torch.Tensor | wp.array | ProxyArray, env_mask: wp.array | torch.Tensor | None = None) None[source]#

Set the kinematic targets over selected environment mask into the target buffer.

Parameters:
  • targets – The kinematic targets comprising of nodal positions and flags [m]. Shape is (num_instances, max_sim_vertices_per_body, 4).

  • env_mask – Environment mask. If None, then all indices are used. Shape is (num_instances,).

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.

Controlled by AssetBaseCfg.disable_shape_checks. When checks are disabled this method is a no-op.

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

Controlled by AssetBaseCfg.disable_shape_checks. When checks are disabled this method is a no-op.

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

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

  • dtype – The expected warp dtype.

  • name – Optional parameter name for error messages.

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

property device: str#

Memory device for computation.

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

transform_nodal_pos(nodal_pos: torch.Tensor, pos: torch.Tensor | None = None, quat: torch.Tensor | None = None) torch.Tensor#

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 [m]. Shape is (N, max_sim_vertices_per_body, 3).

  • pos – The position transformation [m]. 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 [m]. Shape is (N, max_sim_vertices_per_body, 3).

write_nodal_kinematic_target_to_sim(targets: torch.Tensor | wp.array | ProxyArray, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated. Please use write_nodal_kinematic_target_to_sim_index() instead.

write_nodal_pos_to_sim(nodal_pos: torch.Tensor | wp.array | ProxyArray, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated. Please use write_nodal_pos_to_sim_index() instead.

write_nodal_state_to_sim(nodal_state: torch.Tensor | wp.array | ProxyArray, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated. Please use write_nodal_state_to_sim_index() instead.

write_nodal_state_to_sim_index(nodal_state: torch.Tensor | wp.array | ProxyArray, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None, full_data: bool = False) None#

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 [m, m/s]. 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_velocity_to_sim(nodal_vel: torch.Tensor | wp.array | ProxyArray, env_ids: Sequence[int] | torch.Tensor | wp.array | None = None) None#

Deprecated. Please use write_nodal_velocity_to_sim_index() instead.

class isaaclab_newton.assets.DeformableObjectData[source]#

Bases: BaseDeformableObjectData

Data container for a deformable object (Newton backend).

Newton stores all particles in flat arrays (model.particle_q, state.particle_qd). This data class builds a per-instance view by gathering from the flat arrays using precomputed offsets.

The data is lazily updated, meaning that the data is only updated when it is accessed.

Attributes:

default_nodal_state_w

Default nodal state [nodal_pos, nodal_vel] in simulation world frame.

nodal_kinematic_target

Simulation mesh kinematic targets for the deformable bodies.

nodal_pos_w

Nodal positions in simulation world frame [m].

nodal_vel_w

Nodal velocities in simulation world frame [m/s].

nodal_state_w

Nodal state [nodal_pos, nodal_vel] in simulation world frame [m, m/s].

root_pos_w

Root position from nodal positions [m].

root_vel_w

Root velocity from nodal velocities [m/s].

Methods:

update(dt)

Update the data for the deformable object.

default_nodal_state_w: ProxyArray = None#

Default nodal state [nodal_pos, nodal_vel] in simulation world frame. Shape is (num_instances, particles_per_body) with dtype vec6f.

nodal_kinematic_target: ProxyArray = None#

Simulation mesh kinematic targets for the deformable bodies. Shape is (num_instances, particles_per_body) with dtype vec4f.

property nodal_pos_w: ProxyArray#

Nodal positions in simulation world frame [m]. Shape is (num_instances, particles_per_body) vec3f.

property nodal_vel_w: ProxyArray#

Nodal velocities in simulation world frame [m/s]. Shape is (num_instances, particles_per_body) vec3f.

property nodal_state_w: ProxyArray#

Nodal state [nodal_pos, nodal_vel] in simulation world frame [m, m/s].

Shape is (num_instances, particles_per_body) vec6f.

property root_pos_w: ProxyArray#

Root position from nodal positions [m]. Shape is (num_instances,) vec3f.

This quantity is computed as the mean of the nodal positions.

update(dt: float)#

Update the data for the deformable object.

Parameters:

dt – The time step for the update [s]. This must be a positive value.

property root_vel_w: ProxyArray#

Root velocity from nodal velocities [m/s]. Shape is (num_instances,) vec3f.

This quantity is computed as the mean of the nodal velocities.