From 5d7305bc5e398ffb222ec946d8c5b251b0184967 Mon Sep 17 00:00:00 2001 From: Go Sakayori Date: Wed, 21 Aug 2024 14:36:49 +0900 Subject: [PATCH] fix(static_obstacle_avoidance): target object sorting (#8545) * fix compensateLostTargetObjects function Signed-off-by: Go Sakayori * remove empty case Signed-off-by: Go Sakayori --------- Signed-off-by: Go Sakayori --- .../src/utils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/planning/behavior_path_planner/autoware_behavior_path_static_obstacle_avoidance_module/src/utils.cpp b/planning/behavior_path_planner/autoware_behavior_path_static_obstacle_avoidance_module/src/utils.cpp index f7bda56150b49..79ba00cdf4d94 100644 --- a/planning/behavior_path_planner/autoware_behavior_path_static_obstacle_avoidance_module/src/utils.cpp +++ b/planning/behavior_path_planner/autoware_behavior_path_static_obstacle_avoidance_module/src/utils.cpp @@ -1674,8 +1674,8 @@ void compensateLostTargetObjects( const std::shared_ptr & parameters) { const auto include = [](const auto & objects, const auto & search_id) { - return std::all_of(objects.begin(), objects.end(), [&search_id](const auto & o) { - return o.object.object_id != search_id; + return std::any_of(objects.begin(), objects.end(), [&search_id](const auto & o) { + return o.object.object_id == search_id; }); };