A distance sensor is a device that detects the distance between itself and an object. This information can be used to control a robot's movement, or to measure the size of an object.