Skip to content

Commit 0678476

Browse files
committed
Add option to do high-level breadth-first-search (BFS) just every n'th column
1 parent 868d699 commit 0678476

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

cfg/ContinuousClustering.cfg

+3
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,8 @@ c.add("ignore_points_with_too_big_inclination_angle_diff", bool_t, 0,
7676
c.add("use_last_point_for_cluster_stamp", bool_t, 0,
7777
"whether to use the latest stamp of all points in the cluster as cluster stamp or the middle between oldest and latest stamp. This should be typically disabled and is only useful to measure the cluster' latency.",
7878
False)
79+
c.add("cluster_point_trees_every_nth_column", int_t, 0,
80+
"custher point trees every n'th column (n==1 means every column)",
81+
1, 0, 3000)
7982

8083
exit(gen.generate(PACKAGE, "continuous_clustering_node", "ContinuousClustering"))

include/continuous_clustering/clustering/continuous_clustering.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ struct ContinuousClusteringConfiguration
7575
bool ignore_points_in_chessboard_pattern{true};
7676
bool ignore_points_with_too_big_inclination_angle_diff{true};
7777
bool use_last_point_for_cluster_stamp{false};
78+
int cluster_point_trees_every_nth_column{1};
7879
};
7980

8081
struct Configuration

src/clustering/continuous_clustering.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,9 @@ void ContinuousClustering::findFinishedTreesAndAssignSameId(TreeCombinationJob&&
838838
{
839839
sc_unfinished_point_trees_.splice(sc_unfinished_point_trees_.end(), std::move(job.new_unfinished_point_trees));
840840

841+
if (job.ring_buffer_current_global_column_index % config_.clustering.cluster_point_trees_every_nth_column != 0)
842+
return;
843+
841844
std::list<std::list<RangeImageIndex>> trees_per_finished_cluster;
842845
std::list<uint64_t> finished_cluster_ids;
843846

src/ros/continuous_clustering_node.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ class RosContinuousClustering
229229
config_.clustering.ignore_points_with_too_big_inclination_angle_diff =
230230
config.ignore_points_with_too_big_inclination_angle_diff;
231231
config_.clustering.use_last_point_for_cluster_stamp = config.use_last_point_for_cluster_stamp;
232+
config_.clustering.cluster_point_trees_every_nth_column = config.cluster_point_trees_every_nth_column;
232233

233234
clustering_.setConfiguration(config_);
234235
}

0 commit comments

Comments
 (0)