Navigation: corrected wall-following to get the shortest path.