File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
nav2_behavior_tree/plugins/decorator Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -34,9 +34,9 @@ bool PathLongerOnApproach::isPathUpdated(
3434 nav_msgs::msg::Path & new_path,
3535 nav_msgs::msg::Path & old_path)
3636{
37- return new_path != old_path && old_path.poses .size () != 0 &&
38- new_path.poses .size () != 0 &&
39- old_path.poses .back ().pose == new_path.poses .back ().pose ;
37+ return old_path.poses .size () != 0 &&
38+ new_path.poses .size () != 0 && new_path. poses . size () > old_path. poses . size () &&
39+ old_path.poses .back ().pose . position == new_path.poses .back ().pose . position ;
4040}
4141
4242bool PathLongerOnApproach::isRobotInGoalProximity (
@@ -64,7 +64,7 @@ inline BT::NodeStatus PathLongerOnApproach::tick()
6464
6565 if (first_time_ == false ) {
6666 if (old_path_.poses .empty () || new_path_.poses .empty () ||
67- old_path_.poses .back () != new_path_.poses .back ())
67+ old_path_.poses .back (). pose != new_path_.poses .back (). pose )
6868 {
6969 first_time_ = true ;
7070 }
You can’t perform that action at this time.
0 commit comments