I was reading an article on the subject and learned there are multiple ways of doing it. Don't ask ask me to explain them all.
- Stereo Vision
- Ultrasonic (Sonar)
- Time-of-Flight
- Lidar
- Infrared
- Monocular Vision