diff --git a/planning/behavior_path_planner/src/utilities.cpp b/planning/behavior_path_planner/src/utilities.cpp index c04a5e32524af..ce9663e87ae73 100644 --- a/planning/behavior_path_planner/src/utilities.cpp +++ b/planning/behavior_path_planner/src/utilities.cpp @@ -307,7 +307,7 @@ bool lerpByTimeStamp(const PredictedPath & path, const double t_query, Pose * le return false; } - const double t_final = time_step.seconds() * static_cast(path.path.size()); + const double t_final = time_step.seconds() * static_cast(path.path.size() - 1); if (t_query > t_final) { RCLCPP_DEBUG_STREAM( rclcpp::get_logger("behavior_path_planner").get_child("utilities"),