Collision avoidance in pedestrian dynamics