Route selection emerges from the dynamics of steering and obstacle avoidance