Robotics Course documentation

Understanding Robot Kinematics

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Understanding Robot Kinematics

In this section, we’ll build intuition for robot kinematics through a concrete, worked example. Kinematics describes the mathematical relationship between joint angles and end-effector positions - given the joint configuration, where does the robot’s hand end up? We’ll explore this fundamental concept by walking through a simplified but representative case.

Let’s examine how traditional robotics approaches robot control using a specific example you can follow step by step.

From Complex to Simple: The SO-100 Example

We’ll start with a familiar robot platform and systematically simplify it to isolate the core kinematic principles without unnecessary complexity.

SO-100 to Planar Manipulator

The SO-100 arm simplified to a 2D planar manipulator by constraining some joints.

The SO-100 is a 6-degree-of-freedom (6-DOF) robot arm. To understand the principles, let’s simplify it to a 2-DOF planar manipulator by constraining some joints.

The Simplified Robot

To keep the math clear, our simplified robot has:

  • Two joints with angles θ₁ and θ₂
  • Two links of equal length l
  • Configuration q = [θ₁, θ₂] ∈ [-π, +π]²

Forward Kinematics: From Joints to Position

Question: Given joint angles θ₁ and θ₂, where is the end-effector?

Answer: We can calculate the end-effector position mathematically: p(q)=(lcos(θ1)+lcos(θ1+θ2)lsin(θ1)+lsin(θ1+θ2))p(q) = \begin{pmatrix} l \cos(\theta_1) + l \cos(\theta_1 + \theta_2) \\ l \sin(\theta_1) + l \sin(\theta_1 + \theta_2) \end{pmatrix}

This is called Forward Kinematics (FK) - mapping from joint space to task space.

Understanding the Math: This equation comes from basic trigonometry!

  • First link: endpoint at (lcos(θ1),lsin(θ1))(l \cos(\theta_1), l \sin(\theta_1))
  • Second link: starts from first link’s end, rotated by θ1+θ2\theta_1 + \theta_2
  • Final position: sum of both link contributions

Why it matters: For a simple robot, FK is relatively easy - given joint angles, we can always compute where the robot’s hand is. More complex robots - for instance, dexterous hands, are more challenging to model.

Inverse Kinematics: From Position to Joints

Now let’s try to invert the mapping: given a desired hand position, what joint configuration achieves it?

Question: Given a desired end-effector position p*, what joint angles should we use?

Answer: This is Inverse Kinematics (IK) - typically more intricate to solve, as it deals with the Jacobian matrix of the forward kinematics function!

We need to solve: p(q)=pp(q) = p^*

In general, this becomes an optimization problem:minqQp(q)p22\min_{q \in \mathcal{Q}} \|p(q) - p^*\|_2^2

Why IK is Hard:

  • Multiple solutions - Same end position can be reached with different joint angles

  • Nonlinear equations - Some functions make analytical solutions difficult

  • Constraints - Joint limits and obstacles further complicate the problem

This is why robotics engineers spend so much time on IK algorithms!

The Challenge of Constraints

Free Motion

Free to move

Floor Constraint

Constrained by floor

Multiple Constraints

Multiple obstacles

Real robots face constraints:

  • Physical limits - Can’t move through the floor
  • Obstacles - Must avoid collisions
  • Joint limits - Finite range of motion

These constraints make the feasible configuration space Q\mathcal{Q} much more complex!

Key Insight

Even for this simple 2-DOF robot, solving IK with constraints is non-trivial. Real robots have:

  • 6+ degrees of freedom
  • Complex geometries
  • Dynamic environments
  • Uncertain models

Traditional approaches require extensive mathematical modeling and expert knowledge for each specific case.

Mental model: FK is a direct calculator (q → p) and is usually easy; IK is a search (p → q) and becomes hard as soon as you add workspace limits, obstacles, or joint constraints. When IK gets brittle, we’ll switch to differential reasoning (velocities) in the next step.

References

For a full list of references, check out the tutorial.

  • Modern Robotics: Mechanics, Planning, and Control (2017)
    Kevin M. Lynch and Frank C. Park
    Chapter 4 provides an in-depth treatment of forward kinematics with extensive examples, while Chapter 6 covers inverse kinematics with both analytical and numerical approaches.
    Book Website

  • Introduction to Robotics: Mechanics and Control (2005)
    John J. Craig
    A classic textbook with detailed coverage of robot kinematics, including the Denavit-Hartenberg notation and systematic approaches to solving forward and inverse kinematics problems.
    Publisher Link

Update on GitHub