Skip to content

Commit fe0da51

Browse files
committed
Use type uint64_t for cluster IDs
1 parent 2e7f10a commit fe0da51

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

include/continuous_clustering/clustering/continuous_clustering.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ struct Point
142142
std::set<RangeImageIndex> associated_trees{};
143143
RangeImageIndex tree_root_{0, -1};
144144
uint32_t tree_num_points{0};
145-
uint32_t id{0};
145+
uint64_t id{0};
146146
double visited_at_continuous_azimuth_angle{-1.};
147147
bool belongs_to_finished_cluster{false};
148148
int number_of_visited_neighbors{0};
@@ -178,7 +178,7 @@ struct PublishingJob
178178
int64_t ring_buffer_current_global_column_index;
179179
int64_t ring_buffer_min_required_global_column_index;
180180

181-
std::list<int64_t> cluster_ids;
181+
std::list<uint64_t> cluster_ids;
182182
std::list<std::list<RangeImageIndex>> trees_per_finished_cluster;
183183
};
184184

@@ -255,7 +255,7 @@ class ContinuousClustering
255255
std::mutex sc_first_unfinished_global_column_index_mutex;
256256
std::list<int64_t> sc_minimum_required_global_column_indices;
257257
std::list<RangeImageIndex> sc_unfinished_point_trees_;
258-
uint32_t sc_cluster_counter_{1};
258+
uint64_t sc_cluster_counter_{1};
259259
std::vector<float> sc_inclination_angles_between_lasers_;
260260
std::function<void(int64_t, int64_t, bool)> finished_column_callback_;
261261
std::function<void(const std::vector<Point>&, uint64_t)> finished_cluster_callback_;

src/clustering/continuous_clustering.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include <continuous_clustering/clustering/continuous_clustering.hpp>
22

3-
#include <fstream>
43
#include <iostream>
54
#include <utility>
65

@@ -813,7 +812,7 @@ void ContinuousClustering::findFinishedTreesAndAssignSameId(TreeCombinationJob&&
813812
sc_unfinished_point_trees_.splice(sc_unfinished_point_trees_.end(), std::move(job.new_unfinished_point_trees));
814813

815814
std::list<std::list<RangeImageIndex>> trees_per_finished_cluster;
816-
std::list<int64_t> finished_cluster_ids;
815+
std::list<uint64_t> finished_cluster_ids;
817816

818817
std::list<RangeImageIndex> trees_collected_for_current_cluster;
819818
std::list<RangeImageIndex> trees_to_visit_for_current_cluster;
@@ -914,7 +913,7 @@ void ContinuousClustering::collectPointsForCusterAndPublish(PublishingJob&& job)
914913
std::vector<Point> cluster_points;
915914

916915
auto it_trees_per_finished_cluster = job.trees_per_finished_cluster.begin();
917-
for (int64_t cluster_id : job.cluster_ids)
916+
for (uint64_t cluster_id : job.cluster_ids)
918917
{
919918
// clear buffer
920919
cluster_points.clear();

0 commit comments

Comments
 (0)