diff --git a/planning/obstacle_avoidance_planner/src/node.cpp b/planning/obstacle_avoidance_planner/src/node.cpp index eb75fcbee9006..c5f642ebb7973 100644 --- a/planning/obstacle_avoidance_planner/src/node.cpp +++ b/planning/obstacle_avoidance_planner/src/node.cpp @@ -1093,6 +1093,9 @@ void ObstacleAvoidancePlanner::calcVelocity( const std::vector & path_points, std::vector & traj_points) const { + if (path_points.size() < 2) { + return; + } for (size_t i = 0; i < traj_points.size(); i++) { const size_t nearest_seg_idx = [&]() { const auto opt_seg_idx = tier4_autoware_utils::findNearestSegmentIndex(