Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
  • Loading branch information
soblin committed Feb 6, 2024
1 parent 0b90a97 commit 80a271f
Showing 1 changed file with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,19 @@ IntersectionModule::getOcclusionStatus(
(traffic_prioritized_level == TrafficPrioritizedLevel::PARTIALLY_PRIORITIZED) ||
(traffic_prioritized_level == TrafficPrioritizedLevel::FULLY_PRIORITIZED) || no_tl_info_ever;
// check occlusion on detection lane
auto occlusion_status =
(planner_param_.occlusion.enable && !occlusion_attention_lanelets.empty() &&
!is_amber_or_red_or_no_tl_info_ever)
? detectOcclusion(interpolated_path_info)
: OcclusionType::NOT_OCCLUDED;
auto occlusion_status = [&]() {
if (!planner_param_.occlusion.enable || occlusion_attention_lanelets.empty()) {
return OcclusionType::NOT_OCCLUDED;
}
if (!has_traffic_light_) {
return detectOcclusion(interpolated_path_info);
}
// has_traffic_light_
if (is_amber_or_red_or_no_tl_info_ever) {
return OcclusionType::NOT_OCCLUDED;
}
return detectOcclusion(interpolated_path_info);
}();
occlusion_stop_state_machine_.setStateWithMarginTime(
occlusion_status == OcclusionType::NOT_OCCLUDED ? StateMachine::State::GO : StateMachine::STOP,
logger_.get_child("occlusion_stop"), *clock_);
Expand Down

0 comments on commit 80a271f

Please sign in to comment.