I typo'd. The car turns left when the right hand SONAR says it is too close to the wall - ie less than "desiredtrack". It then crosses the imaginary "desiredtrack" line which is parallel to the wall.

Now it starts to turn right - as it should. As the right turn aims the front of the car more at the wall, the right SONAR finds that same wall farther away. It exceeds the "desiredtrack" distance and therefore keeps turning right.

CRASH