Two & Three-Wheel Odometry
Type in what your tracking wheels read on each step and watch the position update work it out, with the maths shown and the common shortcut drawn beside it.
Inputs
Robot
With the inertial sensor layout, this is your one parallel wheel. Enter a negative distance if it sits left of center.
Negative if it sits in front.
Clockwise from straight ahead, the way the inertial sensor counts.
Wheel readings, one row per step
Distance each wheel rolled during the step, in inches: forward is positive for the parallel wheels, rightward for the sideways wheel. The IMU column is the heading at the end of the step, used only by the inertial layout. Use Tracking Wheel Setup to turn sensor counts into inches.
Results
Final position (across, forward)
—in
Final heading
—°
Straight-line distance from start
—in
Where the straight-line shortcut puts it
—in
Shortcut's error
—in
Steps used
—
The path
Solid line: the arc update. Dashed line: the straight-line shortcut. Grid squares are one foam tile, 24 inches. Forward is up the page.
Show the position after every step
The position and heading after every step.
How this is calculated
Each update takes the wheel readings for one short step and assumes the robot moved along a circular arc, which is exactly true if the wheels kept steady speeds through the step.
1. How far did it turn?
turn = (left − right) ÷ (left offset + right offset) (radians)With the inertial layout, the turn is just the new heading minus the old one, and the left wheel isn't needed.
2. How far did it move, in its own frame?
chord = 2 × sin(turn ÷ 2) forward = chord × (right ÷ turn + right offset) sideways = chord × (sideways ÷ turn + back offset)The offset terms remove the rolling each wheel does just because the robot turned. With no turn at all, forward is the right wheel's reading and sideways is the sideways wheel's.
3. Turn that onto the field
average heading = old heading + turn ÷ 2 across += sideways × cos(avg) + forward × sin(avg) forward += −sideways × sin(avg) + forward × cos(avg)With your numbers
Why not just add up straight lines?
The shortcut moves the robot along its old heading, then turns it. For tiny steps that is nearly the same. For a step that includes a big turn it cuts the corner, and the error grows with the square of the turn. Code running every 10 ms mostly gets away with it; code that updates slowly, or a robot that turns fast, doesn't.
Make a notebook page
Turns this calculation into a dated engineering notebook page: the setup, data, results, figures, working and sources, numbered and cited. You add the goal, the decision and the reflection in your own words, plus photos and sketches. Print it, paste it into Google Docs, or download a Word file or slides.
Save this run, and compare
Keeps what is on screen so you can change something and see both sides of the change. Saved in this browser only, never uploaded.
Sources & assumptions
Method. The arc-based position update widely taught in VEX from Team 5225A's 2018 odometry notes, written here with clockwise heading to match the V5 inertial sensor.
Checked. scripts/verify-odom.mjs drives a simulated robot through random steady motions, integrates its true path separately, and confirms all three layouts land on it to a millionth of an inch. It also confirms that the straight-line shortcut, a flipped offset and a mis-measured separation all miss.
What it can't know. A tracking wheel that lifts off the floor, skids sideways, or is mounted loose reports movement that didn't happen, and no update can tell.
Where this goes next
Explore further on the full mapWhere the answers on this page can be used, and which tools could have given you the numbers it asks for.
You are here
Two & Three-Wheel Odometry
a number carries across the next question it raises