Differential Drive Kinematics Explained: Forward and Inverse
Most mobile robots, from robot vacuums to warehouse carts, steer the same way: two driven wheels on one axle, turning at different speeds. The relationship…
A differential-drive robot's odometry depends on two numbers: the wheel radius and the wheel separation. The values on the drawing are never quite the values the robot behaves with, because tyres compress, contact patches have width and wheels are never perfectly equal. Two simple tests, a tape measure and a little arithmetic fix most of the error. This guide walks through them with worked numbers.
Calibration measures the effective values. Do it on the floor the robot normally drives on, with its normal payload.
The robot travelled less than odometry thought, so its wheels are effectively smaller. Repeat the run three times and average.
The robot turned less than odometry thought, which means it behaves as if its wheels were further apart. Spinning several times multiplies a small error into something you can measure. Calibrate the radius first, because the rotation test depends on it.
Drive a long straight line and watch for drift. If the robot curves consistently to one side, the wheel on that side is effectively smaller. From the sideways drift e over a distance D, the curve's radius and the wheel diameter ratio are approximately:
A robot with 160 mm separation that drifts 10 cm sideways over 5 m is following a 125 m curve, which means its wheels differ by only about 0.13 %. Small differences matter: correct them by scaling one wheel's radius by that ratio.
For a thorough check, use the procedure from Borenstein and Feng's UMBmark benchmark: drive a square (for example 4 m × 4 m) five times clockwise and five times counter-clockwise, returning to the start, and measure where the robot actually stops each time compared with where odometry thinks it is. The two directions separate the error types: a wrong effective separation makes the robot over- or under-turn in both directions, while unequal wheel diameters make it over-turn in one direction and under-turn in the other. The pattern of end positions tells you which correction to apply, and repeating the test after correcting shows the improvement.
With ros2_control's diff_drive_controller, keep the measured values in wheel_radius and wheel_separation and apply corrections with the multiplier parameters, so the original measurements stay visible in the configuration:
diff_drive_controller:
ros__parameters:
wheel_radius: 0.033
wheel_separation: 0.160
left_wheel_radius_multiplier: 0.976 # from test 1 (and test 3, per wheel)
right_wheel_radius_multiplier: 0.976
wheel_separation_multiplier: 1.007 # from test 2
In your own odometry code, simply use the corrected values. Then enter them into the Differential Drive Calculator to check that commanded speeds and odometry updates come out as expected.
Most mobile robots, from robot vacuums to warehouse carts, steer the same way: two driven wheels on one axle, turning at different speeds. The relationship…
In ROS 2, everything that wants a robot to move, from a teleop keyboard to the Nav2 navigation stack, publishes a velocity command on a cmd_vel topic.…
Wheel odometry estimates where a robot is by counting how far each wheel has turned. It is fast, cheap and smooth, which is why every mobile robot uses it, and…
Every mobile robot needs limits on speed and acceleration: motors have a top speed, tyres have limited grip, and a tall robot tips over if it brakes too hard.…
If you have any query or problem
feel free to contact us
email: [email protected]
Comments 0