From 8f53e69fd4772404347881a5b045bd8ac20358e4 Mon Sep 17 00:00:00 2001 From: Guillaume Doisy Date: Mon, 9 Aug 2021 10:32:04 +0200 Subject: [PATCH] Accept path of length 1 --- nav2_smac_planner/src/a_star.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nav2_smac_planner/src/a_star.cpp b/nav2_smac_planner/src/a_star.cpp index cd09cc79432..4a483c0c6b6 100644 --- a/nav2_smac_planner/src/a_star.cpp +++ b/nav2_smac_planner/src/a_star.cpp @@ -329,7 +329,7 @@ bool AStarAlgorithm::backtracePath(NodePtr node, CoordinateVector & path current_node = current_node->parent; } - return path.size() > 1; + return path.size() > 0; } template @@ -346,7 +346,7 @@ bool AStarAlgorithm::backtracePath(NodePtr node, CoordinateVector & path) current_node = current_node->parent; } - return path.size() > 1; + return path.size() > 0; } template