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:
objectImmutable 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_labelbody_labeljoint_labelsap_debug_body_comsap_debug_body_inertiasap_debug_body_masssap_debug_gravitysap_debug_joint_X_csap_debug_joint_X_psap_debug_joint_armaturesap_debug_joint_axissap_debug_shape_material_kesap_debug_shape_material_musap_debug_shape_material_taushape_collision_radiusshape_flagsshape_gapshape_is_solidshape_labelshape_marginshape_scaleshape_sdf_indexshape_sourceshape_source_ptrshape_transformshape_typeshape_worldtexture_sdf_coarse_texturestexture_sdf_datatexture_sdf_subgrid_start_slotstexture_sdf_subgrid_texturesup_axisdevicejoint_countjoint_dof_countjoint_coord_countbody_countarticulation_countworld_countshape_countrequires_gradjoint_typejoint_articulationjoint_parentjoint_childjoint_q_startjoint_qd_startjoint_dof_dimjoint_axisjoint_X_pjoint_X_cjoint_ancestorarticulation_startjoint_qjoint_qdbody_qbody_qdbody_massbody_inertiabody_combody_flagsbody_worldgravityjoint_armatureshape_bodyshape_material_mushape_material_keshape_material_taujoint_target_modejoint_target_kejoint_target_kdjoint_target_posjoint_target_veljoint_fjoint_actjoint_effort_limitjoint_limit_lowerjoint_limit_upperjoint_limit_kejoint_limit_kd