SimuVeda/ Engineering

Engineering · Simulator 092

Robot Arm

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

Experiments 0 of 0 Challenge not tried

How the model works

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.

Guided experiments

  1. Forward kinematics. L₁ = 1, L₂ = 0.8, θ₁ = 30°, θ₂ = 45°. Prediction: the hand is at about (1.07, 1.27).
  2. Two solutions. Target (1.2, 0.6), elbow down, then elbow up. Prediction: elbow down gives θ₁ ≈ −9.8°, θ₂ ≈ 84.3°; elbow up gives θ₁ ≈ 63.0°, θ₂ ≈ −84.3°. Both put the hand on the same point.
  3. Out of reach. Targets (2, 0) and (0.1, 0). Prediction: neither is reachable: 2 m is beyond L₁ + L₂ = 1.8 m and 0.1 m is inside the hole of radius L₁ − L₂ = 0.2 m. The arm stretches toward the target as far as it can.
  4. Straight line or curve? Move from (1.4, −0.6) to (0.4, 1.2) with each kind of motion. Prediction: joint interpolation swings the hand along a curved arc; straight-line motion follows the dashed line but needs different joint speeds all the way.

Challenge

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?

Reveal the explanation

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.

References

  • Craig, J. J., Introduction to Robotics: Mechanics and Control, 4th ed. (2017), ch. 3–4.
  • Lynch, K. M. and Park, F. C., Modern Robotics (2017), ch. 4 and 6.
  • Spong, M. W., Hutchinson, S. and Vidyasagar, M., Robot Modeling and Control, 2nd ed. (2020), ch. 3 and 5.

Related simulators

Worked example

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.

Common questions

What is the difference between forward and inverse kinematics?

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.

Why does a two-link arm have two 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.

What is the workspace of a robot arm?

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.

Keyboard shortcuts

Space
Play or pause
S
Step
R
Reset
F
Full screen
?
Show this list