From 0f28aab19970aaf4684b71dfc4fe82c0e05465f4 Mon Sep 17 00:00:00 2001 From: "tomoya.kimura" Date: Tue, 22 Feb 2022 19:57:01 +0900 Subject: [PATCH] fix(behavior_path_planner): fix utility function Signed-off-by: tomoya.kimura --- planning/behavior_path_planner/src/utilities.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planning/behavior_path_planner/src/utilities.cpp b/planning/behavior_path_planner/src/utilities.cpp index 51a05797e4c34..bdaa5adae8bb0 100644 --- a/planning/behavior_path_planner/src/utilities.cpp +++ b/planning/behavior_path_planner/src/utilities.cpp @@ -484,7 +484,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"),