Skip to content

Commit

Permalink
add error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
h-ohta committed Oct 12, 2023
1 parent 8d7470d commit e6bb777
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions planning/obstacle_avoidance_planner/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,9 @@ void ObstacleAvoidancePlanner::calcVelocity(
const std::vector<autoware_auto_planning_msgs::msg::PathPoint> & path_points,
std::vector<autoware_auto_planning_msgs::msg::TrajectoryPoint> & 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(
Expand Down

0 comments on commit e6bb777

Please sign in to comment.