diff --git a/cfg/GroundSegmentation.cfg b/cfg/GroundSegmentation.cfg index fd7f6fa46f667981b26852839d2952f2669c2377..b5594973cb7fdc8127529dd910f8730177adcd40 100644 --- a/cfg/GroundSegmentation.cfg +++ b/cfg/GroundSegmentation.cfg @@ -66,6 +66,7 @@ gen.add("mahalanobis_threshold", double_t, 0, "Max mahalanobis distance for grou # labeling parameters gen.add("number_of_references_used_for_labelling", int_t, 0, "used to evaluate each elevation point cloud from different POVs", 4, 0, 100); gen.add("max_pred_std_dev_for_labelling", double_t, 0, "To give up trying to label ground points if we don't have enough confidence in our predictions", 0.3, 0.01, 1.0); +gen.add("score_threshold", double_t, 0, "for assigning ground class label: one means maha. dist. equal to zero, zero means mahalanobis dist equal to maha. thres", 0.8, 0.0, 1.0); gen.add("classify_not_labeled_points_as_obstacles", bool_t, 0, "when a point has no reference satisfying the max_pred_std_dev_for_labelling threshold we can leave as unknown or label it as obstacle", True); gen.add("ground_threshold_in_not_analyzed_areas", double_t, 0, "when it is not possible to make a local analysis of the data, we will use the lowest point (the one in elevation_cloud) as ground height, and all the points above it and below this threshold will be classified as ground", 0.3, 0.01, 1.0); gen.add("discard_not_connected_references_for_labelling", bool_t, 0, "to exclude not connected vertices in the roadmap from the labelling step", True); diff --git a/params/iri_ground_segmentation.yaml b/params/iri_ground_segmentation.yaml index 60a1b185b473e627824d0f9be87908903675e658..c958134055fbd9da41b304a98e81e3b9c70fa2a5 100644 --- a/params/iri_ground_segmentation.yaml +++ b/params/iri_ground_segmentation.yaml @@ -38,8 +38,9 @@ iri_ground_segmentation: { # labeling parameters number_of_references_used_for_labelling: 0, ## used to evaluate each elevation point cloud from different POVs // NEW!! value of zero enables fast labelling mode!! \m/ max_pred_std_dev_for_labelling: 0.5, ## to give up trying to label ground points if we don't have enough confidence in our predictions + score_threshold: 0.275, ## for assigning ground class label: one means maha. dist. equal to zero, zero means mahalanobis dist equal to maha. thres classify_not_labeled_points_as_obstacles: false, ## when a point has no reference satisfying the max_pred_std_dev_for_labelling threshold we can leave as unknown or label it as obstacle - ground_threshold_in_not_analyzed_areas: 0.00, ## when it is not possible to make a local analysis of the data, we will use the lowest point (the one in elevation_cloud) as ground height, and + ground_threshold_in_not_analyzed_areas: 0.05, ## when it is not possible to make a local analysis of the data, we will use the lowest point (the one in elevation_cloud) as ground height, and ## all the points above it and below this threshold will be classified as ground discard_not_connected_references_for_labelling: false, ## to exclude not connected vertices in the roadmap from the labelling step diff --git a/src/ground_segmentation_alg_node.cpp b/src/ground_segmentation_alg_node.cpp index 4b815e3600a188dc9b486fd0f7324c3b53bde2f7..4c91eea9aeb7dd159dc4aeb298b4f23eec5067af 100644 --- a/src/ground_segmentation_alg_node.cpp +++ b/src/ground_segmentation_alg_node.cpp @@ -132,6 +132,14 @@ GroundSegmentationAlgNode::GroundSegmentationAlgNode(void) : else this->alg_.filtering_configuration_.max_pred_std_dev_for_labelling = config_.max_pred_std_dev_for_labelling; + if (!this->private_node_handle_.getParam("score_threshold", + this->config_.score_threshold)) + { + ROS_WARN("GroundSegmentationAlgNode::GroundSegmentationAlgNode: param 'score_threshold' not found"); + } + else + this->alg_.filtering_configuration_.score_threshold = config_.score_threshold; + if (!this->private_node_handle_.getParam("classify_not_labeled_points_as_obstacles", this->config_.classify_not_labeled_points_as_obstacles)) {