newton.eval_jacobian#
- newton.eval_jacobian(model, state, J=None, joint_S_s=None, mask=None)[source]#
Evaluate spatial Jacobian for articulations.
Computes the spatial Jacobian J that maps joint velocities to spatial velocities of each link in world frame. The Jacobian is computed for each articulation in the model.
- Parameters:
model (Model) – The model containing articulation definitions.
state (State) – The state containing body transforms (body_q).
J (array | None) – Optional output array for the Jacobian, shape (articulation_count, max_links*6, max_dofs). If None, allocates internally.
joint_S_s (array | None) – Optional pre-allocated temp array for motion subspaces, shape (joint_dof_count,), dtype wp.spatial_vector. If None, allocates internally.
mask (array | None) – Optional boolean mask to select which articulations to compute. Shape [articulation_count]. If None, computes for all articulations.
- Returns:
The Jacobian array J, or None if the model has no articulations.
- Return type:
array | None