novaphy.eval_ik¶
Evaluate inverse kinematics from maximal body state into writable flat joint arrays.
def eval_ik(
model: Model,
state: SimState,
joint_q: np.ndarray,
joint_qd: np.ndarray,
mask: np.ndarray | None = None,
indices: np.ndarray | None = None,
body_flag_filter: BodyFlags | int = BodyFlags.ALL,
) -> None
joint_q and joint_qd must be one-dimensional, writable, C-contiguous
float32 arrays. mask and indices are mutually exclusive selectors over
articulation indices; body_flag_filter then filters dynamic/kinematic
bodies within the selected articulations.
Example¶
joint_q = state.joint_q.numpy().copy()
joint_qd = state.joint_qd.numpy().copy()
novaphy.eval_ik(model, state, joint_q, joint_qd)