sim.collision.contacts.SapContacts#

class sim.collision.contacts.SapContacts(rigid_contact_max: int, *, requires_grad: bool = False, device: Device | str | None = None, per_contact_shape_properties: bool = False, clear_buffers: bool = False, requested_attributes: set[str] | None = None)[source]#

Bases: object

Rigid contact storage consumed by SAP-owned collision generation.

The buffer layout mirrors the rigid-contact portion of the source collision storage: one active contact counter, per-contact shape indices, witness points, offsets, normal, margins, thread ids, contact force, and optional per-contact material properties.

__init__(rigid_contact_max: int, *, requires_grad: bool = False, device: Device | str | None = None, per_contact_shape_properties: bool = False, clear_buffers: bool = False, requested_attributes: set[str] | None = None) None[source]#

Methods

__init__(rigid_contact_max, *[, ...])

clear()

Reset the active contact count and, when configured, clear stale contact payload buffers.

validate_extended_attributes(attributes)

Validate that requested extended contact attributes are supported by the contact buffer implementation.

Attributes

EXTENDED_ATTRIBUTES

device

Return the Warp device that owns the contact counter and payload arrays.

has_rigid_contacts

Return True because this buffer always owns rigid-contact storage.