Unit 10 · lesson
Drive a Path on Paper or in Simulation
A path is a sequence of poses, not just a list of motor commands.
A pose combines position and orientation.
For a flat floor, we often represent pose as:
x, y, heading
Path plan
Suppose the robot must:
- start at
(0, 0, 0°); - drive to
(1, 0, 0°); - turn left;
- drive to
(1, 1, 90°).
A command list might achieve that, but the path specification tells us what success means.
Mark checkpoints
Create checkpoints that can be measured.
| Checkpoint | Expected x | Expected y | Expected heading |
|---|---|---|---|
| start | 0.0 | 0.0 | 0° |
| after segment 1 | 1.0 | 0.0 | 0° |
| after turn | 1.0 | 0.0 | 90° |
| finish | 1.0 | 1.0 | 90° |
Now a simulation or physical trial can produce comparable evidence.
Failure case: correcting from the final point only
Suppose the robot finishes close to (1,1) but takes a huge arc through an obstacle zone.
Final position alone says "good." Path evidence says "unsafe."
A robotics test should measure what the mission actually constrains.
Run the mission
Use graph paper, a spreadsheet model, a simulator, or supervised robot data.
Create:
- planned path;
- at least four pose checkpoints;
- observed/simulated path;
- largest deviation;
- likely cause.
If using paper only, deliberately add one wheel-distance error and propagate it through the later checkpoints.
You will see an important robotics pattern: small motion errors accumulate into pose errors.
Predict the pose before running the path
A useful path test starts with a known pose.
start: x = 0 m, y = 0 m, heading = 0°
Now define three segments:
- drive straight 1.0 m;
- rotate 90° left;
- drive straight 0.5 m.
The expected final pose is approximately:
x = 1.0 m
y = 0.5 m
heading = 90°
That answer gives you something concrete to compare with simulation or physical data.
Separate path error from control error
If the robot finishes at (0.90, 0.42), several causes are possible:
- wheel-distance conversion is wrong;
- a wheel slipped;
- turn control undershot;
- starting pose was not actually zero;
- the motion command was wrong;
- pose estimation accumulated error.
Do not immediately rewrite the path.
Record checkpoints after each segment. If segment 1 is already short, the turn is not the first problem. If position is correct before the rotation and wrong afterward, investigate the turn and heading estimate.
A path becomes diagnosable when you can locate where the error first appears.