A differential drive robot has two independently driven wheels or tracks on one axis. It cannot move sideways. It drives straight when both sides turn at the same speed, and it turns by running them at different speeds. Wheeled robot vacuums and tracked robots both use it. It is a mobile robot case of Forward and Inverse Kinematics.
Variables
- : forward speed of the robot centre, in m/s
- : turn rate, in rad/s, positive anticlockwise
- : distance between the left and right wheels or tracks
- , : speed of the left and right side
Inverse Kinematics (Command To Wheel Speeds)
- used by a motor controller that receives a velocity command, for example a ROS 2
Twistmessage withlinear.xandangular.z
Forward Kinematics (Wheel Speeds To Robot Motion)
Odometry
From the distance each side travelled since the last update:
- each side's distance comes from encoder counts: counts divided by counts per wheel turn, times the wheel circumference
- this is simple Euler integration, which is accurate enough at a high update rate and low speed
- using in the cosine and sine (the midpoint) is slightly more accurate on curves
Why Odometry Drifts
- small errors in wheel size and in add up over distance
- wheel slip on smooth floors, and especially sideways skid on tracks during turns
- heading errors grow fastest, and a heading error turns every later step into a position error
Effective Wheelbase For Tracks
- tracks skid sideways when a tracked robot turns, so it turns less than the ideal model predicts
- using a larger effective in odometry makes the model predict the smaller real turn
- calibrate it with a rotation test: spin in place a known number of turns, then choose so odometry agrees
- in practice, an IMU usually provides the heading instead, and the wheels provide only the forward speed
Constraint
- the robot cannot move sideways, so its velocity in its own direction is zero (a non-holonomic constraint)
- planners for such robots must produce paths it can follow, which is why some controllers rotate in place first when the heading error is large