Obstacle detection with automatic return mechanism