A wheel encoder can accurately report rotation while a robot's distance estimate is wrong. The missing step is the model connecting rotation to motion across the floor.
Differential-drive odometry uses that connection on two sides of a mobile base. Wheel radius sets the distance scale, wheel separation connects unequal side travel to heading change, and rolling assumptions connect the wheel motion to the ground. An encoder count contains none of those assumptions by itself.
From rotation to a distance estimate
For an ideal wheel rolling without slip, travel distance equals radius multiplied by rotation in radians. Equivalently, one complete revolution corresponds to a circumference of 2πr.
Consider a hypothetical differential-drive robot with two identical 0.100 m effective rolling radii. Assume a level plane, no slip, and both wheels completing ten forward revolutions.
Each wheel's modeled travel is 10 × 2π × 0.100 = approximately 6.28319 m. With equal side travel and no other disturbance, the ideal base moves straight by that distance.
These are invented conditions, not a robot trial. The calculation uses wheel rotation, not an unconverted motor-shaft angle. An encoder upstream of a transmission would require the correct relationship between its measured shaft and the wheel before this calculation applies.
Now configure the model with a radius of 0.102 m while the actual effective rolling radius remains 0.100 m. The same ten wheel revolutions produce an estimated 6.40885 m. The difference is approximately 0.12566 m, or 2% of the ideal ground travel.
The rotation readings can be flawless in both calculations. The disagreement comes from the length assigned to each revolution.
A scale error has a recognizable structure
In this simplified straight-line case, a common radius error multiplies the distance estimate consistently. More encoder subdivisions would make the rotation report finer without correcting the wrong circumference.
The phrase “effective rolling radius” matters because the geometry used by the model must represent the wheel under the relevant conditions. A nominal dimension and a model's usable distance-per-revolution parameter are not automatically equivalent.
This does not mean every distance discrepancy is a radius error. A constant-looking error over one short movement is insufficient evidence to identify its cause. A model can fit a particular observation while concealing a different physical explanation.
Two distances introduce turning geometry
Let the ideal separation between the left and right wheel contact paths be b. For a planar differential-drive model with no lateral slip, heading change over an interval is:
Change in heading = (right travel - left travel) / b.
The distance traveled by the midpoint between the wheels is the average of the two side distances.
For a hypothetical constant-curvature left turn, let left travel be 0.90 m, right travel be 1.10 m, and separation be 0.50 m.
The midpoint travels 1.00 m along its arc. Heading change is (1.10 - 0.90)/0.50 = 0.40 radian, approximately 22.92 degrees. The right side travels farther, consistent with a left turn under the stated convention.
The midpoint's arc radius is 1.00/0.40 = 2.50 m. Its start-to-finish straight-line displacement is approximately 0.99335 m, calculated as 2 × 2.50 × sin(0.40/2). Arc travel and endpoint displacement are different quantities even in this perfect model.
Using 0.55 m as the separation with the same side distances would instead infer approximately 0.36364 radian, or 20.83 degrees. Geometry affects the heading estimate without changing either measured wheel rotation.
What the software documentation establishes
The ROS 2 Jazzy diff_drive_controller documentation exposes wheel-radius and wheel-separation parameters, including correction multipliers. It warns that wrong geometry changes the modeled movement. It also distinguishes feedback-based odometry from open_loop operation, where commanded values supply the estimate.
That distinction matters: an odometry message is not proof that external wheel-state feedback was used. Configuration determines what information entered the computation.
WPILib's latest Differential Drive Odometry documentation, updated August 31, 2026, describes an implementation using left and right encoder distances together with gyro angle. Its Differential Drive Kinematics page separately identifies track width as the geometric link between side speeds and chassis motion.
The encoder-only heading calculation above illustrates ideal kinematics. It is not a claim that WPILib's gyro-assisted odometry computes heading from that wheel-distance difference. The documented algorithms and their inputs should retain that distinction.
Slip breaks a different relationship
Now imagine both wheels rotate by an amount corresponding to 1.00 m under the correct radius model, but independent observation establishes only 0.80 m of straight ground travel. For this hypothetical interval, wheel rotation has overrepresented translation.
Changing encoder resolution cannot reveal the missing 0.20 m from rotation alone. The issue is that rolling without slip did not describe the event.
Slip can depend on the surface, load, acceleration, contact, and motion. It is not necessarily a stable distance multiplier. Adjusting the wheel radius to absorb one slipping interval may distort later estimates when rolling conditions differ.
Lateral sliding presents another limitation: the robot can move in a direction the ideal two-wheel rolling model does not represent. A gyro adds heading information, but it does not automatically measure every translational displacement. WPILib's odometry documentation also cautions that its estimate can drift.
Keep observation and inference visible
The useful distinction is between rotation that was observed and ground motion that was inferred. Radius and separation define the inference under a rolling model; slip describes a departure from that model.
A well-described odometry result therefore retains its geometry, feedback source, and motion assumptions. Those details explain why a precise encoder can support an imperfect travel estimate, and why correcting a distance scale and accounting for changing wheel-ground behavior are separate problems.
Sources checked October 23, 2026:
ROS 2 Jazzy, diff_drive_controller documentation, October 2026 web version as accessed: https://control.ros.org/jazzy/doc/ros2_controllers/diff_drive_controller/doc/userdoc.html
WPILib latest, Differential Drive Odometry, updated August 31, 2026: https://docs.wpilib.org/en/latest/docs/software/kinematics-and-odometry/differential-drive-odometry.html
WPILib latest, Differential Drive Kinematics, updated August 15, 2026: https://docs.wpilib.org/en/latest/docs/software/kinematics-and-odometry/differential-drive-kinematics.html
Image note: The accompanying site-library mobile robot and carts scene is a concept illustration. It does not establish the pictured vehicle's drive configuration or show a measured trajectory, wheel-slip event, or test result.