sim.sap_runtime.SapState#
- class sim.sap_runtime.SapState(joint_q: array, joint_qd: array, body_q: array, body_qd: array | None = None, body_f: array | None = None, joint_qd_order: Literal['sap', 'public'] = 'sap', body_f_order: Literal['sap', 'public'] = 'sap', requires_grad: bool = False)[source]#
Bases:
objectMutable SAP simulation state. Positions, velocities, body poses, body velocities, and external forces live here while SapModel remains immutable.
- __init__(joint_q: array, joint_qd: array, body_q: array, body_qd: array | None = None, body_f: array | None = None, joint_qd_order: Literal['sap', 'public'] = 'sap', body_f_order: Literal['sap', 'public'] = 'sap', requires_grad: bool = False) None#
Methods
__init__(joint_q, joint_qd, body_q[, ...])assign(other)Copy all state arrays from another SapState with matching optional-buffer layout.
Clear external body forces in place while leaving positions and velocities unchanged.
Attributes
body_fbody_f_orderbody_qdjoint_qd_orderrequires_gradjoint_qjoint_qdbody_q