Back to all posts
Tutorial

Part 1: The Geometry of Motion

Ensemble AI
June 20, 2026
7 min read

Welcome to the first installment of our "Robotics Zero to Hero" series. Before a robot can interact with the world, it must answer a deceptively simple question: where am I, and which way am I facing? This is the Geometry of Motion, and getting it right is the foundation everything else is built on.

In this post we develop the mathematics of rigid-body pose in 3D, treat rotations as a Lie group rather than a bag of formulas, and set up the central theme of this entire series: why high-dimensional robots (like our continuum octopus) are so much harder than the low-dimensional rigid arms of classical robotics.

The Math: SO(3)SO(3), SE(3)SE(3), and Lie Groups

To place a rigid body in space we need two things:

  1. Translation — a vector tR3\mathbf{t} \in \mathbb{R}^3 locating the body's origin.
  2. Rotation — an element of the Special Orthogonal group SO(3)SO(3) describing orientation.

A rotation matrix RSO(3)R \in SO(3) satisfies two constraints:

RR=I,det(R)=+1R^\top R = I, \qquad \det(R) = +1

The first says columns are orthonormal; the second rules out reflections. Note what this costs: RR has 9 entries but only 3 degrees of freedom. The 6 constraints carve out a curved 3-dimensional surface (a manifold) inside R9\mathbb{R}^{9}. That curvature is the source of nearly every subtlety in this post.

A full rigid-body (homogeneous) transformation stacks rotation and translation into a 4×44\times 4 matrix in the Special Euclidean group SE(3)SE(3):

T=[Rt01]SE(3),dimSE(3)=6T = \begin{bmatrix} R & \mathbf{t} \\ \mathbf{0}^\top & 1 \end{bmatrix} \in SE(3), \qquad \dim SE(3) = 6

So the pose of one rigid body lives in a 6-dimensional space: 3 for position, 3 for orientation. Hold onto that number — it is the dividing line of this series.

The Lie algebra: angular velocity lives in so(3)\mathfrak{so}(3)

SO(3)SO(3) is not just a set; it is a smooth group (a Lie group). Its "tangent space at the identity" is the Lie algebra so(3)\mathfrak{so}(3), the space of 3×33\times 3 skew-symmetric matrices. Any angular velocity ω=(ωx,ωy,ωz)\boldsymbol{\omega} = (\omega_x, \omega_y, \omega_z) maps to a matrix via the hat operator:

[ω]×=[0ωzωyωz0ωxωyωx0],[ω]×v=ω×v[\boldsymbol{\omega}]_\times = \begin{bmatrix} 0 & -\omega_z & \omega_y \\ \omega_z & 0 & -\omega_x \\ -\omega_y & \omega_x & 0 \end{bmatrix}, \qquad [\boldsymbol{\omega}]_\times \mathbf{v} = \boldsymbol{\omega}\times\mathbf{v}

The exponential map turns an angular velocity into a rotation. For a unit axis u^\hat{\mathbf{u}} and angle θ\theta this is Rodrigues' formula:

R=exp ⁣(θ[u^]×)=I+sinθ[u^]×+(1cosθ)[u^]×2R = \exp\!\big(\theta\,[\hat{\mathbf{u}}]_\times\big) = I + \sin\theta\,[\hat{\mathbf{u}}]_\times + (1-\cos\theta)\,[\hat{\mathbf{u}}]_\times^{2}

and its inverse, the logarithm map, recovers the axis–angle from a rotation matrix. This pairing is what lets us do calculus on rotations — interpolate them, average them, and run gradient descent on them — which we will need for inverse kinematics (Part 3) and trajectory optimization (Part 7).

Representing rotations: there is no free lunch

Rotation matrices are great for composition but wasteful to store and awkward to optimize. Every alternative trades one weakness for another. The table below summarizes the competing representations and where each one breaks.

RepresentationParams (for 3 DOF)StrengthsShortcomings
Rotation matrix RR9Direct composition, no decodingOver-parameterized; drifts off SO(3)SO(3) under numerical error; needs re-orthonormalization
Euler angles (ϕ,θ,ψ)(\phi,\theta,\psi)3Intuitive, minimalGimbal lock (a DOF vanishes when axes align); discontinuous; order-dependent
Axis–angle θu^\theta\hat{\mathbf u}3Minimal; matches so(3)\mathfrak{so}(3)Singular at θ=0\theta=0; not unique (2π2\pi wrap)
Unit quaternion q\mathbf q4 (1 constraint)No gimbal lock; cheap to renormalize; clean SLERPDouble cover (q\mathbf q and q-\mathbf q are the same rotation); sign bookkeeping
so(3)\mathfrak{so}(3) exp-coords3Ideal for optimization/filtersLocal chart only; must re-anchor near θ=π\theta=\pi

The deep reason there is no singularity-free 3-parameter global chart for SO(3)SO(3) is topological: SO(3)SO(3) is a curved, compact manifold that cannot be smoothly flattened onto R3\mathbb{R}^3. Unit quaternions are the standard escape hatch — a 4-number representation that double-covers SO(3)SO(3) and avoids gimbal lock — and SLERP (spherical linear interpolation, Shoemake 1985) gives constant-rate interpolation between orientations.

Python Implementation: Rotation Matrices

Let's construct the elemental rotation matrices and compose them.

Loading Interactive Python Environment...

Notice the last two checks. On real hardware, repeatedly multiplying rotation matrices accumulates floating-point error and RR slowly drifts off SO(3)SO(3). Production code periodically re-orthonormalizes (e.g. via SVD or quaternion normalization) — a small but essential piece of numerical hygiene.

High-Dimensional vs. Low-Dimensional Robots

This is the theme we return to in every post, so let's define it precisely here.

A robot's configuration q\mathbf q is the minimal set of numbers that fully specifies its shape. The set of all configurations is the configuration space (C-space), a manifold Q\mathcal{Q} whose dimension nn is the robot's degrees of freedom.

  • A low-dimensional robot has small nn: a 6-DOF industrial arm has Q(S1)6\mathcal{Q} \approx (S^1)^6, a 6-torus. Closed-form solutions exist, every configuration can be enumerated, and intuition mostly works.
  • A high-dimensional robot has large nn: a humanoid has 30\approx 30 DOF, a dexterous hand 20\approx 20, and a true continuum robot — like an octopus tentacle that bends everywhere along its length — has, in the ideal limit, infinite degrees of freedom. Its configuration is not a vector but a continuous curve r(s)\mathbf{r}(s) in space.
AspectLow-dim (6-DOF arm)High-dim (continuum octopus)
DOF nn6\sim 6tens → \infty (a function, not a vector)
Config space(S1)6(S^1)^6 torusinfinite-dim function space
Inverse kinematicsOften closed-formRedundant, infinitely many solutions (Part 3)
DynamicsODEs, M(q)M(\mathbf q) is 6×66\times 6PDEs (Cosserat rods), continuous mass (Part 4)
PlanningGrids feasibleCurse of dimensionality; sampling required (Part 7)
Failure modeSingularities (isolated)Under-actuation, redundancy everywhere

Almost every "hard" problem in this series is really the statement: a tool that works beautifully in low dimensions degrades or collapses as nn grows. Keeping this contrast in view is the single most useful mental model for modern robotics.

Focus on the Octopus: Central Body to Tentacle Mapping

At Ensemble Control we are building a metallic continuum octopus robot: a central body (head/base) with multiple flexible tentacles. Even before a tentacle bends, we must place its base frame correctly relative to the body.

Let TworldbodyT^{body}_{world} be the transform from world to the octopus body, and Tbodytentacle_iT^{tentacle\_i}_{body} the fixed transform from the body center to the base of tentacle ii. By composition in SE(3)SE(3):

Tworldtentacle_i=Tworldbody  Tbodytentacle_iT^{tentacle\_i}_{world} = T^{body}_{world}\; T^{tentacle\_i}_{body}

If the body tilts, every tentacle's reference frame rotates with it — composition handles this automatically, which is exactly why we work in SE(3)SE(3) rather than tracking position and orientation separately.

The catch is what comes next. For a rigid arm, the chain ends after a handful of joints. For a tentacle, the "chain" never really ends — the body curves continuously, so Tworldtentacle_iT^{tentacle\_i}_{world} is only the first link of an infinite chain. Capturing that curvature is the subject of Part 2, where we build Forward Kinematics and confront continuum models head-on.

Further reading: Murray, Li & Sastry, "A Mathematical Introduction to Robotic Manipulation" (1994); Lynch & Park, "Modern Robotics" (2017) for the Lie-group treatment of SE(3)SE(3).

Interested in the research?

We collaborate with researchers, engineers, and institutions pushing Physical AI into extreme environments. Get in touch to explore working with the lab.

Collaborate with us

Ensemble Assistant

Ready

Quick Actions: