What does cross-track error mean?
How far the robot is from its path, measured at right angles to the path and signed to say which side it is on. The along-track error, measured along the path, is a separate quantity with a separate controller.
In a lesson
On a car you cannot move sideways, so the only handle on the cross-track error is the steering, and the loop is second order: steering changes heading, heading changes lateral velocity, lateral velocity changes the error. Two integrators, and therefore the possibility of oscillation. The Stanley controller, which won the DARPA Grand Challenge, is the standard answer:
Learn it
- Taught in U10.3 Cross-track error Following a trajectory, University