novaphy.eval_fk¶
Newton-aligned forward kinematics over a Model, flat joint-coordinate
arrays, and a caller-owned SimState. Updates the state's body transforms
and velocities from the supplied joint positions / velocities.
def eval_fk(
model: Model,
joint_q: np.ndarray,
joint_qd: np.ndarray,
state: SimState,
mask: np.ndarray | None = None,
indices: np.ndarray | None = None,
body_flag_filter: BodyFlags | int = BodyFlags.ALL,
) -> None
Example¶
import novaphy
joint_q = state.joint_q.numpy()
joint_qd = state.joint_qd.numpy()
novaphy.eval_fk(model, joint_q, joint_qd, state)
# state.body_q / state.body_qd are now consistent with the flat joint arrays.
Compatibility Notes¶
The signature intentionally mirrors Newton's model/state evaluator shape:
generalized coordinates are explicit arrays, while the output SimState is
updated in-place. mask and indices are mutually exclusive selectors over
articulation indices: use a per-articulation boolean mask or an explicit
index list. Within each selected articulation, body_flag_filter controls
whether dynamic and/or kinematic bodies are written.