correct theta after each turn when a wall is nearby