Engineering · Simulator 092
A simple robot arm has a shoulder and an elbow. Turn the joints to see where the hand goes, or drag a target and let the arm work out the joint angles. Find the edge of what it can reach, see why most targets have two solutions, and compare moving the joints evenly with moving the hand in a straight line.
Class 11–12CollegeBuilds on Class 11 Maths: Trigonometric Functions
Forward kinematics gives the hand position from the joint angles θ₁ (shoulder, from the x-axis) and θ₂ (elbow, relative to the first link):
x = L₁ cos θ₁ + L₂ cos(θ₁ + θ₂)
y = L₁ sin θ₁ + L₂ sin(θ₁ + θ₂)
Inverse kinematics works backwards from a target (x, y). The law of cosines gives the elbow angle:
cos θ₂ = (x² + y² − L₁² − L₂²) / (2 L₁ L₂)
θ₁ = atan2(y, x) − atan2(L₂ sin θ₂, L₁ + L₂ cos θ₂)
Because ±θ₂ have the same cosine, most targets have two solutions, elbow up and elbow down. A solution exists only if |cos θ₂| ≤ 1, so the workspace is a ring: |L₁ − L₂| ≤ r ≤ L₁ + L₂.
Moving between two poses by changing both joint angles at a steady rate (joint interpolation) moves the hand along a curve. To move the hand in a straight line the controller must solve inverse kinematics at every instant.
Kinematics only: no masses, motor torques or joint limits, links of zero width, and the base fixed at the origin. Lengths are in metres.
An arm has L₁ = 0.5 m and L₂ = 0.3 m. What is the area of floor its hand can reach, if the base can turn all the way round? Which single point inside the outer circle has only one inverse-kinematics solution apart from the circle edges?
The workspace is the ring between r = 0.2 m and r = 0.8 m, with area π(0.8² − 0.2²) = 0.6π ≈ 1.88 m². On both circles (r = 0.8 fully stretched, r = 0.2 fully folded) the two solutions merge into one, since θ₂ = 0° or 180°. No other point has a single solution; points inside r = 0.2 have none.
Forward kinematics: links L₁ = 1 and L₂ = 0.8, shoulder θ₁ = 60°, elbow θ₂ = −30°.
x = 1 × cos 60° + 0.8 × cos 30° = 0.5 + 0.693 ≈ 1.19, y = 1 × sin 60° + 0.8 × sin 30° = 0.866 + 0.4 ≈ 1.27.
Inverse kinematics: reach the target (1.0, 1.0). Then r² = 2, so cos θ₂ = (2 − 1 − 0.64) / (2 × 1 × 0.8) = 0.225 and θ₂ ≈ ±77.0°.
Elbow down (θ₂ = +77.0°): θ₁ = atan2(1, 1) − atan2(0.8 sin 77°, 1 + 0.8 cos 77°) ≈ 45° − 33.5° = 11.5°. Elbow up (θ₂ = −77.0°): θ₁ ≈ 45° + 33.5° = 78.5°. Both poses put the hand on the same point.
The target is reachable because r = 1.41 lies between |L₁ − L₂| = 0.2 and L₁ + L₂ = 1.8.
Forward kinematics takes the joint angles and gives the hand position. Inverse kinematics starts from where the hand must go and finds the joint angles, which can have two, one or no solutions.
The elbow can bend either way and still put the hand on the same point, because +θ₂ and −θ₂ have the same cosine. These are the elbow-up and elbow-down poses.
The set of points the hand can reach. For two links it is a ring between radius |L₁ − L₂| and L₁ + L₂; a target outside that ring has no solution.