Atlas Robotics
Robot KinematicsIntermediate

Forward kinematics: from joint angles and wheel speeds to position

Atlasbot · 17/8/2026 · 10 min read

Forward kinematics: from joint angles and wheel speeds to position
Forward Kinematics: from joint space to Cartesian space

Differential Drive and Odometry solved a specific forward kinematics problem: knowing the speed of two wheels, calculating the longitudinal/angular velocity of the robot. Forward Kinematics (forward kinematics) is the general name for this type of problem, applicable to all types of jointed/wheeled robots — not only mobile robots, but also industrial manipulators.

Key concepts

Forward Kinematics: joint space → physical position (Cartesian space)
  • Mobile robot (wheeled): "joint" is the rotation speed of each wheel, "actual position" is the longitudinal/angular velocity of the whole robot
  • Manipulator: "joint" is the rotation angle of each joint (joint angle), "actual position" is the coordinates (x, y, z) of the end-effector

Both are the same type of abstract problem: knowing the configuration of each individual moving part, deducing the overall position/orientation of the entire system.

How it works

The most classic example outside of mobile robots: 2-link planar arm, 2-link planar arm:

θ1 — original joint angle (relative to x axis)
θ2 — angle of the second joint (compared to the first arm segment)
L1, L2 — length of two arm segments

The position of the manipulator head (x, y) is calculated directly by trigonometry - combining two rotations (rotation) and translation in each segment:

x = L1 cos(θ1) + L2 cos(θ1 + θ2)
y = L1 sin(θ1) + L2 sin(θ1 + θ2)

Summary: Forward kinematics always go one way, easy to calculate: know joint angle/wheel speed, calculate position directly using direct trigonometric formula. The other way around — that's problem Inverse Kinematics (next problem).

With the same set of input wheel speed/joint angle values, the output position always calculates only one result — nothing ambiguous, just substituting numbers into an existing formula.

Technical details

Formulas

The 2-link formula above is actually a special case of a more general rule: each joint contributes exactly 1 homogeneous transform (learned in the Transform lesson), and the forward kinematics of the entire chain of joints is multiplying those transforms — exactly the same way tf2 multiplies the series map→odom→base_link→...:

T_end_effector = T1(θ1) × T2(θ2) × ... × Tn(θn)

With an N-joint manipulator, the final position is always calculated by multiplying
exactly N consecutive homogeneous matrices — it doesn't matter if N is 2 or 20

Parameters

The number of degrees of freedom (DOF - number of independent joints) varies greatly depending on the type of manipulator:

Manipulator typeTypical number of DOFs
Flat manipulator illustrated in the article2 DOF
Standard industrial manipulator (6 axes)6 DOF — enough to set any position (x, y, z) and direction (roll, pitch, yaw)
Redundant manipulator (eg: 7 axes)7 DOF or more — 1 degree of freedom more than needed, increasing flexibility to avoid obstacles

Practical applications

Forward kinematics is not just abstract theory — this is exactly the mechanism that robot_state_publisher in ROS2 uses to automatically calculate and publish the entire TF tree of the robot: the URDF file declares each joint (position, rotation axis, angle limit), this node reads the current joint angle (from /joint_states) and automatically calculates forward kinematics to output the transform of each link, publish continuously to /tf. No need to manually write trigonometric formulas like the 2-link example above — with a real robot with a full URDF declaration, the forward kinematics of the entire matching string are calculated automatically.

Practical example

import math

L1, L2 = 0.3, 0.25  # length of 2 arm segments (m)
theta1 = math.radians(45)
theta2 = math.radians(30)

x = L1 * math.cos(theta1) + L2 * math.cos(theta1 + theta2)
y = L1 * math.sin(theta1) + L2 * math.sin(theta1 + theta2)

print(f"Vi tri dau tay may: x={x:.3f}, y={y:.3f}")
Output:
Vi tri dau tay may: x=0.279, y=0.443

With only 2 joint angles and 2 arm lengths, forward kinematics immediately produces exactly 1 position result — exactly like the "single solution" feature stated in the Principle of Operation section, without trial-error or solving equations.

Common mistakes

  • Use θ2 instead of θ1+θ2 for the absolute angle of the 2nd arm segment — the angle θ2 in the formula is the angle relative compared to the first arm segment, not the absolute angle relative to the x axis — forgetting to add θ1 causes the wrong position absolutely.
  • Change the order of multiplying transforms in the matching chain — similar to the non-commutative property of the learned matrix, multiplying T1×T2 into T2×T1 in the wrong order gives a completely different geometric position.
  • Mixing length units between arm segments — L1 in meters, L2 in millimeters in the same formula gives results thousands of times different, errors can easily occur when combining parameters from many different sources.
  • Wrong angle and radian when reading from /joint_states — joint angle data in ROS2 is always in radians, displaying/inputting data in degrees but forgetting to change the unit causes incorrect calculation results.

Conclusion

Forward kinematics is an "easy one-way" problem in robotic kinematics - knowing the joint configuration, calculating the position directly using trigonometric formulas or transform chains, always gives a single correct result. This is the automatic mechanism behind robot_state_publisher of ROS2. The next article in the column is about Inverse Kinematics — the opposite problem is much more difficult: knowing the desired target position, what joint angle to find to achieve it.

Get new articles and lessons by email

When a new technical article or course module is published, Atlas Robotics sends you a short email. No spam.

Unsubscribe any time with the link in each email. See our Privacy policy.

Forward kinematics: from joint angles and wheel speeds to position — Atlas Robotics