Collision detecting