From 37903100b76a756d209884fcc5ad4f74d8f224b4 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 --- .../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 fb22b38b248..49ff2cb010a 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) {