Forward Kinematics of Serial Manipulators
Learning Objectives
- Define forward kinematics as the map from joint coordinates to the end-effector pose, and say why it is single-valued for an open chain while its inverse is not.
- Write the forward kinematics of a planar revolute chain as a product of one transform per link, and derive the trigonometric closed form from it.
- Compute the pose of a planar 2R and 3R arm and check it three ways: the product of link transforms, the closed form, and the product-of-exponentials formula.
- Show with numbers that different joint vectors can put the tool tip at the same point, and that the 2R workspace is an annulus.
- Recognize the common implementation errors (degrees as radians, absolute instead of relative angles, link factors in the wrong order) and estimate how a joint error moves the tip.
Context & Motivation
homogeneous-transformations-for-robot-poses composed poses along a chain of frames. A serial manipulator is such a chain in which each link's transform depends on a single joint variable. Forward kinematics evaluates that chain: given the joint angles reported by the encoders, where is the tool, and which way does it point? It is the first map the controller needs, and the later lessons on inverse kinematics, Jacobians, and dynamics differentiate or invert it.
Planar arms keep the geometry visible while every step stays the same as in space. The link frames here are placed by hand. the-denavit-hartenberg-convention replaces that with a systematic rule that works for spatial arms.
Core Theory
The forward kinematics map
For an -joint open chain with joint vector , the forward kinematics is
the pose of the end-effector frame in the base frame . Modern Robotics points out that for an open chain this pose is uniquely determined by the joint positions, while a given pose may come from several joint vectors or from none. Each joint sets one relative motion, and the chain multiplies them in order, so the map is a product and needs no solving.
Link transforms for a planar revolute chain
Place frame at joint 1, and frame at the far end of link with its along the link. All axes point out of the plane. Joint rotates by about , then link carries the next frame a distance along the new :
Each is relative: the angle of link measured from link . Multiplying out, the rotations add and each link's vector is turned by the sum of the angles before it. With ,
For these are the equations of Asada's MIT 2.12 notes and of Chapter 4 of Modern Robotics. Modern Robotics places its link frames at the joints instead, , , and so on, with a constant . By associativity it is the same product regrouped, so the end-effector pose is identical, while the intermediate frames sit at different places.
A second formula as a cross-check
Modern Robotics also writes forward kinematics as a product of exponentials (PoE):
where is the end-effector pose with all joints at zero and is the screw axis of joint in the base frame at that zero configuration. For the planar chain, is a pure translation by along , and joint is a rotation about through the point , so . The derivation belongs to that book; here it serves as an independent formula, evaluated with scipy.linalg.expm, that must agree with the link product.
What the map does not tell you
The map is many-to-one in position. For a 2R arm the distance from the base to the tip is
which depends only on . So and reach the same radius, and turning puts both on the same point: elbow up and elbow down. The reachable tip positions form the annulus . A planar 3R arm has 3 joints for a 2-dimensional position, so it is redundant for position: a one-parameter family of joint vectors, one for each feasible tool angle, puts the tip on the same point.
The map is also an amplifier of joint errors. Turning joint by a small swings everything beyond it about that joint, so the tip moves by about , where is the distance from joint to the tip. In an extended arm the joints near the base have the longest lever arms; when the arm folds back, that can change. This is the first view of the Jacobian, which velocity-kinematics-and-the-jacobian builds properly.
Worked Examples
Link lengths are assumed values in meters; angles are in degrees in the text and converted to radians before any trigonometric call.
Example 1: a 2R arm, three ways
, . The script prints every frame of the chain:
textframe 0 (base) x = 0.0000 y = 0.0000 heading 0.0 frame 1 (elbow) x = 0.8660 y = 0.5000 heading 30.0 frame 2 (tip) x = 1.0731 y = 1.2727 heading 75.0
By the closed form, and , with heading . The link product and the closed form differ by in float64, the Modern Robotics grouping by , and the PoE formula by . The reach is , and gives the same.
Example 2: two joint vectors, one tip point
The mirrored configuration has and . Forward kinematics of :
textconfiguration elbow position tip position heading (30.00, 45.00) (0.8660, 0.5000) (1.0731, 1.2727) 75.00 (69.73, -45.00) (0.3464, 0.9381) (1.0731, 1.2727) 24.73
Same tip, different elbow, different tool heading. If the task specifies only the tip position, both are answers; if it also specifies the heading, at most one is. Choosing between such solutions is the subject of inverse-kinematics-and-workspace.
Example 3: a 3R arm
Add a short third link: , .
textframe 0 (base) x = 0.0000 y = 0.0000 heading 0.0 frame 1 x = 0.8660 y = 0.5000 heading 30.0 frame 2 (wrist) x = 1.0731 y = 1.2727 heading 75.0 frame 3 (tip) x = 1.3629 y = 1.3504 heading 15.0
The first two frames are those of Example 1, as they must be: link 3 cannot affect what comes before it. The closed form agrees to , the Modern Robotics grouping to , and PoE to .
Now the redundancy. The configurations below were produced by solving for a chosen tool heading at the same tip; forward kinematics confirms each one:
textheading asked joint angles (deg) tip from forward kinematics heading 15 ( 30.00, 45.00, -60.00) (1.3629, 1.3504) 15.00 0 ( 36.37, 34.84, -71.21) (1.3629, 1.3504) 0.00 60 ( 19.76, 50.38, -10.14) (1.3629, 1.3504) 60.00 -45 none: the wrist point is out of reach
With heading the wrist would have to be 0.3 m back along that direction, at 1.9405 m from the base, beyond , so no joint vector exists. Redundancy gives choices, not unlimited ones.
Example 4: agreement over many configurations
One example can agree by luck. Draw 1000 joint vectors for the 3R arm with numpy.random.default_rng(42).uniform(-pi, pi, (1000, 3)):
textmax |link product - closed form| (position) 6.7e-16 max |link product - PoE| (all 16 entries) 7.4e-15 max |link product - Modern Robotics grouping| 0.0
The differences are rounding, so the three formulas compute the same map.
Example 5: workspace, sensitivity, and three classic bugs
Workspace. For the 2R arm, 20,000 joint pairs from numpy.random.default_rng(0).uniform(-pi, pi, (20000, 2)) gave tip distances from to , against the annulus . Directly, , , give , , .
Sensitivity. Add to one joint and recompute:
textarm joint perturbed tip displacement distance joint-to-tip x 0.1 deg 2R joint 1 2.906 mm 1.6647 m x 0.001745 = 2.906 mm 2R joint 2 1.396 mm 0.8 m x 0.001745 = 1.396 mm 3R joint 1 3.349 mm 1.9186 m x 0.001745 = 3.349 mm 3R joint 3 0.524 mm 0.3 m x 0.001745 = 0.524 mm
In these configurations the same error cost 2.1 times as much at the base as at the last joint for the 2R arm, and 6.4 times as much for the 3R arm.
Bugs. All three run without an error message, and all three are wrong for the 2R arm of Example 1, whose correct tip is :
textbug tip heading degrees passed to cos/sin as radians (0.8917, -1.2983) theta_2 used as an absolute angle (1.4317, 1.0657) per-link order Trans_x(L) Rot_z(theta) instead (1.6928, 0.4000) 75.0
The third keeps the correct heading, because the rotations still add to , so a check of the tool orientation alone would pass it. Checking the elbow position against the closed form catches all three.
Common Misconceptions & Pitfalls
- "Forward kinematics needs solving equations." It is a product of known matrices; only the inverse problem needs solving.
- "A tip position determines the joint angles." Example 2 found two configurations for one 2R tip, and Example 3 found three for one 3R tip.
- "Joint angles are the angles of the links." They are relative angles; the link angle is the running sum . Using as absolute moved the tip by 0.41 m in Example 5.
- "The order of the two factors inside a link does not matter." and give different positions with the same heading.
- "Where the intermediate frames go changes the answer." Example 4 showed two frame placements producing the same end-effector pose to 0.0; only the product matters.
- "Every joint error matters equally." Example 5: the same moved the tip 3.35 mm at joint 1 and 0.52 mm at joint 3.
Summary
Forward kinematics maps joint coordinates to the end-effector pose, and for an open chain it is a product of one transform per link, for a planar revolute arm. Multiplying out gives , , with the relative. For a 2R arm at with lengths the tip is at ; the link product, the closed form, and the product-of-exponentials formula agreed to rounding there and on 1000 random 3R configurations. The map is many-to-one: elbow-up and elbow-down share a 2R tip, a 3R arm reaches one point with many headings, and the 2R workspace is the annulus . A joint error moves the tip by roughly its lever arm times the error, so in an extended arm the base joints matter most.