Skip to content

Commit 0bebece

Browse files
committedMar 28, 2024
fix the condition (road traffic light -> crosswalk traffic light)
Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
1 parent 13fd165 commit 0bebece

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎planning/behavior_velocity_crosswalk_module/src/scene_crosswalk.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,10 @@ bool CrosswalkModule::modifyPathVelocity(PathWithLaneId * path, StopReason * sto
240240
const auto cmp_with_time_buffer = [&](const auto & t, const auto cmp_fn) {
241241
return t && cmp_fn((now - *t).seconds(), planner_param_.occlusion_time_buffer);
242242
};
243+
const auto crosswalk_has_traffic_light =
244+
!crosswalk_.regulatoryElementsAs<const lanelet::TrafficLight>().empty();
243245
const auto is_crosswalk_ignored =
244-
(planner_param_.occlusion_ignore_with_traffic_light &&
245-
!road_.regulatoryElementsAs<const lanelet::TrafficLight>().empty()) ||
246+
(planner_param_.occlusion_ignore_with_traffic_light && crosswalk_has_traffic_light) ||
246247
crosswalk_.hasAttribute("skip_occluded_slowdown");
247248
if (planner_param_.occlusion_enable && !path_intersects.empty() && !is_crosswalk_ignored) {
248249
const auto dist_ego_to_crosswalk =

0 commit comments

Comments
 (0)