Skip to content

novaphy.ik.IKObjectiveRotation

Three-row objective that matches a link-frame orientation.

IKObjectiveRotation(
    link_index,
    link_offset_rotation,
    target_rotations,
    canonicalize_quat_err=True,
    weight=1.0,
)

Both link_offset_rotation and the (n_problems, 4) target array use [x, y, z, w] quaternions. With canonicalize_quat_err=True, the residual uses the short-arc quaternion representation. The residual itself is an axis-angle three-vector.

set_target_rotation(problem_idx, new_rotation) updates one problem; set_target_rotations(new_rotations) replaces the complete target array. residual_dim() returns 3.

See also