jkk-research / lidar_cluster_ros2

LIDAR pointcloud clustering
https://jkk-research.github.io/workshops/clustering_a/
GNU General Public License v3.0
18 stars 5 forks source link

Spatial DBSCAN optimisation #3

Closed Zahuczky closed 6 months ago

Zahuczky commented 6 months ago

Spatial DBSCAN optimisation

Overview

This pull request provides optmisitaion and significant performance uplift for the spatial DBSCAN implementation. On my computer (R5 5600H) the uplift is going from the initial 800ms (1.2Hz) / callback to 100ms (10Hz) / callback.

Key changes

KD-tree Implementation

From what I can see, this is as fast as it gets for this algorithm. Currently, the neighbor finding is limited to only look for enough neighbors to determine if a point is a core point. Another option would be to find all neighbors within a certain radius, and later only use those neighbors to expand the cluster, but in that case, we would spend more time on finding the neighbors than what we save by not expanding the cluster from all points.

Additionally, fixed a typo in the README.