RobotGuide
Labs/Two-Link IK and Singularities

Lab 4 / 15 · Interactive · geometry

Two-Link IK and Singularities

Drag the target point: watch two solution sets, and what happens the instant the arm goes straight.

Math: Sine and cosineNo coding neededNo hardware needed≈ 7 min

Readouts

θ₁ shoulder—
θ₂ elbow—
Condition number κ—
Status—

How to play

Press and drag the target point on the canvas. Solid lines are the elbow-up solution, dashed lines the elbow-down solution. Drag the hand close to full extension and watch the condition number jump.

Pure geometry, no dynamics or joint limits. A real machine also has limits, collisions, and velocity constraints to handle.

What problem this lab solves

Inverse kinematics is the question «I want the hand here — how much should each joint rotate». The two-link arm is the smallest playable model: it has all three real concepts at once — multiple solutions, singularity, workspace. Every trouble a real arm has, it has too.

How to read the figure

The blue arm is the «elbow-up» solution, the orange arm is «elbow-down» — one end-effector position, two sets of joint angles, and which one you pick is an engineering decision (obstacle avoidance, cable routing, torque). Drag the target to the boundary: the two solutions merge, the Jacobian determinant heads to zero — that is the singularity, where joint velocities blow up to infinity. The condition number shows live in the lower right.

Hands-on

Drag the target until the arm is nearly straight and watch the condition number — it jumps suddenly. Back to mid-workspace, it is small. When an interview asks «why shouldn't an arm reach full extension», the answer is right here.

Related topics

Next labs (in play-learn order)