Mecanum drive in AMRs: synchronizing 4 wheels and common mechanical faults
Atlasbot · 22/8/2026 · 11 min read
Article kinematics Mecanum in the Robotics Fundamentals section has fully solved the inverse/forward kinematics 4 wheel matrix. This lesson doesn't repeat that math — it focuses on the actual assembly question: 4 independent motors means 4 independent sources of error, and what does that entail compared to the 2-wheel Differential Drive learned in the previous lesson.
Key concepts
An AMR Mecanum requires twice as much drive hardware as a Differential Drive:
- 4 motor + driver sets instead of 2 — costs and installation space increase significantly
- 4 encoders — each wheel needs to respond independently to its own PID loop
- No need for a caster — 4 contact points are stable enough, unlike Differential Drive which needs an additional caster for balance
How it works
Mixing 4 wheels extends directly from the principle of mixing 2 wheels learned in the lesson Differential Drive, only the input dimensions are different (vx, vy, ω instead of just v, ω):
v1 = vx − vy − ω·(lx+ly)/2 # front-left wheel
v2 = vx + vy + ω·(lx+ly)/2 # front-right wheel
v3 = vx + vy − ω·(lx+ly)/2 # rear-left wheel
v4 = vx − vy + ω·(lx+ly)/2 # rear-right wheel
(full formula and derivation are presented in the kinematics Mecanum article — this is the form used directly in the firmware)
The core difference compared to Differential Drive: each of these 4 wheels needs a separate PID ring, and all 4 PID rings must be synchronized at the same frequency, with the same update cycle. In Differential Drive, slight deviation between the two wheels only causes the robot to bend slightly; In Mecanum, misalignment between the 4 wheels (especially when moving purely sideways) causes much more pronounced angular slippage and misalignment — because the sideways movement depends entirely on the 4 wheels creating the correct combined force according to the correct calculated ratio.
Technical details
Formulas
Synchronization errors between drivers (differences in PWM update times) accumulate into actual direction of travel errors — much more serious than Differential Drive because Mecanum has 4 independent error sources instead of 2:
If one of the four wheels is Δt behind the remaining three wheels when changing setpoint,
During that interval Δt the resultant force is deflected from the desired direction
For example: simple move sideways command (vy), if wheel v1 is 20ms late compared to v2, v3, v4
→ during that 20ms, the robot experiences an unwanted rotation force component (unintended ω ≠ 0)
→ Accumulated over many cycles causes the robot moving sideways to gradually deviate, not going straight along the vy axis
Parameters
| Factor | Differential Drive (2 wheels) | Mecanum Drive (4 wheels) |
|---|---|---|
| Number of independent PID loops | 2 | 4 |
| Sensitivity to synchronization deviation | Low (only causes slight bending) | High (causes noticeable corner slippage) |
| Sensitivity to mechanical wear/dust jamming | Low | High (rollers tilted at 45° can easily trap dust/wear unevenly) |
| Assembly precision required | Medium | High (4 wheels must have the same effective diameter) |
Practical applications
In the actual assembly of Mecanum robots (like the Robot Mecanum and Atlas A2 projects in this page's showcase), an often underestimated source of error is the uneven effective diameter between the 4 wheels — if only one wheel is 1-2mm more worn in diameter than the other 3 wheels, the same PWM value will create different linear speeds between the wheels, causing systematic deviations even though the entire code mixing/PID is absolutely correct. This is the reason why Mecanum robots seriously need to periodically calibrate the actual wheel diameter, not just based on the manufacturer's nominal parameters.
Practical example
lx, ly = 0.15, 0.12 # nua khoang cach truc x, y (m)
def mecanum_mixing(vx, vy, omega):
k = lx + ly
v1 = vx - vy - omega * k / 2 # truoc-trai
v2 = vx + vy + omega * k / 2 # truoc-phai
v3 = vx + vy - omega * k / 2 # sau-trai
v4 = vx - vy + omega * k / 2 # sau-phai
return v1, v2, v3, v4
# Command: move purely sideways to the right, without forward motion or rotation
v1, v2, v3, v4 = mecanum_mixing(vx=0, vy=0.3, omega=0)
print(f"v1={v1:.2f} v2={v2:.2f} v3={v3:.2f} v4={v4:.2f}")
Output:
v1=-0.30 v2=0.30 v3=0.30 v4=-0.30
As predicted in the Principle section: the front-left and rear-right wheels rotate one way, the front-right and rear-left wheels rotate in the opposite direction — all 4 drivers need to receive the corresponding PWM commands almost simultaneously so that the combined force actually points straight along the vy axis, without deviation.
Common mistakes
- Unsynchronized update cycle between 4 PID loops — as calculated in the Formula section, causes the resultant force to deviate in direction, especially evident when moving purely sideways.
- Ignore the difference in effective diameter between wheels due to uneven wear — causing systematic deviation even though the code is completely correct, requiring periodic adjustment instead of just information on nominal parameters.
- Installing the wrong roller tilt direction between wheels — 4 Mecanum wheels have 2 symmetrical tilt styles (left/right), installed in the wrong position causing the robot to react completely wrong to the mixing command even though the calculation formula is correct.
- Not cleaning the rollers periodically (easy to get stuck in dust/foreign objects) — small rollers tilted at 45° are much more likely to get stuck in dust/fibers than regular smooth wheels, partially jamming the rollers causing uneven friction and localized slipping.
Conclusion
Mixing 4 wheel Mecanum is a direct extension of mixing 2 wheel Differential Drive, but the price is not just in the more complex formula — it lies in the fact that 4 independent sources of error (PID synchronization, uneven wear, roller jam) add up to a much more pronounced directional error than with 2 wheels. The next article in the category goes into Motor Control — specific PID control loops that apply to both types of drive systems just learned.
Get new articles and lessons by email
When a new technical article or course module is published, Atlas Robotics sends you a short email. No spam.
Unsubscribe any time with the link in each email. See our Privacy policy.