From f68121e5487037de857343d3924b249e5afcfde2 Mon Sep 17 00:00:00 2001 From: Shunsuke Miura <37187849+miursh@users.noreply.github.com> Date: Thu, 14 Apr 2022 19:39:12 +0900 Subject: [PATCH] feat(scan_ground_filter): change launch option and threshold (#670) * Add care for near but high points Signed-off-by: Shunsuke Miura * ci(pre-commit): autofix Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .../ground_segmentation/ground_segmentation.param.yaml | 4 ++-- .../ground_segmentation/src/scan_ground_filter_nodelet.cpp | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/launch/tier4_perception_launch/config/obstacle_segmentation/ground_segmentation/ground_segmentation.param.yaml b/launch/tier4_perception_launch/config/obstacle_segmentation/ground_segmentation/ground_segmentation.param.yaml index 33addb108dded..e3bef09e52b47 100644 --- a/launch/tier4_perception_launch/config/obstacle_segmentation/ground_segmentation/ground_segmentation.param.yaml +++ b/launch/tier4_perception_launch/config/obstacle_segmentation/ground_segmentation/ground_segmentation.param.yaml @@ -19,5 +19,5 @@ global_slope_max_angle_deg: 10.0 local_slope_max_angle_deg: 30.0 split_points_distance_tolerance: 0.2 - split_height_distance: 0.2 - use_virtual_ground_point: False + split_height_distance: 0.3 + use_virtual_ground_point: True diff --git a/perception/ground_segmentation/src/scan_ground_filter_nodelet.cpp b/perception/ground_segmentation/src/scan_ground_filter_nodelet.cpp index 20deb7a785c0f..a85fb5d120b73 100644 --- a/perception/ground_segmentation/src/scan_ground_filter_nodelet.cpp +++ b/perception/ground_segmentation/src/scan_ground_filter_nodelet.cpp @@ -178,6 +178,10 @@ void ScanGroundFilterComponent::classifyPointCloud( } else { calculate_slope = true; } + if (is_point_close_to_prev) { + height_from_gnd = p->orig_point->z - ground_cluster.getAverageHeight(); + radius_distance_from_gnd = p->radius - ground_cluster.getAverageRadius(); + } if (calculate_slope) { // far from the previous point