diff --git a/modules/cluster_estimation/cluster_estimation.py b/modules/cluster_estimation/cluster_estimation.py index 6783489c..6943b591 100644 --- a/modules/cluster_estimation/cluster_estimation.py +++ b/modules/cluster_estimation/cluster_estimation.py @@ -58,7 +58,6 @@ class ClusterEstimation: __filter_by_covariances() Removes any cluster with covariances much higher than the lowest covariance value. - """ __create_key = object() @@ -179,12 +178,13 @@ def run( # init search parameters ptr = 0 - max_label = self.__current_bucket[0][2] - # itterates through all possible labels - for label in reversed(range(max_label)): + # itterates through all points + while ptr <= len(self.__current_bucket): + # reference label + label = self.__current_bucket[ptr][2] - # creates bucket of labels + # creates bucket of points with the same label bucket_labelled = [] while ptr < len(self.__current_bucket) and self.__current_bucket[ptr][2] == label: bucket_labelled += [self.__current_bucket[ptr]] @@ -200,7 +200,9 @@ def run( # checks if cluster_by_label ran succssfully if not check: - self.__logger(f"did not add objects of label={label} to total object detections") + self.__logger.warning( + f"did not add objects of label={label} to total object detections" + ) continue detections_in_world += labelled_detections_in_world diff --git a/modules/common b/modules/common index d37c01c8..9b10a334 160000 --- a/modules/common +++ b/modules/common @@ -1 +1 @@ -Subproject commit d37c01c853815e22a8f6791cc499727d24b31b0f +Subproject commit 9b10a334651b7cca5d014d4640e42d3a55d128f8