Forward Kinematics (2-Link)
End-effector position from joint angles of a two-link arm.
Formula
Variables
Example
Compute where the hand ends up from the shoulder and elbow angles.
How it works
This equation gives the horizontal position of the tip of a planar two-link arm by adding the x-components of each link. The first term is the x-distance produced by the first link, and the second term is the x-distance of the second link measured after it has been rotated by the combined angle of both joints. It works because each rigid link contributes a vector, and forward kinematics converts those link vectors into Cartesian coordinates using basic trigonometry.
When to use it
Use this when you know the joint angles of a 2D robotic arm and need the end-effector position for planning, control, or simulation. It is common in robot manipulators, animation rigs, and linkage analysis in mechanisms.
Worked example, step by step
Given: L_1 = 0.80 m, L_2 = 0.50 m, θ_1 = 30°, θ_2 = 45° Step 1: Add the joint angles for the second link: θ_1 + θ_2 = 30° + 45° = 75° Step 2: Substitute into the formula: x = L_1 cos θ_1 + L_2 cos(θ_1 + θ_2) x = 0.80 cos 30° + 0.50 cos 75° Step 3: Evaluate the cosine values: cos 30° ≈ 0.8660, cos 75° ≈ 0.2588 Step 4: Multiply: 0.80 × 0.8660 = 0.6928 0.50 × 0.2588 = 0.1294 Step 5: Add the contributions: x = 0.6928 + 0.1294 = 0.8222 m Final answer: the end-effector x-position is about 0.822 m from the base in the horizontal direction.
Common mistakes to avoid
- Using θ_2 by itself for the second link instead of the combined angle θ_1 + θ_2
- Forgetting to convert degrees to radians when using a calculator or programming language that expects radians
- Mixing up link lengths or signs, especially when the arm is pointing left or angles are measured from a different reference axis
Did You Know?
Forward kinematics is easy; the reverse — finding angles for a desired position — can have many or no solutions.
Share this formula
More in Robotics & Control
View allPID Controller
AdvancedControl output from proportional, integral and derivative of the error.
Degrees of Freedom
IntermediateIndependent motions of a mechanism from bodies and constraints.
Gear Reduction Torque
IntermediateOutput torque after gear reduction, allowing for efficiency.
Encoder Resolution
BasicSmallest angle a rotary encoder can resolve.
DC Motor Torque
IntermediateTorque of a DC motor is proportional to current.
Motor Back-EMF
AdvancedVoltage a spinning motor generates against its supply.