Forward Kinematics Calculator (2R Planar Manipulator)
Compute the end-effector position of a 2-link planar robotic arm from joint angles and link lengths, with instant visualization and full formulas.
2R Forward Kinematics Calculator
Use any length unit; results will use the same unit.
End-effector position (P)
Intermediate joint position (elbow)
Arm visualization
Base at origin (0,0). Blue: link 1, Green: link 2, Red dot: end-effector.
How the 2R forward kinematics works
A 2R planar manipulator is a simple robot arm with two rotary joints in a plane. Given the link lengths \(L_1, L_2\) and joint angles \(\theta_1, \theta_2\), forward kinematics computes the end-effector position \(P = (x, y)\).
Position of the elbow (joint between link 1 and 2):
\[ x_1 = L_1 \cos\theta_1,\quad y_1 = L_1 \sin\theta_1 \]
Position of the end-effector:
\[ x = L_1 \cos\theta_1 + L_2 \cos(\theta_1 + \theta_2) \]
\[ y = L_1 \sin\theta_1 + L_2 \sin(\theta_1 + \theta_2) \]
These equations assume the base of the arm is at the origin \((0,0)\) and that positive angles are measured counterclockwise from the positive x-axis. The calculator lets you work in degrees or radians and any consistent length unit.
Step-by-step: computing forward kinematics
- Choose link lengths \(L_1, L_2\) in your preferred unit (e.g., meters).
- Enter joint angles \(\theta_1, \theta_2\) in degrees or radians.
- Convert to radians if needed: \[ \theta_{\text{rad}} = \theta_{\text{deg}} \cdot \frac{\pi}{180}. \]
- Compute the elbow position \((x_1, y_1)\).
- Compute the end-effector position \((x, y)\) using the formulas above.
Worked example
Suppose:
- \(L_1 = 1.0\ \text{m}\)
- \(L_2 = 0.8\ \text{m}\)
- \(\theta_1 = 45^\circ\)
- \(\theta_2 = 30^\circ\)
Convert angles to radians:
\[ \theta_1 = 45^\circ = \frac{\pi}{4},\quad \theta_2 = 30^\circ = \frac{\pi}{6},\quad \theta_1 + \theta_2 = \frac{5\pi}{12}. \]
Elbow position:
\[ x_1 = 1.0\cos\frac{\pi}{4} \approx 0.707,\quad y_1 = 1.0\sin\frac{\pi}{4} \approx 0.707. \]
End-effector position:
\[ x \approx 1.0\cos\frac{\pi}{4} + 0.8\cos\frac{5\pi}{12} \approx 1.39 \]
\[ y \approx 1.0\sin\frac{\pi}{4} + 0.8\sin\frac{5\pi}{12} \approx 1.22 \]
The calculator reproduces this example by default.
Forward vs inverse kinematics
- Forward kinematics: joint angles → end-effector pose (what this tool does).
- Inverse kinematics: desired end-effector pose → joint angles (often multiple or no solutions).
Forward kinematics is always straightforward: for a given set of joint angles, there is a unique pose. Inverse kinematics may be ambiguous (e.g., elbow-up vs elbow-down) or impossible if the target is outside the arm’s reachable workspace.
Common use cases
- Teaching and learning basic robot kinematics.
- Checking analytical derivations against numerical values.
- Debugging simulation or game animation rigs.
- Designing simple 2D manipulators or drawing robots.
FAQ
What angle convention does this calculator use?
Angles are measured counterclockwise from the positive x-axis. \(\theta_1\) rotates link 1 relative to the base; \(\theta_2\) rotates link 2 relative to link 1.
Can I use negative angles?
Yes. Negative angles correspond to clockwise rotations. The trigonometric formulas work for any real angle.
Does this include orientation of the end-effector?
For a 2R planar arm, the end-effector orientation is simply \(\theta_1 + \theta_2\). You can compute it directly if needed.