Skip to content

Commit

Permalink
fix(start_planner): use non shifted path is shift line idx invalid (#…
Browse files Browse the repository at this point in the history
…4227)

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
  • Loading branch information
zulfaqar-azmi-t4 authored Jul 11, 2023
1 parent b8374ec commit 7bc034a
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,13 @@ std::vector<PullOutPath> ShiftPullOut::calcPullOutPaths(
path_shifter.setLongitudinalAcceleration(longitudinal_acc);
path_shifter.setLateralAccelerationLimit(lateral_acc);

const auto shift_line_idx = path_shifter.getShiftLines().front();
if (!has_non_shifted_path && (shift_line_idx.end_idx - shift_line_idx.start_idx <= 1)) {
candidate_paths.push_back(non_shifted_path);
has_non_shifted_path = true;
continue;
}

// offset front side
ShiftedPath shifted_path;
const bool offset_back = false;
Expand Down

0 comments on commit 7bc034a

Please sign in to comment.