This was a basic experiment with a rangefinder and a motor. The idea was to detect decreasing distance between a vehicle and any obstacle, and adjust speed based on the obstacle. In the worst case scenario, we wanted the vehicle to stop before colliding.
Here's a video of the experiment: https://www.youtube.com/watch?v=i5SlIUKZGsg