Quote Originally Posted by scalerobotics View Post
Sounds like you need to limit your angle as you turn into the wall.

When adjusting right to get to your imaginary line (closer to the wall), if front distance < 3 * side distance, then turn left (until front distance > 3 * side distance). Something like this should help keep from making too big of a right turn, but still get you closer to the wall.

Changing the 3 would change the angle you would allow.
I am pretty sure this method will lead to oscillations. In fact in the Ken's video this really happens. The car "oscillates" around its desired path.

With simple if-then commands this cannot be compensated. As discussed in previous post, a PID loop control can help.

Ioannis