A good enough sensor stack (read Lidar) would have detected a solid obstacle at X distance (real measurement) way earlier than a camera making sense of the pixels, classifying it as an object and then providing an ML estimated distance (not real measurement) to the object. All you need in this scenario is to be able to tell there is an obstacle without having to even know it's a car, which Lidar is very good at doing.