I actually installed the optical sensors on an angle. One side is higher than the other so it prevents the door from closing and reverses if the car bumper is in the way.
Most sensors get installed too low where something as high as a car bumper doesn't block the sensors.