From fee4a5753d30cd0b10dfb6395cb67d225fcb9a78 Mon Sep 17 00:00:00 2001 From: satoshi-ota Date: Fri, 15 Mar 2024 17:03:40 +0900 Subject: [PATCH] fix(avoidance): use getRightLanelet Signed-off-by: satoshi-ota --- planning/behavior_path_avoidance_module/src/utils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/planning/behavior_path_avoidance_module/src/utils.cpp b/planning/behavior_path_avoidance_module/src/utils.cpp index 663f680718522..ca8c6cfff477d 100644 --- a/planning/behavior_path_avoidance_module/src/utils.cpp +++ b/planning/behavior_path_avoidance_module/src/utils.cpp @@ -702,8 +702,8 @@ bool isNeverAvoidanceTarget( if (object.is_on_ego_lane) { if ( - !!planner_data->route_handler->getRoutingGraphPtr()->right(object.overhang_lanelet) && - !!planner_data->route_handler->getRoutingGraphPtr()->left(object.overhang_lanelet)) { + planner_data->route_handler->getRightLanelet(object.overhang_lanelet).has_value() && + planner_data->route_handler->getLeftLanelet(object.overhang_lanelet).has_value()) { object.reason = AvoidanceDebugFactor::NOT_PARKING_OBJECT; RCLCPP_DEBUG(rclcpp::get_logger(__func__), "object isn't on the edge lane. never avoid it."); return true;