From 6085d85900b91248632cac63b28de149ece2acd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20del=20Pino?= <idelpino@iri.upc.edu> Date: Thu, 14 Jul 2022 17:42:22 +0200 Subject: [PATCH] added score threshold --- cfg/GroundSegmentation.cfg | 1 + params/iri_ground_segmentation.yaml | 3 ++- src/ground_segmentation_alg_node.cpp | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/cfg/GroundSegmentation.cfg b/cfg/GroundSegmentation.cfg index fd7f6fa..b559497 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 60a1b18..c958134 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 4b815e3..4c91eea 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)) { -- GitLab