@@ -54,6 +54,7 @@ ScanGroundFilterComponent::ScanGroundFilterComponent(const rclcpp::NodeOptions &
54
54
split_points_distance_tolerance_ = declare_parameter (" split_points_distance_tolerance" , 0.2 );
55
55
split_height_distance_ = declare_parameter (" split_height_distance" , 0.2 );
56
56
use_virtual_ground_point_ = declare_parameter (" use_virtual_ground_point" , true );
57
+ use_recheck_ground_cluster_ = declare_parameter (" use_recheck_ground_cluster" , true );
57
58
radial_dividers_num_ = std::ceil (2.0 * M_PI / radial_divider_angle_rad_);
58
59
vehicle_info_ = VehicleInfoUtil (*this ).getVehicleInfo ();
59
60
@@ -356,7 +357,9 @@ void ScanGroundFilterComponent::classifyPointCloudGridScan(
356
357
// move to new grid
357
358
if (p->grid_id > prev_p->grid_id && ground_cluster.getAverageRadius () > 0.0 ) {
358
359
// check if the prev grid have ground point cloud
359
- recheckGroundCluster (ground_cluster, non_ground_height_threshold_, out_no_ground_indices);
360
+ if (use_recheck_ground_cluster_) {
361
+ recheckGroundCluster (ground_cluster, non_ground_height_threshold_, out_no_ground_indices);
362
+ }
360
363
curr_gnd_grid.radius = ground_cluster.getAverageRadius ();
361
364
curr_gnd_grid.avg_height = ground_cluster.getAverageHeight ();
362
365
curr_gnd_grid.max_height = ground_cluster.getMaxHeight ();
@@ -611,7 +614,11 @@ rcl_interfaces::msg::SetParametersResult ScanGroundFilterComponent::onParameter(
611
614
get_logger (),
612
615
" Setting use_virtual_ground_point to: " << std::boolalpha << use_virtual_ground_point_);
613
616
}
614
-
617
+ if (get_param (p, " use_recheck_ground_cluster" , use_recheck_ground_cluster_)) {
618
+ RCLCPP_DEBUG_STREAM (
619
+ get_logger (),
620
+ " Setting use_recheck_ground_cluster to: " << std::boolalpha << use_recheck_ground_cluster_);
621
+ }
615
622
rcl_interfaces::msg::SetParametersResult result;
616
623
result.successful = true ;
617
624
result.reason = " success" ;
0 commit comments