Range Sensor for Dirty garbage bins

TolpuddleSartre:
The ones on the front of my car are subjected to regular drenching (I live in the UK), extreme wind-chill and direct high-velocity insect, grit and stone strikes, and yet have worked flawlessly for the last five years.

Would you mean providing me a link (or an image)? I'm interested to delve deeper into this. It makes sense that a bit of dirt/grime wouldn't cripple a car right away.

INTP:
I was just thinking of a basic distance sensor with a separate emitter and sensor. Spacing them might give you a beneficial blind spot of things that are too close due to n angle that's too steep for reflection.

That makes sense. Though if some dirt has accumulated on the emitter (or receiver) like on the picture, do you think the signal could still actually carry through? How little of the signal needs to carry through for the receiver pick up on it?