← Roadmap

From Wheels to Motion 3-Wheel Omnidirectional Robot

A linear-algebra story for second-year robotics engineers. Every spin of a wheel becomes a vector. The robot's motion is just a sum.

The Analogy — Three Coworkers Pushing a Cart

Imagine a circular cart with three coworkers standing 120° apart around it. Each one can only push tangent to the cart, not toward or away from it. Whatever happens to the cart — drifting forward, sliding sideways, spinning in place — is the sum of three pushes.

That is the entire omni-wheel robot in one sentence. Each wheel is a coworker. Its spin rate $\omega_i$ is how hard it pushes. The cart's motion $(v_x, v_y, \omega)$ is the team's net effect. The matrix we are about to build is the manager's spreadsheet: it tells you, for any combination of pushes, exactly where the cart ends up going.

Big idea. Solving the robot's motion is not solving an ODE yet — it is first translating actuator inputs into state-space velocities. That translation is a linear map. ODEs come next: integrating those velocities over time to predict pose. This matrix is the language of control right before you press "run."

Geometric Derivation

Step 1 — Place the wheels

Put the robot's center at the origin. Three omni-wheels sit at distance $L$ from the center, at angles $\alpha_1 = 270^\circ$, $\alpha_2 = 30^\circ$, $\alpha_3 = 150^\circ$ — exactly $120^\circ$ apart. Each wheel's axle points radially outward. Spinning a wheel can only push the robot in the direction tangent to the circle through that wheel.

The unit tangent vector at angle $\alpha_i$ (counter-clockwise) is $$\hat{t}_i \;=\; \begin{bmatrix} -\sin\alpha_i \\ \phantom{-}\cos\alpha_i \end{bmatrix}.$$ Concretely: $\hat{t}_1 = (1,0)$, $\hat{t}_2 = (-\tfrac{1}{2}, \tfrac{\sqrt{3}}{2})$, $\hat{t}_3 = (-\tfrac{1}{2}, -\tfrac{\sqrt{3}}{2})$. These three vectors are 120° apart and span $\mathbb{R}^2$.

Step 2 — Rolling constraint at each wheel

For an omni-wheel, the rolling speed of the contact point along the wheel's tangent direction equals $r\,\omega_i$. The contact-point velocity is the body velocity plus the rotational contribution: $$\vec{v}_{\text{contact},i} \;=\; \vec{v} + \omega \times \vec{r}_i.$$ Projecting onto $\hat{t}_i$ with $\vec{r}_i = L(\cos\alpha_i, \sin\alpha_i)$: $$r\,\omega_i \;=\; -\sin\alpha_i \cdot v_x \,+\, \cos\alpha_i \cdot v_y \,+\, L\cdot \omega.$$

Step 3 — Stack the three constraints (Inverse Kinematics)

This gives the inverse kinematics — body velocity in, wheel speeds out: $$\begin{bmatrix} \omega_1 \\ \omega_2 \\ \omega_3 \end{bmatrix} =\frac{1}{r} \underbrace{\begin{bmatrix} \phantom{-}1 & 0 & L \\ -\tfrac{1}{2} & \phantom{-}\tfrac{\sqrt{3}}{2} & L \\ -\tfrac{1}{2} & -\tfrac{\sqrt{3}}{2} & L \end{bmatrix}}_{J} \begin{bmatrix} v_x \\ v_y \\ \omega \end{bmatrix}.$$

Step 4 — Invert to get Forward Kinematics

Invert $J$ (and absorb $r$) to get the forward kinematics matrix $M$: $$\boxed{\;\begin{bmatrix} v_x \\ v_y \\ \omega \end{bmatrix} = \underbrace{r\begin{bmatrix} \phantom{-}\tfrac{2}{3} & -\tfrac{1}{3} & -\tfrac{1}{3} \\ 0 & \phantom{-}\tfrac{1}{\sqrt{3}} & -\tfrac{1}{\sqrt{3}} \\ \phantom{-}\tfrac{1}{3L} & \phantom{-}\tfrac{1}{3L} & \phantom{-}\tfrac{1}{3L} \end{bmatrix}}_{M} \begin{bmatrix} \omega_1 \\ \omega_2 \\ \omega_3 \end{bmatrix}.\;}$$

Step 5 — Read the columns physically

Each column of $M$ is "what happens to the robot if only that wheel spins." Spin wheel 1 alone $\Rightarrow$ pure $+v_x$ with a positive spin. Spin wheel 2 alone $\Rightarrow$ push toward upper-left with a positive spin. Spin wheel 3 alone $\Rightarrow$ push toward lower-left with a positive spin. Any motion you want is a linear combination of these three column vectors. That is the column space made visible.

Visualization — Robot, Wheel Speeds & Motion Vector

Top-down view of the 3-wheel robot. The faint grey dashed arrows are the body-frame reference axes ($V_x$, $V_y$). Each wheel shows a coloured arrow whose length and direction track its own $\omega_i$. The bright cyan arrow is the resulting body motion $V_b = M\,\omega$, and the purple curved arrow around the body indicates $\dot\psi$ (rotation rate).

V_x V_y ψ̇ ω₁ = +3.00 ω₂ = +0.00 ω₃ = +0.00 V_b
ω₁+3.00
ω₂+0.00
ω₃+0.00
Vbx =0.100m/s
Vby =0.000m/s
ψ̇ =+0.333rad/s
|Vb| =0.100m/s
wheel 1 speed arrow wheel 2 speed arrow wheel 3 speed arrow resultant Vb ψ̇ rotation
Move the three sliders to set wheel speeds. Each coloured arrow on the wheel grows along its rolling direction (or flips if $\omega_i$ goes negative). The cyan resultant arrow and the purple rotation arc are computed live from $V_b = M\,\omega$ — exactly the matrix from Step 4.

What Motions Are Reachable? — The Velocity Polytope

Real wheels saturate: $|\omega_i| \le \omega_\text{max}$. So the wheel-speed input lives in a cube $[-\omega_\text{max}, \omega_\text{max}]^3 \subset \mathbb{R}^3$. The matrix $M$ maps this cube into body-velocity space — also $\mathbb{R}^3$, with axes $(v_x, v_y, \omega)$. The image is a convex polytope, and that polytope is exactly the set of robot motions you can physically command.

This is what your Omni_analyzer.ipynb visualizes: 100,000 random wheel-speed triples are pushed through $M$, and the convex hull of the resulting body velocities is plotted. The reddish slab at $\omega \approx 0$ is the set of pure translations — a hexagon, because $M$ maps the corners of the input cube to a hexagonal cross-section. Spin trades off against translation: faster rotation $\Rightarrow$ a smaller usable translation set.

Design takeaway. A 3-omni is holonomic (it can move in any 2-D direction instantly), but the polytope is anisotropic — moving along a wheel's tangent direction is "cheaper" than moving perpendicular to it. Engineering tip: align your most demanding axis with one of the wheel tangents.

The Bridge to Differential Equations

Once $(v_x, v_y, \omega)$ are known in the body frame, the robot's pose $(X, Y, \theta)$ in the world frame evolves by a first-order ODE: $$\begin{bmatrix} \dot X \\ \dot Y \\ \dot \theta \end{bmatrix} = \underbrace{\begin{bmatrix} \cos\theta & -\sin\theta & 0 \\ \sin\theta & \cos\theta & 0 \\ 0 & 0 & 1 \end{bmatrix}}_{R(\theta)} \underbrace{\begin{bmatrix} v_x \\ v_y \\ \omega \end{bmatrix}}_{M\,\boldsymbol{\omega}_\text{wheels}}.$$ Substitute and you get the full kinematic ODE in terms of wheel speeds: $$\dot{\boldsymbol{q}}(t) \;=\; R(\theta(t))\, M\, \boldsymbol{\omega}_\text{wheels}(t).$$ Integrating this ODE forward in time gives the robot's trajectory in the world frame.

Why care? Control design starts here. A PD or PID controller produces a desired $(v_x^*, v_y^*, \omega^*)$ each timestep; the inverse map $M^{-1}$ tells the motors what to do. Without this matrix, the controller has no actuators to talk to.