Skip to content

Commit

Permalink
fix(behavior_velocity): handle the case when finding index failed (au…
Browse files Browse the repository at this point in the history
…towarefoundation#746)

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>
  • Loading branch information
TomohitoAndo committed May 14, 2022
1 parent 20d68fd commit b888356
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ inline bool smoothPath(
// Resample trajectory with ego-velocity based interval distances
auto traj_resampled = smoother->resampleTrajectory(traj_with_ego_point_on_path, v0, nearest_idx);
const auto traj_resampled_closest = findNearestIndex(*traj_resampled, current_pose, max, M_PI_4);
if (!traj_resampled_closest) {
return false;
}
std::vector<TrajectoryPoints> debug_trajectories;
// Clip trajectory from closest point
TrajectoryPoints clipped;
Expand Down

0 comments on commit b888356

Please sign in to comment.