From 4f0f928b26b9416e760337937fabbfcabcffb2bd Mon Sep 17 00:00:00 2001 From: yuki-takagi-66 Date: Mon, 20 Jan 2025 19:14:36 +0900 Subject: [PATCH] po Signed-off-by: yuki-takagi-66 --- .../src/scene_crosswalk.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/planning/behavior_velocity_planner/autoware_behavior_velocity_crosswalk_module/src/scene_crosswalk.hpp b/planning/behavior_velocity_planner/autoware_behavior_velocity_crosswalk_module/src/scene_crosswalk.hpp index b9803207a1a31..7d6e75cc3b615 100644 --- a/planning/behavior_velocity_planner/autoware_behavior_velocity_crosswalk_module/src/scene_crosswalk.hpp +++ b/planning/behavior_velocity_planner/autoware_behavior_velocity_crosswalk_module/src/scene_crosswalk.hpp @@ -196,14 +196,10 @@ class CrosswalkModule : public SceneModuleInterfaceWithRTC const PlannerParam & planner_param, const lanelet::BasicPolygon2d & crosswalk_polygon, const bool is_object_away_from_path) { - const bool is_stopped = vel < planner_param.stop_object_velocity; + const bool is_object_stopped = vel < planner_param.stop_object_velocity; // Check if the object can be ignored - if (is_stopped) { - if (collision_state == CollisionState::IGNORE) { - return; - } - + if (is_object_stopped && is_ego_yielding) { if (!time_to_start_stopped) { time_to_start_stopped = now; } @@ -214,7 +210,7 @@ class CrosswalkModule : public SceneModuleInterfaceWithRTC planner_param.timeout_set_for_no_intention_to_walk, distance_to_crosswalk); const bool intent_to_cross = (now - *time_to_start_stopped).seconds() < timeout_no_intention_to_walk; - if (is_ego_yielding && !intent_to_cross && is_object_away_from_path) { + if (!intent_to_cross && is_object_away_from_path) { collision_state = CollisionState::IGNORE; return; } @@ -222,6 +218,10 @@ class CrosswalkModule : public SceneModuleInterfaceWithRTC time_to_start_stopped = std::nullopt; } + if (is_object_stopped && collision_state == CollisionState::IGNORE) { + return; + } + // Compare time to collision and vehicle if (collision_point) { // Check if ego will pass first