Python guide and API reference#
Summary#
physics
Wrap one or more USD articulations. |
|
Wrap one or more USD collider bodies. |
|
Wrap or create one or more composite USD ground planes. |
|
Wrap one or more USD rigid bodies. |
Implementations#
- class isaacsim.foundation.prims.Articulation(
- self,
- paths: str | collections.abc.Sequence[str],
- *,
- reset_xform_op_properties: bool = True,
Bases:
XformWrap one or more USD articulations.
Resolve each path against the active stage, locate its articulation root, and cache its degree-of-freedom, joint, and link metadata. Omitted selection arrays address every wrapped articulation or sub-entity.
- Parameters:
paths – USD prim path or paths, optionally containing regular expressions.
reset_xform_op_properties – Whether to normalize each prim’s transform operation stack.
- Raises:
RuntimeError – If no active or default stage is available, a path has no articulation root, or the articulations are not homogeneous.
Initialize the articulation wrapper and cache its metadata.
- apply_api#
Apply an API schema to the selected prims.
- are_of_type = <nanobind.nb_func object>#
- property dof_names#
Get the ordered degree-of-freedom names.
- property dof_paths#
Get the degree-of-freedom paths for each wrapped articulation.
- property dof_types#
Get the ordered degree-of-freedom type names.
- get_applied_schemas#
Get the applied schema names of the selected prims.
- get_attribute_values#
Get an attribute value from each selected prim.
- get_children#
Get the child paths of the selected prims.
- get_dof_armatures#
Get additional inertia terms for selected degrees of freedom.
- Parameters:
indices – Wrapped-articulation indices to query, or
Nonefor all.dof_indices – Degree-of-freedom indices to query, or
Nonefor all.
- Returns:
Armature values shaped
(N, D).
- get_dof_drive_model_properties#
Get actuator drive-model properties for selected degrees of freedom.
- Parameters:
indices – Wrapped-articulation indices to query, or
Nonefor all.dof_indices – Degree-of-freedom indices to query, or
Nonefor all.
- Returns:
Speed-effort gradients, maximum actuator velocities, and velocity-dependent resistances, each shaped
(N, D).
- get_dof_drive_types#
Get drive types for selected degrees of freedom.
- Parameters:
indices – Wrapped-articulation indices to query, or
Nonefor all.dof_indices – Degree-of-freedom indices to query, or
Nonefor all.
- Returns:
Drive type names for each selected articulation and degree of freedom.
- get_dof_friction_properties#
Get friction properties for selected degrees of freedom.
- Parameters:
indices – Wrapped-articulation indices to query, or
Nonefor all.dof_indices – Degree-of-freedom indices to query, or
Nonefor all.
- Returns:
Static friction efforts, dynamic friction efforts, and viscous friction coefficients, each shaped
(N, D).
- get_dof_gains#
Get drive gains for selected degrees of freedom.
- Parameters:
indices – Wrapped-articulation indices to query, or
Nonefor all.dof_indices – Degree-of-freedom indices to query, or
Nonefor all.
- Returns:
Stiffness and damping values, each shaped
(N, D).
- get_dof_indices#
Get degree-of-freedom indices by name.
- Parameters:
names – Degree-of-freedom name or names to look up.
- Returns:
Indices in input order.
- Raises:
ValueError – If a name does not identify a degree of freedom.
- get_dof_limits#
Get lower and upper position limits for selected degrees of freedom.
- Parameters:
indices – Wrapped-articulation indices to query, or
Nonefor all.dof_indices – Degree-of-freedom indices to query, or
Nonefor all.
- Returns:
Lower and upper limits shaped
(N, D). Angular values are in radians and prismatic values are in stage units.
- get_dof_max_efforts#
Get maximum efforts for selected degrees of freedom.
- Parameters:
indices – Wrapped-articulation indices to query, or
Nonefor all.dof_indices – Degree-of-freedom indices to query, or
Nonefor all.
- Returns:
Maximum efforts shaped
(N, D). Angular values are in N m and prismatic values are in N.
- get_dof_max_velocities#
Get maximum velocities for selected degrees of freedom.
- Parameters:
indices – Wrapped-articulation indices to query, or
Nonefor all.dof_indices – Degree-of-freedom indices to query, or
Nonefor all.
- Returns:
Maximum velocities shaped
(N, D). Angular values are in rad/s and prismatic values are in m/s.
- get_dof_position_targets#
Get position targets for selected degrees of freedom.
- Parameters:
indices – Wrapped-articulation indices to query, or
Nonefor all.dof_indices – Degree-of-freedom indices to query, or
Nonefor all.
- Returns:
Position targets shaped
(N, D). Angular values are in radians and prismatic values are in stage units.
- get_dof_velocity_targets#
Get velocity targets for selected degrees of freedom.
- Parameters:
indices – Wrapped-articulation indices to query, or
Nonefor all.dof_indices – Degree-of-freedom indices to query, or
Nonefor all.
- Returns:
Velocity targets shaped
(N, D). Angular values are in rad/s and prismatic values are in m/s.
- get_enabled_self_collisions#
Get self-collision-enabled flags for selected articulations.
- Parameters:
indices – Wrapped-articulation indices to query, or
Nonefor all.- Returns:
Self-collision-enabled flags shaped
(N, 1).
- get_joint_indices#
Get joint indices by name.
- Parameters:
names – Joint name or names to look up.
- Returns:
Indices in input order.
- Raises:
ValueError – If a name does not identify a joint.
- get_link_enabled_gravities#
Get gravity-enabled flags for selected links.
- Parameters:
indices – Wrapped-articulation indices to query, or
Nonefor all.link_indices – Link indices to query, or
Nonefor all.
- Returns:
Gravity-enabled flags shaped
(N, L).
- get_link_indices#
Get link indices by name.
- Parameters:
names – Link name or names to look up.
- Returns:
Indices in input order.
- Raises:
ValueError – If a name does not identify a link.
- get_link_masses#
Get masses or inverse masses for selected links.
- Parameters:
indices – Wrapped-articulation indices to query, or
Nonefor all.link_indices – Link indices to query, or
Nonefor all.inverse – Whether to return reciprocal masses.
- Returns:
Masses in kg or reciprocal masses in 1/kg, shaped
(N, L).
- get_local_poses#
Get local translations and orientations for the selected prims.
- get_local_scales#
Get local scales for the selected prims.
- get_name#
Get the names of the selected prims.
- get_parent#
Get the parent paths of the selected prims.
- get_sleep_thresholds#
Get sleep thresholds for selected articulations.
- Parameters:
indices – Wrapped-articulation indices to query, or
Nonefor all.- Returns:
Kinetic-energy-per-mass thresholds below which the solver puts articulations to sleep, shaped
(N, 1).
- get_solver_iteration_counts#
Get PhysX solver iteration counts for selected articulations.
- Parameters:
indices – Wrapped-articulation indices to query, or
Nonefor all.- Returns:
Position and velocity iteration counts, each shaped
(N, 1).
- get_stabilization_thresholds#
Get stabilization thresholds for selected articulations.
- Parameters:
indices – Wrapped-articulation indices to query, or
Nonefor all.- Returns:
Energy thresholds below which PhysX applies position-based stabilization, shaped
(N, 1).
- get_stage#
Get the active stage wrapper.
- get_type_name#
Get the USD type names of the selected prims.
- get_variant_selection#
Get the current variant selections of the selected prims.
- get_variant_sets#
Get the available variants grouped by variant set for the selected prims.
- get_visibilities#
Get visibility flags for the selected prims.
- get_world_poses#
Get world positions and orientations for the selected prims.
- has_api#
Check whether the selected prims have an applied API schema.
- is_a#
Check whether the selected prims conform to a typed schema.
- property joint_names#
Get the ordered joint names.
- property joint_paths#
Get the joint paths for each wrapped articulation.
- property joint_types#
Get the ordered joint type names.
- property link_names#
Get the ordered link names.
- property link_paths#
Get the link paths for each wrapped articulation.
- property num_dofs#
Get the degree-of-freedom count shared by the wrapped articulations.
- property num_joints#
Get the joint count shared by the wrapped articulations.
- property num_links#
Get the link count shared by the wrapped articulations.
- property paths#
The resolved paths wrapped by this object.
- remove_api#
Remove an applied API schema from the selected prims.
- reset_xform_op_properties#
Normalize the wrapped prims’ transform operation stacks.
- resolve_paths = <nanobind.nb_func object>#
- property root_paths#
Get the articulation-root path for each wrapped articulation.
- set_attribute_values#
Set an attribute value on each selected prim.
- set_dof_armatures#
Set additional inertia terms for selected degrees of freedom.
- Parameters:
armatures – Armature values shaped
(N, D).indices – Wrapped-articulation indices to modify, or
Nonefor all.dof_indices – Degree-of-freedom indices to modify, or
Nonefor all.
- set_dof_drive_model_properties#
Set actuator drive-model properties for selected degrees of freedom.
Provide at least one property; omitted properties remain unchanged.
- Parameters:
speed_effort_gradients – Speed-effort gradients shaped
(N, D), orNoneto preserve them.maximum_actuator_velocities – Maximum actuator velocities shaped
(N, D), orNoneto preserve them.velocity_dependent_resistances – Velocity-dependent resistances shaped
(N, D), orNoneto preserve them.indices – Wrapped-articulation indices to modify, or
Nonefor all.dof_indices – Degree-of-freedom indices to modify, or
Nonefor all.
- Raises:
ValueError – If all drive-model properties are
None.
- set_dof_drive_types#
Set drive types for selected degrees of freedom.
- Parameters:
types – One drive type for all selected degrees of freedom, or values for each articulation and degree of freedom.
indices – Wrapped-articulation indices to modify, or
Nonefor all.dof_indices – Degree-of-freedom indices to modify, or
Nonefor all.
- Raises:
ValueError – If the nested values cannot broadcast to the selected articulations and degrees of freedom.
- set_dof_friction_properties#
Set friction properties for selected degrees of freedom.
Provide at least one property. Static friction efforts must be at least the corresponding dynamic friction efforts.
- Parameters:
static_frictions – Static friction efforts shaped
(N, D), orNoneto preserve them.dynamic_frictions – Dynamic friction efforts shaped
(N, D), orNoneto preserve them.viscous_frictions – Viscous friction coefficients shaped
(N, D), orNoneto preserve them.indices – Wrapped-articulation indices to modify, or
Nonefor all.dof_indices – Degree-of-freedom indices to modify, or
Nonefor all.
- Raises:
ValueError – If all friction properties are
None.
- set_dof_gains#
Set drive gains for selected degrees of freedom.
Provide stiffness, damping, or both.
- Parameters:
stiffnesses – Stiffness values shaped
(N, D), orNoneto preserve them.dampings – Damping values shaped
(N, D), orNoneto preserve them.indices – Wrapped-articulation indices to modify, or
Nonefor all.dof_indices – Degree-of-freedom indices to modify, or
Nonefor all.update_default_gains – Whether to update the gains cached as control-mode defaults.
- Raises:
ValueError – If both
stiffnessesanddampingsareNone.
- set_dof_limits#
Set lower and/or upper position limits for selected degrees of freedom.
Provide at least one limit array. Angular values use radians and prismatic values use stage length units.
- Parameters:
lower – Lower limits shaped
(N, D), orNoneto preserve them.upper – Upper limits shaped
(N, D), orNoneto preserve them.indices – Wrapped-articulation indices to modify, or
Nonefor all.dof_indices – Degree-of-freedom indices to modify, or
Nonefor all.
- Raises:
ValueError – If both
lowerandupperareNone.
- set_dof_max_efforts#
Set maximum efforts for selected degrees of freedom.
- Parameters:
max_efforts – Maximum efforts shaped
(N, D); use N m for angular values and N for prismatic values.indices – Wrapped-articulation indices to modify, or
Nonefor all.dof_indices – Degree-of-freedom indices to modify, or
Nonefor all.
- set_dof_max_velocities#
Set maximum velocities for selected degrees of freedom.
- Parameters:
max_velocities – Maximum velocities shaped
(N, D); use rad/s for angular values and m/s for prismatic values.indices – Wrapped-articulation indices to modify, or
Nonefor all.dof_indices – Degree-of-freedom indices to modify, or
Nonefor all.
- set_dof_position_targets#
Set desired position targets for selected degrees of freedom.
The simulation approaches the targets according to the configured drive gains.
- Parameters:
positions – Position targets shaped
(N, D); use radians for angular values and stage units for prismatic values.indices – Wrapped-articulation indices to modify, or
Nonefor all.dof_indices – Degree-of-freedom indices to modify, or
Nonefor all.
- set_dof_velocity_targets#
Set desired velocity targets for selected degrees of freedom.
The simulation approaches the targets according to the configured damping values.
- Parameters:
velocities – Velocity targets shaped
(N, D); use rad/s for angular values and m/s for prismatic values.indices – Wrapped-articulation indices to modify, or
Nonefor all.dof_indices – Degree-of-freedom indices to modify, or
Nonefor all.
- set_enabled_self_collisions#
Enable or disable self-collision for selected articulations.
- Parameters:
enabled – Self-collision-enabled flags shaped
(N, 1).indices – Wrapped-articulation indices to modify, or
Nonefor all.
- set_link_enabled_gravities#
Enable or disable gravity for selected links.
- Parameters:
enabled – Gravity-enabled flags shaped
(N, L).indices – Wrapped-articulation indices to modify, or
Nonefor all.link_indices – Link indices to modify, or
Nonefor all.
- set_link_masses#
Set masses for selected links.
- Parameters:
masses – Masses in kg shaped
(N, L).indices – Wrapped-articulation indices to modify, or
Nonefor all.link_indices – Link indices to modify, or
Nonefor all.
- set_local_poses#
Set local translations and/or orientations.
- set_local_scales#
Set local scales on the selected prims.
- set_sleep_thresholds#
Set sleep thresholds for selected articulations.
- Parameters:
thresholds – Kinetic-energy-per-mass thresholds below which the solver puts articulations to sleep, shaped
(N, 1).indices – Wrapped-articulation indices to modify, or
Nonefor all.
- set_solver_iteration_counts#
Set PhysX solver iteration counts for selected articulations.
Provide at least one count array. Higher counts can improve accuracy at a performance cost.
- Parameters:
position_counts – Position iteration counts shaped
(N, 1), orNoneto preserve them.velocity_counts – Velocity iteration counts shaped
(N, 1), orNoneto preserve them.indices – Wrapped-articulation indices to modify, or
Nonefor all.
- Raises:
ValueError – If both count arrays are
None.
- set_stabilization_thresholds#
Set stabilization thresholds for selected articulations.
- Parameters:
thresholds – Energy thresholds below which PhysX applies position-based stabilization, shaped
(N, 1).indices – Wrapped-articulation indices to modify, or
Nonefor all.
- set_variant_selection#
Set variant selections on the selected prims.
- set_visibilities#
Set visibility flags on the selected prims.
- set_world_poses#
Set world positions and/or orientations.
- switch_dof_control_mode#
Switch the drive control mode for selected degrees of freedom.
Position control restores the cached stiffness and damping, velocity control uses zero stiffness and cached damping, and effort control uses zero stiffness and damping.
- Parameters:
mode – Control mode to activate.
indices – Wrapped-articulation indices to modify, or
Nonefor all.dof_indices – Degree-of-freedom indices to modify, or
Nonefor all.
- Raises:
ValueError – If
modeis not"position","velocity", or"effort".
- class isaacsim.foundation.prims.ColliderBody(
- self,
- paths: str | collections.abc.Sequence[str],
- *,
- approximations: str | collections.abc.Sequence[str] | None = None,
- apply_collision_apis: bool = True,
- reset_xform_op_properties: bool = True,
Bases:
XformWrap one or more USD collider bodies.
Resolve paths against the active stage and provide batched collision-property access. Omitted selection arrays address every wrapped prim.
- Parameters:
paths – USD prim path or paths, optionally containing regular expressions.
approximations – Collision approximation name or per-prim names, or
Noneto preserve authored values.apply_collision_apis – Whether to apply the collision API during initialization.
reset_xform_op_properties – Whether to normalize each prim’s transform operation stack.
- Raises:
RuntimeError – If no active or default stage is available or a path does not resolve to an existing prim.
Initialize the collider-body wrapper.
- apply_api#
Apply an API schema to the selected prims.
- apply_collision_apis#
Apply the collision API to selected prims.
- Parameters:
indices – Wrapped-prim indices to modify, or
Nonefor all.
- are_of_type = <nanobind.nb_func object>#
- get_applied_schemas#
Get the applied schema names of the selected prims.
- get_attribute_values#
Get an attribute value from each selected prim.
- get_children#
Get the child paths of the selected prims.
- get_collision_approximations#
Get collision geometry approximations for selected prims.
- Parameters:
indices – Wrapped-prim indices to query, or
Nonefor all.- Returns:
Approximation names in selected-prim order.
- get_enabled_collisions#
Get collision-enabled flags for selected prims.
- Parameters:
indices – Wrapped-prim indices to query, or
Nonefor all.- Returns:
Collision-enabled flags shaped
(N, 1).
- get_local_poses#
Get local translations and orientations for the selected prims.
- get_local_scales#
Get local scales for the selected prims.
- get_name#
Get the names of the selected prims.
- get_offsets#
Get contact and rest offsets for selected collider bodies.
- Parameters:
indices – Wrapped-prim indices to query, or
Nonefor all.- Returns:
Contact and rest offsets in stage units, each shaped
(N, 1).
- get_parent#
Get the parent paths of the selected prims.
- get_stage#
Get the active stage wrapper.
- get_torsional_patch_radii#
Get torsional friction patch radii for selected collider bodies.
- Parameters:
indices – Wrapped-prim indices to query, or
Nonefor all.minimum – Whether to get minimum rather than standard patch radii.
- Returns:
Patch radii in stage units shaped
(N, 1).
- get_type_name#
Get the USD type names of the selected prims.
- get_variant_selection#
Get the current variant selections of the selected prims.
- get_variant_sets#
Get the available variants grouped by variant set for the selected prims.
- get_visibilities#
Get visibility flags for the selected prims.
- get_world_poses#
Get world positions and orientations for the selected prims.
- has_api#
Check whether the selected prims have an applied API schema.
- is_a#
Check whether the selected prims conform to a typed schema.
- property paths#
The resolved paths wrapped by this object.
- remove_api#
Remove an applied API schema from the selected prims.
- remove_collision_apis#
Remove the collision API from selected prims.
- Parameters:
indices – Wrapped-prim indices to modify, or
Nonefor all.
- reset_xform_op_properties#
Normalize the wrapped prims’ transform operation stacks.
- resolve_paths = <nanobind.nb_func object>#
- set_attribute_values#
Set an attribute value on each selected prim.
- set_collision_approximations#
Set collision geometry approximations for selected prims.
- Parameters:
approximations – One approximation name for all selected prims, or one name per prim.
indices – Wrapped-prim indices to modify, or
Nonefor all.
- set_enabled_collisions#
Enable or disable collision for selected prims.
- Parameters:
enabled – Collision-enabled flags shaped
(N, 1).indices – Wrapped-prim indices to modify, or
Nonefor all.
- set_local_poses#
Set local translations and/or orientations.
- set_local_scales#
Set local scales on the selected prims.
- set_offsets#
Set contact and/or rest offsets for selected collider bodies.
Provide at least one offset array. Contact offsets must be positive and greater than the corresponding rest offsets.
- Parameters:
contact_offsets – Contact offsets in stage units shaped
(N, 1), orNoneto preserve them.rest_offsets – Rest offsets in stage units shaped
(N, 1), orNoneto preserve them.indices – Wrapped-prim indices to modify, or
Nonefor all.
- Raises:
ValueError – If both offset arrays are
None.
- set_torsional_patch_radii#
Set torsional friction patch radii for selected collider bodies.
- Parameters:
radii – Patch radii in stage units shaped
(N, 1).indices – Wrapped-prim indices to modify, or
Nonefor all.minimum – Whether to set minimum rather than standard patch radii.
- set_variant_selection#
Set variant selections on the selected prims.
- set_visibilities#
Set visibility flags on the selected prims.
- set_world_poses#
Set world positions and/or orientations.
- class isaacsim.foundation.prims.GroundPlane(
- self,
- paths: str | collections.abc.Sequence[str],
- *,
- sizes: warp.array | None = None,
- colors: str | collections.abc.Sequence[str] | warp.array | None = None,
- axes: str | collections.abc.Sequence[str] | None = None,
- reset_xform_op_properties: bool = True,
Bases:
XformWrap or create one or more composite USD ground planes.
Each ground plane contains a collision plane and a renderable mesh. Supply either existing paths to wrap or missing paths to create; creation options are ignored when wrapping. Omitted selection arrays address every wrapped ground plane.
- Parameters:
paths – Existing or missing USD ground-plane path or paths, optionally containing regular expressions.
sizes – Full extents in stage units shaped
(N, 1), orNoneto use creation defaults.colors – Normalized RGB values or color names, or
Noneto use creation defaults.axes – Case-insensitive
"X","Y", or"Z"normal axis values, orNoneto use the stage up-axis.reset_xform_op_properties – Whether to normalize each prim’s transform operation stack.
- Raises:
ValueError – If an axis is invalid.
RuntimeError – If no active or default stage is available or an existing prim lacks the required composite structure.
Initialize the ground-plane wrapper, creating missing prims as needed.
- apply_api#
Apply an API schema to the selected prims.
- are_of_type = <nanobind.nb_func object>#
- get_applied_schemas#
Get the applied schema names of the selected prims.
- get_attribute_values#
Get an attribute value from each selected prim.
- get_children#
Get the child paths of the selected prims.
- get_enabled_collisions#
Get collision-enabled flags for selected ground planes.
- Parameters:
indices – Wrapped-ground-plane indices to query, or
Nonefor all.- Returns:
Collision-enabled flags shaped
(N, 1).
- get_local_poses#
Get local translations and orientations for the selected prims.
- get_local_scales#
Get local scales for the selected prims.
- get_name#
Get the names of the selected prims.
- get_offsets#
Get contact and rest offsets for selected ground planes.
- Parameters:
indices – Wrapped-ground-plane indices to query, or
Nonefor all.- Returns:
Contact and rest offsets in stage units, each shaped
(N, 1).
- get_parent#
Get the parent paths of the selected prims.
- get_stage#
Get the active stage wrapper.
- get_torsional_patch_radii#
Get torsional friction patch radii for selected ground planes.
- Parameters:
indices – Wrapped-ground-plane indices to query, or
Nonefor all.minimum – Whether to get minimum rather than standard patch radii.
- Returns:
Patch radii in stage units shaped
(N, 1).
- get_type_name#
Get the USD type names of the selected prims.
- get_variant_selection#
Get the current variant selections of the selected prims.
- get_variant_sets#
Get the available variants grouped by variant set for the selected prims.
- get_visibilities#
Get visibility flags for the selected prims.
- get_world_poses#
Get world positions and orientations for the selected prims.
- has_api#
Check whether the selected prims have an applied API schema.
- is_a#
Check whether the selected prims conform to a typed schema.
- property meshes#
Get the render-mesh wrapper, whose lifetime is tied to this ground-plane wrapper.
- property paths#
The resolved paths wrapped by this object.
- property planes#
Get the collision-plane wrapper, whose lifetime is tied to this ground-plane wrapper.
- remove_api#
Remove an applied API schema from the selected prims.
- reset_xform_op_properties#
Normalize the wrapped prims’ transform operation stacks.
- resolve_paths = <nanobind.nb_func object>#
- set_attribute_values#
Set an attribute value on each selected prim.
- set_enabled_collisions#
Enable or disable collision for selected ground planes.
- Parameters:
enabled – Collision-enabled flags shaped
(N, 1).indices – Wrapped-ground-plane indices to modify, or
Nonefor all.
- set_local_poses#
Set local translations and/or orientations.
- set_local_scales#
Set local scales on the selected prims.
- set_offsets#
Set contact and/or rest offsets for selected ground planes.
Provide at least one offset array. Contact offsets must be positive and greater than the corresponding rest offsets.
- Parameters:
contact_offsets – Contact offsets in stage units shaped
(N, 1), orNoneto preserve them.rest_offsets – Rest offsets in stage units shaped
(N, 1), orNoneto preserve them.indices – Wrapped-ground-plane indices to modify, or
Nonefor all.
- Raises:
ValueError – If both offset arrays are
None.
- set_torsional_patch_radii#
Set torsional friction patch radii for selected ground planes.
- Parameters:
radii – Patch radii in stage units shaped
(N, 1).indices – Wrapped-ground-plane indices to modify, or
Nonefor all.minimum – Whether to set minimum rather than standard patch radii.
- set_variant_selection#
Set variant selections on the selected prims.
- set_visibilities#
Set visibility flags on the selected prims.
- set_world_poses#
Set world positions and/or orientations.
- class isaacsim.foundation.prims.RigidBody(
- self,
- paths: str | collections.abc.Sequence[str],
- *,
- masses: warp.array | None = None,
- densities: warp.array | None = None,
- apply_physics_apis: bool = True,
- reset_xform_op_properties: bool = True,
Bases:
XformWrap one or more USD rigid bodies.
Resolve paths against the active stage and provide batched rigid-body-property access. Omitted selection arrays address every wrapped prim.
- Parameters:
paths – USD prim path or paths, optionally containing regular expressions.
masses – Initial masses in kg shaped
(N, 1), orNoneto preserve authored values.densities – Initial densities in kg/m^3 shaped
(N, 1), orNoneto preserve authored values.apply_physics_apis – Whether to apply the rigid-body and mass APIs during initialization.
reset_xform_op_properties – Whether to normalize each prim’s transform operation stack.
- Raises:
RuntimeError – If no active or default stage is available or a path does not resolve to an existing prim.
Initialize the rigid-body wrapper.
- apply_api#
Apply an API schema to the selected prims.
- apply_physics_apis#
Apply the rigid-body and mass APIs to selected prims.
- Parameters:
indices – Wrapped-prim indices to modify, or
Nonefor all.
- are_of_type = <nanobind.nb_func object>#
- get_applied_schemas#
Get the applied schema names of the selected prims.
- get_attribute_values#
Get an attribute value from each selected prim.
- get_children#
Get the child paths of the selected prims.
- get_densities#
Get densities for selected rigid bodies.
- Parameters:
indices – Wrapped-prim indices to query, or
Nonefor all.- Returns:
Densities in kg/m^3 shaped
(N, 1).
- get_enabled_gravities#
Get gravity-enabled flags for selected rigid bodies.
- Parameters:
indices – Wrapped-prim indices to query, or
Nonefor all.- Returns:
Gravity-enabled flags shaped
(N, 1).
- get_enabled_rigid_bodies#
Get rigid-body-dynamics-enabled flags for selected prims.
- Parameters:
indices – Wrapped-prim indices to query, or
Nonefor all.- Returns:
Rigid-body-dynamics-enabled flags shaped
(N, 1).
- get_local_poses#
Get local translations and orientations for the selected prims.
- get_local_scales#
Get local scales for the selected prims.
- get_masses#
Get masses or inverse masses for selected rigid bodies.
- Parameters:
indices – Wrapped-prim indices to query, or
Nonefor all.inverse – Whether to return reciprocal masses.
- Returns:
Masses in kg or reciprocal masses in 1/kg, shaped
(N, 1).
- get_name#
Get the names of the selected prims.
- get_parent#
Get the parent paths of the selected prims.
- get_sleep_thresholds#
Get sleep thresholds for selected rigid bodies.
- Parameters:
indices – Wrapped-prim indices to query, or
Nonefor all.- Returns:
Kinetic-energy-per-mass thresholds below which the solver puts bodies to sleep, shaped
(N, 1).
- get_stage#
Get the active stage wrapper.
- get_type_name#
Get the USD type names of the selected prims.
- get_variant_selection#
Get the current variant selections of the selected prims.
- get_variant_sets#
Get the available variants grouped by variant set for the selected prims.
- get_velocities#
Get linear and angular velocities for selected rigid bodies.
- Parameters:
indices – Wrapped-prim indices to query, or
Nonefor all.- Returns:
Linear velocities in m/s and angular velocities in rad/s, each shaped
(N, 3).
- get_visibilities#
Get visibility flags for the selected prims.
- get_world_poses#
Get world positions and orientations for the selected prims.
- has_api#
Check whether the selected prims have an applied API schema.
- is_a#
Check whether the selected prims conform to a typed schema.
- property paths#
The resolved paths wrapped by this object.
- remove_api#
Remove an applied API schema from the selected prims.
- remove_physics_apis#
Remove the rigid-body and mass APIs from selected prims.
- Parameters:
indices – Wrapped-prim indices to modify, or
Nonefor all.
- reset_xform_op_properties#
Normalize the wrapped prims’ transform operation stacks.
- resolve_paths = <nanobind.nb_func object>#
- set_attribute_values#
Set an attribute value on each selected prim.
- set_densities#
Set densities for selected rigid bodies.
- Parameters:
densities – Densities in kg/m^3 shaped
(N, 1).indices – Wrapped-prim indices to modify, or
Nonefor all.
- set_enabled_gravities#
Enable or disable gravity for selected rigid bodies.
- Parameters:
enabled – Gravity-enabled flags shaped
(N, 1).indices – Wrapped-prim indices to modify, or
Nonefor all.
- set_enabled_rigid_bodies#
Enable or freeze selected rigid bodies.
Disabled bodies remain in collision detection but are not moved by the physics solver.
- Parameters:
enabled – Rigid-body-dynamics-enabled flags shaped
(N, 1).indices – Wrapped-prim indices to modify, or
Nonefor all.
- set_local_poses#
Set local translations and/or orientations.
- set_local_scales#
Set local scales on the selected prims.
- set_masses#
Set masses for selected rigid bodies.
- Parameters:
masses – Masses in kg shaped
(N, 1).indices – Wrapped-prim indices to modify, or
Nonefor all.
- set_sleep_thresholds#
Set sleep thresholds for selected rigid bodies.
- Parameters:
thresholds – Kinetic-energy-per-mass thresholds below which the solver puts bodies to sleep, shaped
(N, 1).indices – Wrapped-prim indices to modify, or
Nonefor all.
- set_variant_selection#
Set variant selections on the selected prims.
- set_velocities#
Set linear and/or angular velocities for selected rigid bodies.
Provide at least one velocity array.
- Parameters:
linear_velocities – Linear velocities in m/s shaped
(N, 3), orNoneto preserve them.angular_velocities – Angular velocities in rad/s shaped
(N, 3), orNoneto preserve them.indices – Wrapped-prim indices to modify, or
Nonefor all.
- Raises:
ValueError – If both velocity arrays are
None.
- set_visibilities#
Set visibility flags on the selected prims.
- set_world_poses#
Set world positions and/or orientations.