Skip to content

Commit

Permalink
fix(obstacle_avoidance_planner): add guard for empty points array to …
Browse files Browse the repository at this point in the history
…prevent dying (autowarefoundation#2557)

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
  • Loading branch information
tkimura4 authored Dec 26, 2022
1 parent 8f6ae1b commit 773ef53
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions planning/obstacle_avoidance_planner/src/eb_path_optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ EBPathOptimizer::getOptimizedTrajectory(
interpolated_points = std::vector<geometry_msgs::msg::Point>(
interpolated_points.begin(),
interpolated_points.begin() + interpolated_points_end_seg_idx.get());
if (interpolated_points.empty()) {
return boost::none;
}
}
}

Expand Down

0 comments on commit 773ef53

Please sign in to comment.