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:
objectNewton-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_keshape_material_khshape_material_mushape_material_mu_rollingshape_material_mu_torsionalshape_material_restitutionshape_material_taudeviceshape_countworld_countrequires_gradrigid_contact_maxshape_transformshape_bodyshape_typeshape_scaleshape_collision_radiusshape_source_ptrshape_source_refsshape_marginshape_gapshape_flagsshape_worldshape_collision_groupshape_sdf_indextexture_sdf_datashape_collision_aabb_lowershape_collision_aabb_uppershape_heightfield_indexheightfield_dataheightfield_elevationsshape_contact_pairsshape_contact_pair_counttexture_sdf_coarse_texturestexture_sdf_subgrid_texturestexture_sdf_subgrid_start_slotsshape_collision_filter_pairsrequested_contact_attributes