sim.resources.collision_model.SapCollisionModel#

class sim.resources.collision_model.SapCollisionModel(device: ~typing.Any, shape_count: int, world_count: int, requires_grad: bool, rigid_contact_max: int, shape_transform: ~warp._src.types.array, shape_body: ~warp._src.types.array, shape_type: ~warp._src.types.array, shape_scale: ~warp._src.types.array, shape_collision_radius: ~warp._src.types.array, shape_source_ptr: ~warp._src.types.array, shape_source_refs: list[~typing.Any], shape_margin: ~warp._src.types.array, shape_gap: ~warp._src.types.array, shape_flags: ~warp._src.types.array, shape_world: ~warp._src.types.array, shape_collision_group: ~warp._src.types.array, shape_sdf_index: ~warp._src.types.array, texture_sdf_data: ~warp._src.types.array | None, shape_collision_aabb_lower: ~warp._src.types.array, shape_collision_aabb_upper: ~warp._src.types.array, _shape_voxel_resolution: ~warp._src.types.array, shape_heightfield_index: ~warp._src.types.array, heightfield_data: ~warp._src.types.array | None, heightfield_elevations: ~warp._src.types.array | None, shape_contact_pairs: ~warp._src.types.array | None, shape_contact_pair_count: int, texture_sdf_coarse_textures: list[~typing.Any] = <factory>, texture_sdf_subgrid_textures: list[~typing.Any] = <factory>, texture_sdf_subgrid_start_slots: list[~typing.Any] = <factory>, shape_collision_filter_pairs: set[tuple[int, int]] = <factory>, requested_contact_attributes: set[str] = <factory>, shape_material_ke: ~warp._src.types.array | None = None, shape_material_tau: ~warp._src.types.array | None = None, shape_material_mu: ~warp._src.types.array | None = None, shape_material_restitution: ~warp._src.types.array | None = None, shape_material_mu_torsional: ~warp._src.types.array | None = None, shape_material_mu_rolling: ~warp._src.types.array | None = None, shape_material_kh: ~warp._src.types.array | None = None)[source]#

Bases: object

Newton-compatible collision-side arrays consumed by SapCollisionPipeline.

The pipeline reads these arrays to build AABBs, candidate pairs, narrow-phase inputs, material data, and SAP-owned rigid contacts. The layout preserves Newton collision metadata, including hydroelastic flags used by the Drake-style hydroelastic merge work.

__init__(device: ~typing.Any, shape_count: int, world_count: int, requires_grad: bool, rigid_contact_max: int, shape_transform: ~warp._src.types.array, shape_body: ~warp._src.types.array, shape_type: ~warp._src.types.array, shape_scale: ~warp._src.types.array, shape_collision_radius: ~warp._src.types.array, shape_source_ptr: ~warp._src.types.array, shape_source_refs: list[~typing.Any], shape_margin: ~warp._src.types.array, shape_gap: ~warp._src.types.array, shape_flags: ~warp._src.types.array, shape_world: ~warp._src.types.array, shape_collision_group: ~warp._src.types.array, shape_sdf_index: ~warp._src.types.array, texture_sdf_data: ~warp._src.types.array | None, shape_collision_aabb_lower: ~warp._src.types.array, shape_collision_aabb_upper: ~warp._src.types.array, _shape_voxel_resolution: ~warp._src.types.array, shape_heightfield_index: ~warp._src.types.array, heightfield_data: ~warp._src.types.array | None, heightfield_elevations: ~warp._src.types.array | None, shape_contact_pairs: ~warp._src.types.array | None, shape_contact_pair_count: int, texture_sdf_coarse_textures: list[~typing.Any] = <factory>, texture_sdf_subgrid_textures: list[~typing.Any] = <factory>, texture_sdf_subgrid_start_slots: list[~typing.Any] = <factory>, shape_collision_filter_pairs: set[tuple[int, int]] = <factory>, requested_contact_attributes: set[str] = <factory>, shape_material_ke: ~warp._src.types.array | None = None, shape_material_tau: ~warp._src.types.array | None = None, shape_material_mu: ~warp._src.types.array | None = None, shape_material_restitution: ~warp._src.types.array | None = None, shape_material_mu_torsional: ~warp._src.types.array | None = None, shape_material_mu_rolling: ~warp._src.types.array | None = None, shape_material_kh: ~warp._src.types.array | None = None) None#

Methods

__init__(device, shape_count, world_count, ...)

get_requested_contact_attributes()

Return a copy of the optional per-contact attributes requested by downstream solver or viewer code.

Attributes

shape_material_ke

shape_material_kh

shape_material_mu

shape_material_mu_rolling

shape_material_mu_torsional

shape_material_restitution

shape_material_tau

device

shape_count

world_count

requires_grad

rigid_contact_max

shape_transform

shape_body

shape_type

shape_scale

shape_collision_radius

shape_source_ptr

shape_source_refs

shape_margin

shape_gap

shape_flags

shape_world

shape_collision_group

shape_sdf_index

texture_sdf_data

shape_collision_aabb_lower

shape_collision_aabb_upper

shape_heightfield_index

heightfield_data

heightfield_elevations

shape_contact_pairs

shape_contact_pair_count

texture_sdf_coarse_textures

texture_sdf_subgrid_textures

texture_sdf_subgrid_start_slots

shape_collision_filter_pairs

requested_contact_attributes