Obstacle avoidance with one ray