diff --git a/nav2_behavior_tree/plugins/decorator/path_longer_on_approach.cpp b/nav2_behavior_tree/plugins/decorator/path_longer_on_approach.cpp index ca7a67d6421..1b7ac5c33f7 100644 --- a/nav2_behavior_tree/plugins/decorator/path_longer_on_approach.cpp +++ b/nav2_behavior_tree/plugins/decorator/path_longer_on_approach.cpp @@ -35,7 +35,7 @@ bool PathLongerOnApproach::isPathUpdated( nav_msgs::msg::Path & old_path) { return old_path.poses.size() != 0 && - new_path.poses.size() != 0 && new_path.poses.size() > old_path.poses.size() && + new_path.poses.size() != 0 && old_path.poses.back().pose.position == new_path.poses.back().pose.position; }