Your robot is about to drive forward. Is the way clear?
The LiDAR sees the floor, a few obstacles and some noise, as one big list of points. Turn that list into a decision: find the ground, group the rest into obstacles, measure how far away they are, and decide STOP or GO.