Their fleet is constantly scanning the area with lidar, which is assembled into maps. If those maps are in 3d rather than a 2d road grid you can calculate puddles very accurately with no extra sensors:
- Find the edge of the water using vision or lidar
- look up the ground height at that position in your map data. That is the water level
- run a flood fill of the local 3d map starting from that point, with that water level. That gives you an exact shape of the puddle
- for any point on your planned path, you can now check if the point is in the puddle (per the flood fill above) and how deep the water is (difference between puddle's water level and ground height)
- use that either as a go/no-go for a planned path, or even feed this into your pathfinding to find a path with acceptable water level
The main limitation is that it assumes that the ground hasn't changed. It won't help in a landslide, or on muddy ground where other cars have disturbed the ground. But for the classic case of the flooded underpass or flooded dip in the road it should be very accurate