Skip to content

Commit

Permalink
if map stop_line is not available, use detection area stop_line
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 Sep 12, 2023
1 parent 58214f7 commit 791c67a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions planning/behavior_velocity_intersection_module/src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,13 @@ std::optional<IntersectionStopLines> generateIntersectionStopLines(

// (1) default stop line position on interpolated path
bool default_stop_line_valid = true;
int stop_idx_ip_int = 0;
int stop_idx_ip_int = -1;
if (const auto map_stop_idx_ip =
getStopLineIndexFromMap(interpolated_path_info, planner_data, 10.0);
map_stop_idx_ip) {
stop_idx_ip_int = static_cast<int>(map_stop_idx_ip.value()) - base2front_idx_dist;
} else {
}
if (stop_idx_ip_int < 0) {
stop_idx_ip_int = static_cast<size_t>(first_inside_detection_ip) - stop_line_margin_idx_dist -
base2front_idx_dist;
}
Expand Down

0 comments on commit 791c67a

Please sign in to comment.