diff --git a/nav2_smac_planner/src/a_star.cpp b/nav2_smac_planner/src/a_star.cpp index cd09cc7943..4a483c0c6b 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