SimuVeda

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.

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.