This paper presents a clustering technique for the detection of the obstacles and lane boundaries on a road. The algorithm consists of two nested clustering stages. The first stage is based on hierarchical clustering, and the second on k-means clustering. The method exploits a preliminary ground-plane filtering algorithm to process the raw LIDAR point cloud, that is based on the semantic segmentation of point clouds. The clustering algorithm estimates the position of the obstacles that define the race track. Once the race track is sensed, the lane boundaries are detected. The method is validated experimentally on a four-wheel drive electric vehicle participating in the Formula SAE events. The validation environment is structured with traffic cones to define the race track.