Skip to main content
Robotics & Embodied AI

⏱ About 20 min20 XP

Kinematics

Kinematics is the study of motion without regard to the forces that cause it. For a robot arm, kinematics answers two questions: given the current joint angles, where is the hand? And: given a target position for the hand, what joint angles produce it? These sound like geometry problems — and they are, but the geometry lives in high-dimensional spaces and the second question is deceptively hard. Kinematics is the mathematical foundation on which all motion planning and control for articulated robots is built.

Coordinate Frames and the Kinematic Chain

A robot arm is a kinematic chain: a series of rigid links connected by joints. Each joint has one or more degrees of freedom (DOF) — the number of independent ways it can move. A revolute joint rotates around one axis (1 DOF). A prismatic joint slides along one axis (1 DOF). A spherical joint, like a ball-and-socket, can rotate around three axes (3 DOF). To describe positions and orientations mathematically, engineers attach coordinate frames to each link. The base frame is fixed to the robot's mounting point. The end-effector frame is attached to the robot's tool — the gripper or wrist. Every link in between has its own frame, and each joint transformation describes how one frame is positioned and oriented relative to the previous one. The classic approach for assigning these frames is the Denavit-Hartenberg (DH) convention, which parameterizes each link-joint pair with four numbers: link length, link twist, joint offset, and joint angle. With DH parameters, the transformation from the base frame to the end-effector frame is computed as a product of 4x4 transformation matrices, one per joint. This is elegant: once you have the DH table for a robot, forward kinematics is matrix multiplication.

Configuration Space vs. Task Space

Joint angles live in configuration space (C-space): an n-dimensional space where n is the number of joints. The end-effector's position and orientation live in task space (or workspace): typically a 6-dimensional space (3 for position, 3 for orientation). Kinematics is the mapping between these two spaces — and that mapping is generally neither linear nor one-to-one.

Forward kinematics (FK) is the straightforward direction: given a specific joint configuration q = (q1, q2, ..., qn), compute the position and orientation of the end-effector. This is always solvable — it is a unique function from configuration space to task space. Given this joint configuration, the geometry is completely determined. For a simple planar 2-link arm with link lengths L1 and L2, and joint angles theta1 and theta2 measured from a horizontal reference, the end-effector (x, y) position is: x = L1 * cos(theta1) + L2 * cos(theta1 + theta2) y = L1 * sin(theta1) + L2 * sin(theta1 + theta2) These equations come directly from trigonometry. For a real industrial arm with 6 joints and 3D space, the computation is more involved but conceptually identical — it is chain multiplication of transformation matrices. Forward kinematics is used constantly: in simulation, in visualization interfaces (so operators can see where the arm is), and in control (to verify the arm has reached its target).

Inverse kinematics (IK) is the reverse: given a desired end-effector pose (position and orientation), find the joint configuration q that achieves it. This is the problem a controller faces constantly — the task is specified in task space (move the hand to position X), but the robot is commanded in configuration space (set joint angles to values q). IK is much harder than FK for three reasons. Multiple solutions: for most robot geometries, a target pose can be reached by multiple joint configurations — different arm postures that place the hand at the same location. A human arm can reach a point in front of you with the elbow up or elbow down. Both are valid IK solutions. Choosing between them requires additional criteria (minimize joint torque, avoid joint limits, prefer natural posture). No solution: if the target is outside the robot's reachable workspace — too far, or requiring a posture the joint limits forbid — there is no IK solution at all. The controller must handle this gracefully. Computational cost: solving IK analytically is only possible for robots with special geometry (most 6-DOF industrial arms are designed specifically to have closed-form IK solutions). General-purpose IK is solved numerically — using iterative optimization that must converge fast enough to run in real time.

Flashcards — click each card to reveal the answer

The Jacobian and Differential Kinematics

For practical real-time control, a powerful tool is the Jacobian matrix J(q). The Jacobian relates joint velocities to end-effector velocities: v = J(q) * dq/dt, where v is the 6D end-effector velocity (linear + angular) and dq/dt is the vector of joint angular velocities. This is tremendously useful. If you want the end-effector to move in a straight line, compute the required end-effector velocity, invert the Jacobian, and get the required joint velocities. This is called resolved-rate control or differential IK, and it is how many robot controllers work in practice: continuously computing J^-1 and integrating small velocity steps. Singularities are configurations where the Jacobian becomes singular — it loses rank and cannot be inverted. At a singularity, the robot loses one or more directions of motion in task space. For example, when a robot arm is fully extended, it cannot move its end-effector in the direction along the arm without bending a joint first. Singularities are dangerous at high speed and must be detected and avoided. Controllers use techniques like damped least-squares inversion (the DLS method) to handle near-singular configurations gracefully.

A 6-DOF robot arm is commanded to move its end-effector to a target position 20 cm beyond the tip of its fully extended reach. What is the correct outcome and why?

A robot arm has 6 revolute joints. How many degrees of freedom does it have, and what does this imply about its ability to specify a full end-effector pose in 3D space?

Forward Kinematics by Hand

  1. Work through forward kinematics for a 2-link planar arm. You will need a calculator or spreadsheet.
  2. The arm has:
  3. Link 1 length: L1 = 30 cm
  4. Link 2 length: L2 = 20 cm
  5. Joint 1 angle theta1 measured from horizontal
  6. Joint 2 angle theta2 measured relative to Link 1
  7. End-effector position formulas:
  8. x = L1 * cos(theta1) + L2 * cos(theta1 + theta2)
  9. y = L1 * sin(theta1) + L2 * sin(theta1 + theta2)
  10. Compute the end-effector (x, y) position for these four configurations:
  11. (a) theta1 = 0 degrees, theta2 = 0 degrees
  12. (b) theta1 = 45 degrees, theta2 = 0 degrees
  13. (c) theta1 = 0 degrees, theta2 = 90 degrees
  14. (d) theta1 = 45 degrees, theta2 = 90 degrees
  15. Draw each configuration on graph paper. Verify your numbers match your drawing.
  16. Challenge: For configuration (a), find a different (theta1, theta2) pair that places the end-effector at the same (x, y) position. If you find one, you have discovered that IK has multiple solutions. Explain why this is a problem for a controller that must choose a unique joint command.