@@ -354,8 +354,18 @@ intersection::DecisionResult IntersectionModule::modifyPathVelocityDetail(
354
354
: false ;
355
355
if (!has_traffic_light_) {
356
356
if (fromEgoDist (occlusion_wo_tl_pass_judge_line_idx) < 0 ) {
357
- return intersection::InternalError{
358
- " already passed maximum peeking line in the absence of traffic light" };
357
+ if (has_collision) {
358
+ const auto closest_idx = intersection_stoplines.closest_idx ;
359
+ const std::string evasive_diag = generateEgoRiskEvasiveDiagnosis (
360
+ *path, closest_idx, time_distance_array, too_late_detect_objects, misjudge_objects);
361
+ return intersection::OverPassJudge{
362
+ " already passed maximum peeking line in the absence of traffic light.\n " +
363
+ safety_report,
364
+ evasive_diag};
365
+ }
366
+ return intersection::OverPassJudge{
367
+ " already passed maximum peeking line in the absence of traffic light safely" ,
368
+ " no evasive action required" };
359
369
}
360
370
return intersection::OccludedAbsenceTrafficLight{
361
371
is_occlusion_cleared_with_margin,
@@ -364,7 +374,7 @@ intersection::DecisionResult IntersectionModule::modifyPathVelocityDetail(
364
374
closest_idx,
365
375
first_attention_stopline_idx,
366
376
occlusion_wo_tl_pass_judge_line_idx,
367
- safety_report };
377
+ safety_diag };
368
378
}
369
379
370
380
// ==========================================================================================
@@ -1251,7 +1261,22 @@ IntersectionModule::PassJudgeStatus IntersectionModule::isOverPassJudgeLinesStat
1251
1261
return first_pass_judge_line_idx;
1252
1262
}();
1253
1263
1254
- const bool was_safe = std::holds_alternative<intersection::Safe>(prev_decision_result_);
1264
+ // ==========================================================================================
1265
+ // at intersection without traffic light, this module ignores occlusion even if occlusion is
1266
+ // detected for real, so if collision is not detected in that context, that should be interpreted
1267
+ // as "was_safe"
1268
+ // ==========================================================================================
1269
+ const bool was_safe = [&]() {
1270
+ if (std::holds_alternative<intersection::Safe>(prev_decision_result_)) {
1271
+ return true ;
1272
+ }
1273
+ if (std::holds_alternative<intersection::OccludedAbsenceTrafficLight>(prev_decision_result_)) {
1274
+ const auto & state =
1275
+ std::get<intersection::OccludedAbsenceTrafficLight>(prev_decision_result_);
1276
+ return !state.collision_detected ;
1277
+ }
1278
+ return false ;
1279
+ }();
1255
1280
1256
1281
const bool is_over_1st_pass_judge_line =
1257
1282
util::isOverTargetIndex (path, closest_idx, current_pose, pass_judge_line_idx);
0 commit comments