I am currently thinking about making a robot that will autonomously drive around the place. The place I want this robot to drive in however contains quite a few glass walls. When mapping the area I would need to be able to see the glass. For this reason I am in need of a sensor that can see the glass, and not see through it. What kind of sensor would be the best for me? I need it to have a maximum range of about 2-10 meters and a minimum range of about 0.25 meters (preferably as small as possible). I was thinking about maybe using ultrasonic, but I was told that a laser-based sensor would probably be best. I could however only find industrial grade laser sensors that could see glass/transparent objects.
I'm pretty sure that a very basic IR proximity sensor would do the trick. Glass is opaque to all but visible light. IR (as well as UV) will not penetrate the glass and you ought to be getting reliable distance measurements to the glass's surface.
Unless you need very good resolution or a very tight detection pattern, I would go with an ultrasonic sensor. They can be very cheap and easily meet your detection range specs, for the very low end look at something like the HC-SR04, and for more serious applications Maxbotix offers a wide range of sensors.