Core Engineering Takeaways
- •Kinematics describes the relationship between robot joint positions, velocities, and end-effector spatial positions without considering masses or forces.
- •Forward Kinematics (FK) is deterministic and computationally simple: given joint angles (θ1, θ2, ...), it calculates the unique end-effector pose (x, y, z, roll, pitch, yaw).
- •Inverse Kinematics (IK) is complex and non-linear: given a target spatial pose, it calculates the required joint angles. A robot may have multiple valid solutions, zero solutions (out of reach), or infinite solutions (redundant robots).
- •Homogeneous transformation matrices combine 3D rotation and 3D translation into a single 4x4 matrix, allowing multi-link kinematics through simple matrix multiplication.
- •The Jacobian matrix maps joint angular velocities to end-effector Cartesian velocities (v = J(q) · q_dot).
- •Singularities occur when the Jacobian matrix loses rank (det(J) = 0). At a singularity, the robot loses the ability to move in one Cartesian direction and requires infinite joint velocity to escape.
- •For differential drive mobile robots, wheel angular velocities translate to linear speed v and angular turn rate ω via wheel radius r and track width L.
- Linear algebra (vectors, matrices, matrix multiplication, determinants)
- Trigonometry (sine, cosine, tangent, arctan2, law of cosines)
1. What is Kinematics? Geometry Without Forces
Robotics mechanics is divided into two disciplines:
- 1Kinematics: The study of motion purely in terms of geometry, displacement, velocity, and acceleration, completely ignoring the masses, inertias, and forces that cause that motion.
- 2Dynamics: The study of the forces, torques, and motor currents required to physically create those kinematic accelerations (using Newton-Euler or Lagrangian mechanics).
Before you can calculate how much motor torque is required to lift a payload, you must first know where the robot's links are physically located in 3D space. That geometric mapping is Kinematics.
2. Degrees of Freedom (DOF) & Coordinate Frames
What is a Degree of Freedom (DOF)?
The number of Degrees of Freedom is the minimum number of independent coordinates required to completely specify the configuration or pose of a mechanical system.
- A rigid object floating in free 3D space has 6 DOF:
- 3 Position coordinates: Translation along , , and .
- 3 Orientation coordinates: Rotation around (Roll), (Pitch), and (Yaw).
Joints as Constraints
Robotic joints connect rigid links while restricting specific relative motions:
- Revolute Joint (R): 1 DOF rotational motion around a single axis (most common in arm joints).
- Prismatic Joint (P): 1 DOF linear sliding motion along an axis (e.g., linear gantry, telescope slide).
- Spherical Joint (S): 3 DOF rotational motion (ball-and-socket, like human shoulders).
Grubler's Criterion for Mobility
For a spatial mechanism with total rigid bodies (including the fixed base) and joints, where joint provides degrees of freedom:
A standard 6-axis industrial robot arm (e.g., KUKA, FANUC, Universal Robots UR5) has 6 revolute joints: .
Having 6 DOF enables the end-effector to reach any arbitrary position within its reach envelope at any arbitrary orientation.
3. Homogeneous Transformations: SE(3) Matrix Math
To track an end-effector through space, robotics relies on attaching coordinate frames to each link. A point defined in Frame B is transformed into Frame A using a Homogeneous Transformation Matrix :
- is an orthonormal rotation matrix describing the orientation of Frame B relative to Frame A.
- is the translation vector representing the origin of Frame B relative to Frame A.
Chaining Transformations
The beauty of homogeneous transformations is that serial kinematic chains are solved through simple matrix multiplication:
4. Forward Kinematics (FK) & Denavit-Hartenberg (DH) Convention
Forward Kinematics Definition
Input: Joint coordinates Output: End-effector position and orientation in the global base frame.
Forward kinematics always has exactly one unique solution. If your joint angles are known, the physical arm can only exist in one single location.
The 2-DOF Planar Arm Analytical Derivation
Consider a simple 2-link planar arm with link lengths and rotating on a horizontal plane:
- Joint 1 rotates by angle relative to the -axis.
- Joint 2 rotates by angle relative to Link 1.
Using basic trigonometry:
The Denavit-Hartenberg (DH) Standard
For 3D serial manipulators with twisted axes, Jacques Denavit and Richard Hartenberg introduced the standard 4-parameter convention to represent any joint transformation:
- 1(Link Length): Distance between and measured along .
- 2(Link Twist): Angle between and measured about .
- 3(Link Offset): Distance from origin to the intersection of with along . (Variable for prismatic joints).
- 4(Joint Angle): Angle between and measured about . (Variable for revolute joints).
5. Inverse Kinematics (IK): Analytic vs Numerical Solutions
Inverse Kinematics Definition
Input: Desired end-effector Cartesian target pose Output: Required joint angles .
Inverse Kinematics is significantly harder than Forward Kinematics because:
- Non-linear equations: Involves coupled trigonometric systems.
- Multiple solutions: A human arm can touch a table with elbow up or elbow down.
- Out-of-workspace singularities: If the target is beyond , no solution exists.
Analytic (Closed-Form) IK for a 2-DOF Arm
For our 2-link planar arm, we can solve for and using the Law of Cosines:
- The yields the Elbow-Down configuration.
- The yields the Elbow-Up configuration.
Once is selected:
Analytic Inverse Kinematics (Law of Cosines for 2-Link Arm)
Target (x=0.3, y=0.4), L1=0.3m, L2=0.3m: x^2+y^2 = 0.25. D = (0.25 - 0.09 - 0.09) / (2*0.09) = 0.07 / 0.18 = 0.3889. θ2 = acos(0.3889) ≈ 1.17 rad (67.1°).
6. Differential Kinematics: The Jacobian Matrix & Singularities
Mapping Velocities with the Geometric Jacobian
While basic kinematics relates positions, control algorithms need to relate velocities. The Jacobian matrix is a multidimensional derivative matrix that maps joint angular velocities to the Cartesian linear velocity and angular velocity of the end-effector:
For our 2-DOF planar arm:
Kinematic Singularities: The Arm's Danger Zones
A singularity occurs at joint configurations where the Jacobian matrix loses rank (i.e., its determinant becomes zero: ).
For our 2-DOF arm:
- Boundary Singularity (): The arm is stretched completely straight. It is physically impossible to create instantaneous velocity pointing outward along the arm, no matter how fast the motors spin.
- Folded Singularity (): The arm is folded flat back onto itself.
If a Cartesian trajectory planner tries to drive an arm through a singularity using standard inverse kinematics , approaches infinity, commanding impossible motor speeds and triggering emergency safety stops.
7. Mobile Robot Kinematics: Differential Drive Wheel Equations
Unlike robotic arms attached to concrete pedestals, mobile wheeled robots navigate across a 2D floor. The most ubiquitous chassis in service robotics (vacuum robots, warehouse AGVs, TurtleBot) is the Differential Drive system.
The Differential Drive Kinematic Model
The robot consists of two driven wheels of radius separated by track width , plus one or two passive caster wheels for balance.
- : Tangential linear velocity of right wheel
- : Tangential linear velocity of left wheel
The robot's forward linear velocity and angular yaw rate around its center of rotation are:
Dead Reckoning Odometry Update
In your robot's high-rate odometry thread running at sample period :
import math
class DifferentialDriveKinematics:
def __init__(self, wheel_radius_m: float, track_width_m: float):
self.r = wheel_radius_m
self.L = track_width_m
self.x = 0.0
self.y = 0.0
self.theta = 0.0 # Radians
def forward_kinematics(self, w_left_rad_s: float, w_right_rad_s: float) -> tuple[float, float]:
"""Compute robot linear velocity v (m/s) and angular velocity w (rad/s)."""
v_l = self.r * w_left_rad_s
v_r = self.r * w_right_rad_s
v = (v_r + v_l) / 2.0
w = (v_r - v_l) / self.L
return v, w
def inverse_kinematics(self, target_v: float, target_w: float) -> tuple[float, float]:
"""Convert target v and w into required wheel angular velocities (rad/s)."""
w_left = (target_v - (target_w * self.L / 2.0)) / self.r
w_right = (target_v + (target_w * self.L / 2.0)) / self.r
return w_left, w_right
def update_odometry(self, w_l: float, w_r: float, dt: float):
"""Integrate wheel encoder velocities to estimate position pose (x, y, theta)."""
v, w = self.forward_kinematics(w_l, w_r)
delta_s = v * dt
delta_theta = w * dt
# Runge-Kutta 2nd order integration
self.x += delta_s * math.cos(self.theta + delta_theta / 2.0)
self.y += delta_s * math.sin(self.theta + delta_theta / 2.0)
self.theta = (self.theta + delta_theta + math.pi) % (2 * math.pi) - math.piCommon Questions & Troubleshooting
Q:What is the difference between holonomic and non-holonomic robots?
A holonomic robot (such as an omnidirectional chassis with Mecanum wheels) has controllable degrees of freedom equal to its total spatial degrees of freedom—it can drive sideways instantaneously without rotating. A non-holonomic robot (like a car or differential drive vacuum) cannot translate instantaneously in the lateral direction without first turning its heading.
Q:Why do industrial robots have 6 degrees of freedom instead of 7 or 8?
6 DOF is the exact mathematical minimum required to position an end-effector at any 3D Cartesian point (X, Y, Z) and point it in any orientation (Roll, Pitch, Yaw). Adding a 7th joint creates kinematic redundancy, which allows obstacle avoidance and joint limit mitigation, but significantly complicates inverse kinematics.
Q:How do trajectory generators avoid singularities?
Modern trajectory planners utilize Damped Least Squares (Levenberg-Marquardt) inversion instead of pure pseudo-inversion. As the manipulator approaches a singularity (det(J) -> 0), the algorithm introduces a damping factor λ that sacrifices slight Cartesian path accuracy to keep joint speeds within physical motor capabilities.
