The problem of using computer vision to compute distances to moving 3D objects in any weather conditions is too general - it is precisely the generalized vision problem I was talking about.
Ultrasonic or radar or lidar sensors are much simpler solutions to the problem of computing distances, as they do not rely on computer vision.
Note that the reason this problem is very hard for computer vision is that there is simply not enough information in a 2D picture to get 3D distance information, even with parallax. Our eyes also can't solve this problem. Instead, our visual system uses numerous heuristics based on our inherent understanding of simple classical physics and the world around us.
For example, we recognize that a particular blob of color represents a car, and that cars are solid objects, where each part of the car moves at the same speed as each other part (this assumption breaks if something flies off the car). We recognize that objects throw shadows, and what effect shadows have on color, so we can very easily tell the contours of an object even if it's speckled in light and shadow. We also know what approximate sizes cars are, and that means we can immediately differentiate a far away car from a close one. We also know that cars sitting on the road are probably moving, while cars on the sidewalk are probably parked, and that again helps us estimate their movement based on relatively little data.
If you don't believe that depth perception is based on far more than parallax, just try to explain how come people/animals with a single eye can still estimate distances to a very good degree (not enough to be marksmen, but more than enough not to run into walls).