From 2c3bffc91fbeebde9b8d3d9b095b8cbc3070f0b0 Mon Sep 17 00:00:00 2001 From: Taekjin LEE Date: Wed, 30 Oct 2024 20:17:03 +0900 Subject: [PATCH 1/4] fix: relax recheck threshold --- .../ground_segmentation/src/scan_ground_filter_nodelet.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/perception/ground_segmentation/src/scan_ground_filter_nodelet.cpp b/perception/ground_segmentation/src/scan_ground_filter_nodelet.cpp index 34573b564fa36..28569f724a5b7 100644 --- a/perception/ground_segmentation/src/scan_ground_filter_nodelet.cpp +++ b/perception/ground_segmentation/src/scan_ground_filter_nodelet.cpp @@ -404,9 +404,11 @@ void ScanGroundFilterComponent::classifyPointCloudGridScan( // move to new grid if (p->grid_id > prev_p->grid_id && ground_cluster.getAverageRadius() > 0.0) { // check if the prev grid have ground point cloud + constexpr float threshold_multiplier = 2.0f; if (use_recheck_ground_cluster_) { recheckGroundCluster( - ground_cluster, non_ground_height_threshold_, use_lowest_point_, out_no_ground_indices); + ground_cluster, non_ground_height_threshold_ * threshold_multiplier, use_lowest_point_, + out_no_ground_indices); } curr_gnd_grid.radius = ground_cluster.getAverageRadius(); curr_gnd_grid.avg_height = ground_cluster.getAverageHeight(); From 02d13f4889bdad581492c0fa6271e93ab6f2244a Mon Sep 17 00:00:00 2001 From: Taekjin LEE Date: Thu, 31 Oct 2024 09:43:17 +0900 Subject: [PATCH 2/4] fix: bug fix for an average process --- .../ground_segmentation/src/scan_ground_filter_nodelet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perception/ground_segmentation/src/scan_ground_filter_nodelet.cpp b/perception/ground_segmentation/src/scan_ground_filter_nodelet.cpp index 28569f724a5b7..a651477eddb88 100644 --- a/perception/ground_segmentation/src/scan_ground_filter_nodelet.cpp +++ b/perception/ground_segmentation/src/scan_ground_filter_nodelet.cpp @@ -257,8 +257,8 @@ void ScanGroundFilterComponent::checkContinuousGndGrid( gnd_buff_z_mean += it->avg_height; } - gnd_buff_radius /= static_cast(gnd_grid_buffer_size_ - 1); - gnd_buff_z_mean /= static_cast(gnd_grid_buffer_size_ - 1); + gnd_buff_radius /= static_cast(gnd_grid_buffer_size_); + gnd_buff_z_mean /= static_cast(gnd_grid_buffer_size_); float tmp_delta_mean_z = gnd_grids_list.back().avg_height - gnd_buff_z_mean; float tmp_delta_radius = gnd_grids_list.back().radius - gnd_buff_radius; From 555b52753791ac8d57f9b8071c10ec484d9b5cce Mon Sep 17 00:00:00 2001 From: Taekjin LEE Date: Thu, 31 Oct 2024 10:53:07 +0900 Subject: [PATCH 3/4] chore: update recheck threshold for ground cluster classification --- .../ground_segmentation/src/scan_ground_filter_nodelet.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/perception/ground_segmentation/src/scan_ground_filter_nodelet.cpp b/perception/ground_segmentation/src/scan_ground_filter_nodelet.cpp index a651477eddb88..46b6126ea8097 100644 --- a/perception/ground_segmentation/src/scan_ground_filter_nodelet.cpp +++ b/perception/ground_segmentation/src/scan_ground_filter_nodelet.cpp @@ -404,10 +404,10 @@ void ScanGroundFilterComponent::classifyPointCloudGridScan( // move to new grid if (p->grid_id > prev_p->grid_id && ground_cluster.getAverageRadius() > 0.0) { // check if the prev grid have ground point cloud - constexpr float threshold_multiplier = 2.0f; - if (use_recheck_ground_cluster_) { + const bool is_recheck_area = ground_cluster.getAverageRadius() > grid_mode_switch_radius_; + if (use_recheck_ground_cluster_ && is_recheck_area) { recheckGroundCluster( - ground_cluster, non_ground_height_threshold_ * threshold_multiplier, use_lowest_point_, + ground_cluster, non_ground_height_threshold_, use_lowest_point_, out_no_ground_indices); } curr_gnd_grid.radius = ground_cluster.getAverageRadius(); From dfb4447ba4285c142f4ad58a68ea20418153fd21 Mon Sep 17 00:00:00 2001 From: Taekjin LEE Date: Thu, 14 Nov 2024 11:32:04 +0900 Subject: [PATCH 4/4] feat: update recheck threshold for ground cluster classification --- .../ground_segmentation/src/scan_ground_filter_nodelet.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/perception/ground_segmentation/src/scan_ground_filter_nodelet.cpp b/perception/ground_segmentation/src/scan_ground_filter_nodelet.cpp index 46b6126ea8097..ff7c8b7ee3fdf 100644 --- a/perception/ground_segmentation/src/scan_ground_filter_nodelet.cpp +++ b/perception/ground_segmentation/src/scan_ground_filter_nodelet.cpp @@ -407,8 +407,7 @@ void ScanGroundFilterComponent::classifyPointCloudGridScan( const bool is_recheck_area = ground_cluster.getAverageRadius() > grid_mode_switch_radius_; if (use_recheck_ground_cluster_ && is_recheck_area) { recheckGroundCluster( - ground_cluster, non_ground_height_threshold_, use_lowest_point_, - out_no_ground_indices); + ground_cluster, non_ground_height_threshold_, use_lowest_point_, out_no_ground_indices); } curr_gnd_grid.radius = ground_cluster.getAverageRadius(); curr_gnd_grid.avg_height = ground_cluster.getAverageHeight();