Manipulator Basics · Lab 05 of 10
Lab 05: Inverse Kinematics
Drag a target: analytical 2R IK with both elbows, pseudoinverse and damped least-squares IK, convergence and limits.
Objective
Find joint angles that put the tool on a target: analytically for the 2R arm (with both elbow solutions), and numerically with the Jacobian pseudoinverse and damped least squares for 3R and 6-DOF arms, watching convergence, joint limits and unreachable targets.
Brief theory
Inverse kinematics (IK) solves for . For the 2R arm the law of cosines gives a closed form:
Numerical IK iterates on the task error : (pseudoinverse) or (damped least squares, DLS). DLS trades a little accuracy for bounded steps near singularities. Each iteration here is a real step from the current configuration; nothing is precomputed. Module 07 has the derivations.
Simulation workspace
Drag the 3D view to orbit, scroll or pinch to zoom. Every number shown is computed live by the simulation engine running in your browser.
Loading the simulation…
Guided tasks
Each task ticks itself when the simulation sees you do it. Progress is saved in this browser.
- Move the targetDrag the target in the 2D view or use the target sliders.
- Solve IKSolve once analytically (2R) and once numerically.
- Select an IK solutionSwitch between elbow up and elbow down for the same target.
- Observe convergenceRun a numerical solve that converges and look at the error plot (log scale).
- Introduce an unreachable targetPut the target outside the reachable annulus and read what each method reports.
- Adjust the initial configurationChange the start configuration and solve again: a different start can give a different solution.
Challenges
Each challenge states an objective, its constraints and how success is measured. The live line under it is computed from the simulation. Hints and full solutions are there when you want them.
Success criteria
- Every solution shown is verified by passing it back through forward kinematics: the residual is displayed and must be below 0.1 mm to count as solved.
- For an unreachable target the analytical solver says why and the numerical solvers stop with the smallest residual they found, never claiming success.
Explanation of the results
The analytical solver is exact: its residual is at the level of floating-point rounding (about m). The numerical solvers stop when the residual is below the tolerance, so their solutions are accurate to that tolerance, not exact. Damped least squares takes smaller steps than the pseudoinverse near singular configurations (a stretched arm), which is why it converges more reliably from bad starts and why, for an unreachable target, it settles on the closest reachable point instead of oscillating.
Different starting configurations converge to different solutions because a 2R or 3R arm generally has several (and a 6-DOF arm up to sixteen). Real IK solvers therefore seed from the current configuration to stay on the same branch, and check joint limits and collisions before accepting a solution.