File tree 1 file changed +13
-5
lines changed
planning/behavior_velocity_intersection_module/src
1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -58,11 +58,19 @@ IntersectionModule::getOcclusionStatus(
58
58
(traffic_prioritized_level == TrafficPrioritizedLevel::PARTIALLY_PRIORITIZED) ||
59
59
(traffic_prioritized_level == TrafficPrioritizedLevel::FULLY_PRIORITIZED) || no_tl_info_ever;
60
60
// check occlusion on detection lane
61
- auto occlusion_status =
62
- (planner_param_.occlusion .enable && !occlusion_attention_lanelets.empty () &&
63
- !is_amber_or_red_or_no_tl_info_ever)
64
- ? detectOcclusion (interpolated_path_info)
65
- : OcclusionType::NOT_OCCLUDED;
61
+ auto occlusion_status = [&]() {
62
+ if (!planner_param_.occlusion .enable || occlusion_attention_lanelets.empty ()) {
63
+ return OcclusionType::NOT_OCCLUDED;
64
+ }
65
+ if (!has_traffic_light_) {
66
+ return detectOcclusion (interpolated_path_info);
67
+ }
68
+ // has_traffic_light_
69
+ if (is_amber_or_red_or_no_tl_info_ever) {
70
+ return OcclusionType::NOT_OCCLUDED;
71
+ }
72
+ return detectOcclusion (interpolated_path_info);
73
+ }();
66
74
occlusion_stop_state_machine_.setStateWithMarginTime (
67
75
occlusion_status == OcclusionType::NOT_OCCLUDED ? StateMachine::State::GO : StateMachine::STOP,
68
76
logger_.get_child (" occlusion_stop" ), *clock_);
You can’t perform that action at this time.
0 commit comments