sim.sap_runtime.SapModel#

class sim.sap_runtime.SapModel(device: Any, joint_count: int, joint_dof_count: int, joint_coord_count: int, body_count: int, articulation_count: int, world_count: int, shape_count: int, requires_grad: bool, joint_type: array, joint_articulation: array, joint_parent: array, joint_child: array, joint_q_start: array, joint_qd_start: array, joint_dof_dim: array, joint_axis: array, joint_X_p: array, joint_X_c: array, joint_ancestor: array, articulation_start: array, joint_q: array, joint_qd: array, body_q: array, body_qd: array, body_mass: array, body_inertia: array, body_com: array, body_flags: array, body_world: array, gravity: array, joint_armature: array, shape_body: array, shape_material_mu: array | None, shape_material_ke: array | None, shape_material_tau: array | None, joint_target_mode: array, joint_target_ke: array, joint_target_kd: array, joint_target_pos: array, joint_target_vel: array, joint_f: array, joint_act: array, joint_effort_limit: array, joint_limit_lower: array, joint_limit_upper: array, joint_limit_ke: array, joint_limit_kd: array, sap_debug_body_mass: array | None = None, sap_debug_body_inertia: array | None = None, sap_debug_body_com: array | None = None, sap_debug_joint_axis: array | None = None, sap_debug_joint_X_p: array | None = None, sap_debug_joint_X_c: array | None = None, sap_debug_gravity: array | None = None, sap_debug_joint_armature: array | None = None, sap_debug_shape_material_mu: array | None = None, sap_debug_shape_material_ke: array | None = None, sap_debug_shape_material_tau: array | None = None, up_axis: int = 2, shape_transform: array | None = None, shape_type: array | None = None, shape_scale: array | None = None, shape_flags: array | None = None, shape_margin: array | None = None, shape_gap: array | None = None, shape_is_solid: array | None = None, shape_source: list[Any] | None = None, shape_source_ptr: array | None = None, shape_collision_radius: array | None = None, shape_world: array | None = None, shape_sdf_index: array | None = None, texture_sdf_data: array | None = None, texture_sdf_coarse_textures: list[Any] | None = None, texture_sdf_subgrid_textures: list[Any] | None = None, texture_sdf_subgrid_start_slots: list[Any] | None = None, body_label: tuple[str, ...] = (), joint_label: tuple[str, ...] = (), articulation_label: tuple[str, ...] = (), shape_label: tuple[str, ...] = ())[source]#

Bases: object

Immutable SAP model arrays describing topology, articulated bodies, shapes, materials, limits, drives, labels, and initial state for one or more replicated worlds.

__init__(device: Any, joint_count: int, joint_dof_count: int, joint_coord_count: int, body_count: int, articulation_count: int, world_count: int, shape_count: int, requires_grad: bool, joint_type: array, joint_articulation: array, joint_parent: array, joint_child: array, joint_q_start: array, joint_qd_start: array, joint_dof_dim: array, joint_axis: array, joint_X_p: array, joint_X_c: array, joint_ancestor: array, articulation_start: array, joint_q: array, joint_qd: array, body_q: array, body_qd: array, body_mass: array, body_inertia: array, body_com: array, body_flags: array, body_world: array, gravity: array, joint_armature: array, shape_body: array, shape_material_mu: array | None, shape_material_ke: array | None, shape_material_tau: array | None, joint_target_mode: array, joint_target_ke: array, joint_target_kd: array, joint_target_pos: array, joint_target_vel: array, joint_f: array, joint_act: array, joint_effort_limit: array, joint_limit_lower: array, joint_limit_upper: array, joint_limit_ke: array, joint_limit_kd: array, sap_debug_body_mass: array | None = None, sap_debug_body_inertia: array | None = None, sap_debug_body_com: array | None = None, sap_debug_joint_axis: array | None = None, sap_debug_joint_X_p: array | None = None, sap_debug_joint_X_c: array | None = None, sap_debug_gravity: array | None = None, sap_debug_joint_armature: array | None = None, sap_debug_shape_material_mu: array | None = None, sap_debug_shape_material_ke: array | None = None, sap_debug_shape_material_tau: array | None = None, up_axis: int = 2, shape_transform: array | None = None, shape_type: array | None = None, shape_scale: array | None = None, shape_flags: array | None = None, shape_margin: array | None = None, shape_gap: array | None = None, shape_is_solid: array | None = None, shape_source: list[Any] | None = None, shape_source_ptr: array | None = None, shape_collision_radius: array | None = None, shape_world: array | None = None, shape_sdf_index: array | None = None, texture_sdf_data: array | None = None, texture_sdf_coarse_textures: list[Any] | None = None, texture_sdf_subgrid_textures: list[Any] | None = None, texture_sdf_subgrid_start_slots: list[Any] | None = None, body_label: tuple[str, ...] = (), joint_label: tuple[str, ...] = (), articulation_label: tuple[str, ...] = (), shape_label: tuple[str, ...] = ()) None#

Methods

__init__(device, joint_count, ...[, ...])

control([requires_grad, clone_variables])

Create a SapControl object initialized from the model force, target, and actuation arrays.

state([requires_grad])

Create a mutable SapState initialized from the model position, velocity, body pose, and body velocity arrays.

Attributes

articulation_label

body_label

joint_label

sap_debug_body_com

sap_debug_body_inertia

sap_debug_body_mass

sap_debug_gravity

sap_debug_joint_X_c

sap_debug_joint_X_p

sap_debug_joint_armature

sap_debug_joint_axis

sap_debug_shape_material_ke

sap_debug_shape_material_mu

sap_debug_shape_material_tau

shape_collision_radius

shape_flags

shape_gap

shape_is_solid

shape_label

shape_margin

shape_scale

shape_sdf_index

shape_source

shape_source_ptr

shape_transform

shape_type

shape_world

texture_sdf_coarse_textures

texture_sdf_data

texture_sdf_subgrid_start_slots

texture_sdf_subgrid_textures

up_axis

device

joint_count

joint_dof_count

joint_coord_count

body_count

articulation_count

world_count

shape_count

requires_grad

joint_type

joint_articulation

joint_parent

joint_child

joint_q_start

joint_qd_start

joint_dof_dim

joint_axis

joint_X_p

joint_X_c

joint_ancestor

articulation_start

joint_q

joint_qd

body_q

body_qd

body_mass

body_inertia

body_com

body_flags

body_world

gravity

joint_armature

shape_body

shape_material_mu

shape_material_ke

shape_material_tau

joint_target_mode

joint_target_ke

joint_target_kd

joint_target_pos

joint_target_vel

joint_f

joint_act

joint_effort_limit

joint_limit_lower

joint_limit_upper

joint_limit_ke

joint_limit_kd