
Forward Kinematics Explained
Discover how robots determine the position of their end effector from joint angles using forward kinematics.
Every robotic arm knows the angle of each of its joints, but those numbers alone don’t tell us where the robot’s hand actually is.
That’s exactly what forward kinematics (FK) solves. Instead of asking “What joint angles do I need to reach this position?”, forward kinematics asks:
“Given these joint angles, where does the robot end up?”
It’s one of the first calculations every robot performs. By combining the robot’s joint angles with the lengths of its links, forward kinematics determines the exact position of the end effector.
Why forward kinematics matters
Robot motors only know how far they’ve rotated—they don’t automatically know where the robot’s tool is located in space.
Forward kinematics bridges that gap. It converts the angles measured at each joint into an (x, y) position, allowing the robot to understand its current pose before performing tasks like path planning, collision avoidance, or inverse kinematics.
Without forward kinematics, a robot would know how much each motor had turned but not where its arm actually is.
Interactive demonstration
Use the sliders below to rotate each joint and watch the end effector move. As the joint angles change, the robot continuously calculates its position using forward kinematics.
Turning angles into position
Forward kinematics is essentially a chain of geometric calculations. Starting from the robot’s base, each joint rotates the following link, gradually building up the final position of the end effector.
For a simple two-link robot arm, the robot already knows:
- The angle of the first joint
- The angle of the second joint
- The length of both links
Since these values are already known, the position can be calculated directly using trigonometry. Unlike inverse kinematics, there are no equations to solve for unknown angles.
Step-by-step calculation
1. Start with the robot configuration
The calculation begins with the robot’s current joint angles.
const theta1 = Math.PI / 6;
const theta2 = Math.PI / 4;
These values describe the current pose of the robot.
2. Find the first joint position
The elbow position is calculated using the length of the first link and the shoulder angle.
const elbowX = L1 * Math.cos(theta1);
const elbowY = L1 * Math.sin(theta1);
This determines where the first link ends relative to the robot’s base.
3. Extend to the second link
The second link rotates relative to the first, so its orientation depends on both joint angles.
const x =
L1 * Math.cos(theta1) +
L2 * Math.cos(theta1 + theta2);
const y =
L1 * Math.sin(theta1) +
L2 * Math.sin(theta1 + theta2);
These equations calculate the final position of the robot’s end effector.
4. Determine the final position
Once the coordinates have been calculated, they can be displayed or passed to other parts of the robot’s control system.
endEffector.position.set(x, y);
Every time either joint angle changes, this calculation is repeated, allowing the robot to continuously track where its tool is located.
Things worth knowing
It only describes the robot’s pose
Forward kinematics tells the robot where it currently is. It doesn’t decide where the robot should move next.
The mathematics is more direct
Unlike inverse kinematics, forward kinematics doesn’t need to solve for unknown values. Given the joint angles, the position can be calculated directly.
Every joint contributes
Each joint changes the orientation of every link that follows it. Even a small change in one joint angle can noticeably alter the final position of the end effector.
Summary
- Forward kinematics converts joint angles into a position.
- It allows a robot to determine where its end effector currently is.
- A simple two-link arm uses basic trigonometry to perform the calculation.
- The computation is fast enough to run continuously as the robot moves.
- Forward kinematics is one of the fundamental building blocks of robotics.
Learn more
If you’d like to explore forward kinematics further, these are excellent next steps:
Official documentation
- ROS 2 TF2 Documentation
- Orocos Kinematics and Dynamics Library (KDL)
- Pinocchio Robot Dynamics Library
Recommended resources
- Modern Robotics by Kevin Lynch & Frank Park
- Introduction to Robotics: Mechanics and Control by John J. Craig
- MIT OpenCourseWare – Robotics
Forward kinematics provides the robot’s understanding of where it is, while inverse kinematics determines how to reach somewhere new. Together, these two concepts form the mathematical foundation behind nearly every robotic arm, from factory automation and surgical robotics to planetary exploration.