be me, weekend project, small two-wheel robot with two reflectance sensors write a nice proportional controller error = left - right, steer = Kp * error put it on the track it sees the line, steers... away from it jumps off the track and drives into the sofa flip the sign now it follows the line but wiggles like a drunk snake Kp is too high, so it overshoots every time lower Kp now it is too slow to react in curves add some derivative term the wiggle is gone robot is smooth cat chases robot
Three things I learned: sign errors are the most common control bug, Kp is a compromise between reaction and oscillation, and a D term is a shock absorber. Also that the cat is part of the plant.