Switching behavior in moving obstacle avoidance