Coding obstacle avoidance