From 162f33161344a2d043c05299294ae7031851d8d7 Mon Sep 17 00:00:00 2001 From: Satoshi OTA <44889564+satoshi-ota@users.noreply.github.com> Date: Wed, 1 May 2024 13:04:56 +0900 Subject: [PATCH] fix(avoidance): add missing parameter declaration (#6908) Signed-off-by: satoshi-ota --- .../behavior_path_avoidance_module/parameter_helper.hpp | 5 +++++ .../schema/avoidance.schema.json | 2 +- planning/behavior_path_avoidance_module/src/manager.cpp | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/planning/behavior_path_avoidance_module/include/behavior_path_avoidance_module/parameter_helper.hpp b/planning/behavior_path_avoidance_module/include/behavior_path_avoidance_module/parameter_helper.hpp index e115e676b1dbf..25101537850ae 100644 --- a/planning/behavior_path_avoidance_module/include/behavior_path_avoidance_module/parameter_helper.hpp +++ b/planning/behavior_path_avoidance_module/include/behavior_path_avoidance_module/parameter_helper.hpp @@ -131,6 +131,11 @@ AvoidanceParameters getParameter(rclcpp::Node * node) getOrDeclareParameter(*node, ns + "min_road_shoulder_width"); } + { + const std::string ns = "avoidance.target_filtering.merging_vehicle."; + p.th_overhang_distance = getOrDeclareParameter(*node, ns + "th_overhang_distance"); + } + { const std::string ns = "avoidance.target_filtering.avoidance_for_ambiguous_vehicle."; p.enable_avoidance_for_ambiguous_vehicle = getOrDeclareParameter(*node, ns + "enable"); diff --git a/planning/behavior_path_avoidance_module/schema/avoidance.schema.json b/planning/behavior_path_avoidance_module/schema/avoidance.schema.json index 91f9519596bb1..7c0205d2473e5 100644 --- a/planning/behavior_path_avoidance_module/schema/avoidance.schema.json +++ b/planning/behavior_path_avoidance_module/schema/avoidance.schema.json @@ -686,7 +686,7 @@ "properties": { "th_overhang_distance": { "type": "number", - "description": "Distance threshold between overhang point and ego lane's centerline. If the nearest overhang point of merging/deviating vehicle is less than this param, the module never avoid it. (Basically, the ego stops behind of it.)", + "description": "Distance threshold to ignore merging/deviating vehicle to/from ego driving lane. The distance represents how the object polygon overlaps ego lane, and it's calculated from polygon overhang point and lane centerline. If the distance is more than this param, the module never avoid the object. (Basically, the ego stops behind of it.)", "default": 0.5 } }, diff --git a/planning/behavior_path_avoidance_module/src/manager.cpp b/planning/behavior_path_avoidance_module/src/manager.cpp index dbff6f60365f3..7772bd9c2ad35 100644 --- a/planning/behavior_path_avoidance_module/src/manager.cpp +++ b/planning/behavior_path_avoidance_module/src/manager.cpp @@ -124,6 +124,11 @@ void AvoidanceModuleManager::updateModuleParams(const std::vector(parameters, ns + "backward_distance", p->object_check_backward_distance); } + { + const std::string ns = "avoidance.target_filtering.merging_vehicle."; + updateParam(parameters, ns + "th_overhang_distance", p->th_overhang_distance); + } + { const std::string ns = "avoidance.avoidance.lateral.avoidance_for_ambiguous_vehicle."; updateParam(parameters, ns + "enable", p->enable_avoidance_for_ambiguous_vehicle);