Skip to content

novaphy.ik.solve_ik_pose

Backwards-compatible position-and-orientation IK wrapper around IKSolver with position, rotation, and optional joint-limit objectives.

solve_ik_pose(
    art,
    q0,
    target_position,
    target_orientation,
    joint_limits=None,
    ee_link_index=-1,
    local_offset=None,
    tol_pos=1e-4,
    tol_orient=1e-2,
    max_iter=150,
    lambda_damp=0.01,
    step_size=1.0,
    weight_orientation=1.0,
)

target_position is (3,); target_orientation is a (3, 3) rotation matrix in this legacy API. The wrapper converts the matrix to an xyzw quaternion for IKObjectiveRotation.

Returns (q_solution, converged). The solver runs the fixed max_iter count, then compares final position and axis-angle orientation error with tol_pos and tol_orient. Explicit joint limits add a soft objective and a final hard clip.

This compatibility path supports scalar-coordinate Revolute/Prismatic IK, not Ball/Free/D6 quaternion updates.

See also