-
Notifications
You must be signed in to change notification settings - Fork 1
Cone Detection
Cluster Detection is vital for the perception pipeline which takes a point cloud of objects (meaning the ground has been removed) and searches the cloud for clusters. This algorithm is completed within the cone_detection node, since it identifies clusters, then filters down those clusters to only ones of cones.
DBSCAN (Density-Based Spatial Clustering of Applications with Noise) was used over other clustering algorithms because it's a density-based clustering algorithm, it can discover clusters of arbitrary shapes, it doesn't need the number of clusters to be pre-specified, and it's robust to noise and outliers, all of which are beneficial to our use-case.
File Structure: cone_detection
(Note that this is shared with the greater LiDAR perception pipeline.
src/cone_detection.py
Tech Stack:
-
pcl: This is the main PCL (Point Cloud Library). -
pcl_ros: A wrapper for interfacing ROS messages and PCL. -
ros2_numpy: Converts PointCloud2 message to np array for DBSCAN pcl_msgssensor_msgsvision_msgs-
sklearn.cluster: imports DBSCAN for the cluster detection
This cone detection process uses the following steps
-
Subscription to the objects point cloud on the topic
/lidar/pcl/objects -
Removes null values
-
Removes values that are beyond a max and min distance from the LiDAR
-
Runs cluster detection
-
Removes non-cone clusters
-
Publishes cone locations in message type Cone to
/lidar/pcl/cones