From 8abe6874b6e0992834bdb2ad876d13ef94641f01 Mon Sep 17 00:00:00 2001 From: Chortine <107395103+Chortine@users.noreply.github.com> Date: Sat, 2 Mar 2024 01:24:30 +0800 Subject: [PATCH] bug fix (#4160) Signed-off-by: Tianchu (cherry picked from commit 623434b09f25afac3872411b8fda786a6f6dce95) --- .../include/nav2_mppi_controller/tools/utils.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/nav2_mppi_controller/include/nav2_mppi_controller/tools/utils.hpp b/nav2_mppi_controller/include/nav2_mppi_controller/tools/utils.hpp index a31ce89105..9d8c49a9cf 100644 --- a/nav2_mppi_controller/include/nav2_mppi_controller/tools/utils.hpp +++ b/nav2_mppi_controller/include/nav2_mppi_controller/tools/utils.hpp @@ -314,6 +314,7 @@ inline size_t findPathFurthestReachedPoint(const CriticData & data) for (size_t i = 0; i < dists.shape(0); i++) { min_id_by_path = 0; + min_distance_by_path = std::numeric_limits::max(); for (size_t j = 0; j < dists.shape(1); j++) { cur_dist = dists(i, j); if (cur_dist < min_distance_by_path) {