Skip to content

Commit

Permalink
added result check
Browse files Browse the repository at this point in the history
  • Loading branch information
ashum68 committed Aug 21, 2024
1 parent 63417a5 commit b2ffcac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/clustering/clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,12 @@ def run(

# if far enough, send current cluster, initialize new one
if distance_from_last_point > self.max_cluster_distance or direction_switched:
new_cluster = detection_cluster.DetectionCluster.create(self.cluster)
result, new_cluster = detection_cluster.DetectionCluster.create(self.cluster)
if not result:
return False, None
self.cluster = []
self.cluster.append(point)
return new_cluster
return True, new_cluster

# if close enough, cluster together
self.cluster.append(point)
Expand Down

0 comments on commit b2ffcac

Please sign in to comment.