Searching online I have stumbled across following type of sensors that claim to measure distance. I don't quite understand the difference between them and their pros and cons. Would appreciate if someone can explain the difference between those. I myself trying to build a bot and want to figure out which sensor to use for opponent detection, balancing between the accuracy, speed and the sensor price)
Sharp Proximity IR sensors (these are fairly affordable)
This is a parallax (or triangulation) sensor. It detects distance by "watching" where a focused beam of light falls on the target. The range is usually short and different physical designs (different lenses) are used for different ranges. The color of the object does not matter much as long as the detector can see the inferred dot. These detectors are commonly used in copiers to detect closed lids and the presence of paper.
Diffuse type sensors (these sensors are for some reason very expensive, why?)
These sensors measure distance by the amount of light that is reflected back to the sensor. All the targets need to be of the same color and reflectivity. This is because light or white object reflect more light and will trigger the sensor further away then a dark or black object. Likely, these sensors are expensive because they are adjustable. Likely, these detectors are used in manufacturing to detect the same type of object over and over again.
Parallax (or triangulation) and diffuse (or reflective) sensors are talked about here.
Mini Lidar (those sensors are somewhat in between, but still are on the pricey side)
There are several types of LIDAR or LIght Detection And Ranging technology. Basically, these detectors measure the distance to the target by exploiting either the phase of the reflective light or the time it takes the light to travel the distance to the target. Either way, a considerable investment is made into the electronics to measure such features of light. In general, LIDAR can operate over a much wider range of distances then either of the other two methods mentioned here. These detectors are used in autonomous automobiles and other such navigation.
LIDAR sensors are talked about here.
I myself trying to build a bot and want to figure out which sensor to use for opponent detection,
Most people who build a Sumo-Bot use the parallax or triangulation sensors. They are cheap and there is a model with a range that is a good fit for a Sumo-Bot arena. For building a larger robot, especially for navigation purposes, an expensive LIDAR system using spinning mirrors may be necessary.