From e3b0b0bcf760721edad14fcfadea5777fb99f155 Mon Sep 17 00:00:00 2001 From: satoshi-ota Date: Mon, 13 Nov 2023 13:11:22 +0900 Subject: [PATCH 1/2] fix(avoidance): fix wrong reason for unavoidable situation Signed-off-by: satoshi-ota --- .../src/scene_module/avoidance/avoidance_module.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planning/behavior_path_planner/src/scene_module/avoidance/avoidance_module.cpp b/planning/behavior_path_planner/src/scene_module/avoidance/avoidance_module.cpp index 2ad0928696a5c..acc550e8ce932 100644 --- a/planning/behavior_path_planner/src/scene_module/avoidance/avoidance_module.cpp +++ b/planning/behavior_path_planner/src/scene_module/avoidance/avoidance_module.cpp @@ -1003,7 +1003,7 @@ AvoidOutlines AvoidanceModule::generateAvoidOutline( if (feasible) { RCLCPP_WARN_THROTTLE( getLogger(), *clock_, 1000, "feasible shift length is not enough to avoid. "); - object.reason = AvoidanceDebugFactor::INSUFFICIENT_LATERAL_MARGIN; + object.reason = AvoidanceDebugFactor::TOO_LARGE_JERK; return boost::none; } From cc6d66a41ed9d5fb21430e66d7705b731b4a6271 Mon Sep 17 00:00:00 2001 From: satoshi-ota Date: Thu, 16 Nov 2023 15:12:38 +0900 Subject: [PATCH 2/2] fix(avoidance): fix misreading variable name Signed-off-by: satoshi-ota --- .../src/scene_module/avoidance/avoidance_module.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/planning/behavior_path_planner/src/scene_module/avoidance/avoidance_module.cpp b/planning/behavior_path_planner/src/scene_module/avoidance/avoidance_module.cpp index acc550e8ce932..f6f77fff36124 100644 --- a/planning/behavior_path_planner/src/scene_module/avoidance/avoidance_module.cpp +++ b/planning/behavior_path_planner/src/scene_module/avoidance/avoidance_module.cpp @@ -997,10 +997,10 @@ AvoidOutlines AvoidanceModule::generateAvoidOutline( desire_shift_length > 0.0 ? feasible_relative_shift_length + current_ego_shift : -1.0 * feasible_relative_shift_length + current_ego_shift; - const auto feasible = + const auto infeasible = std::abs(feasible_shift_length - object.overhang_dist) < 0.5 * planner_data_->parameters.vehicle_width + object_parameter.safety_buffer_lateral; - if (feasible) { + if (infeasible) { RCLCPP_WARN_THROTTLE( getLogger(), *clock_, 1000, "feasible shift length is not enough to avoid. "); object.reason = AvoidanceDebugFactor::TOO_LARGE_JERK;