Presets
Playback
Drive mode
Platform, floor and motors
Commands and path
Camera
Layers
Quality
Model check
The science
The wheel
A mecanum wheel (Ilon, 1973) carries a ring of barrel-shaped rollers whose axes sit at 45 degrees to the wheel axle. The wheel turns about its axle under motor power, and the roller touching the floor can spin freely about its own axis. A roller can only push the robot along its own axis, so each wheel gives force along one fixed diagonal. Four wheels with their rollers alternating in an X pattern give force in any direction and torque in any sense: the platform is omnidirectional.
Inverse and forward kinematics
For wheel i at body position p_i = (x_i, y_i) with roller axis direction t_i, rolling without slip means r w_i / sqrt2 = t_i . (v + omega z x p_i). With half wheelbase a and half track b this gives the familiar matrix
w_FL = (vx - vy - (a+b) omega)/r, w_FR = (vx + vy + (a+b) omega)/r, w_RL = (vx + vy - (a+b) omega)/r, w_RR = (vx - vy + (a+b) omega)/r
Four wheel speeds, three body velocities: the matrix has a one-dimensional null space, the vector (1, 1, -1, -1). Driving the front wheels forward and the rear wheels backward at once makes the wheels fight each other: large internal forces, no motion. This is the squeeze mode, and it is why real mecanum robots must not command wheels independently. The forward map uses the pseudo-inverse, vx = r (w1+w2+w3+w4)/4 and similar.
Why they are not perfect
Each wheel pushes along a diagonal, so a pure forward push wastes part of the force in forces that cancel between wheels: only cos 45 = 0.707 of the friction budget is usable for straight acceleration, a_max = 0.7071 mu g. When a wheel asks for more than mu N it slips; the model uses a stiff saturating traction law F = clamp(K (r w / sqrt2 - u), +-mu N) where u is the contact-point speed along the roller axis. Chassis dynamics are Newton and Euler in the body frame with light viscous drag.
Odometry (dead reckoning)
The robot integrates the forward kinematics of the measured wheel speeds with the nominal wheel radius. Anything the encoders cannot see makes the estimate drift: a slipping wheel counts rotation without moving, and a worn tyre of the wrong radius moves the robot differently from what the code expects. The blue path is the estimate, the yellow path the truth.
Numerical checks on this page
(1) The 4x3 matrix built from roller geometry equals the textbook form; random twists survive a round trip; the squeeze vector gives zero motion. (2) With good grip a closed square path returns to the start and odometry agrees with the simulated truth. (3) At a friction coefficient of 0.3 the measured start-up acceleration matches 0.7071 mu g. (4) In squeeze mode the wheels push with tens of newtons but the net force is zero and the robot does not move.
Honest simplifications
Normal loads are equal on all four wheels (no load transfer), the roller-axis force model ignores the weak lateral rolling resistance of real rollers, wheels have no inertia (the speed loop is a first-order lag), the floor is perfectly flat, and the platform is a rigid rectangle of uniform density. Real mecanum robots also vibrate as the rollers change contact; that is not modelled.