-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
follow_path action keeps on running after having canceled the goal #4659
Comments
That occurs here [1], so the server timeout doesn't cancel the action in time. If you were to set this to say - 1 second - does that remove your issue? Also, what so you have your It looks like this condition was added in [2] and may need to (generally speaking) have a longer timeout than the server timeout proportional to steady-state BT node ticking. If we're halting / exiting out a BT, we may find it better to have the rate exceeded a bit in exchange for a more realistic chance of those actions being canceled successfully.
This is definitely why. If you have a server timeout of 10ms and you've just started a planning request that is 100ms in length, then it won't always cancel in time. We added a cancel checker [3] in the Planner API so that we query in the planning loop if a cancel is requested to be more responsive, but that is not backported to Iron and you'll need to upgrade to Jazzy to receive that. That actually by itself might completely fix your issue. [1]
[2] bfb4506 |
@milidam have you had a chance to look into these items? I'd love to get feedback on the precise nature of it to write up a solution for you to test |
Hi @SteveMacenski, Our planner's Note that migration to Jazzy is planned, but not yet started. |
Do you know when you would be able to? If you increased that to 500ms or 1s and it went away for Follow Path, that could be something we could replace that spin with since that cancel should only happen when halting an entire tree on task exit (which keeping the 10ms tick rate is unnecessary)
If you haven't upgraded, I think so. This is why I want you to check for me :-) But that shouldn't impact the follow path action, just computing path to pose -- since canceling path planning that is mid-execution is only supported in Jazzy and newer. |
@milidam any updates? It sounds like the issue is fixed in Jazzy and Iron is now EOL |
From the terminal output shared by the OP, follow_path BT action node never cancel the current goal. This may be because of the following sequence of events:
Should we add a call to cancel goal before we return failure here? Since we never get a valid navigation2/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_node.hpp Lines 209 to 228 in 34d41ed
If we do not properly cancel the follow_path action here and if we have any other recovery mechanism for example DriveOnHeading, we would have two nodes publishing to the |
That's not the only
This is true either way, yes!
True, but we use the
Definitely if we do something like that using the other 2 cancel goal APIs would be discouraged because it is a sludge hammer when we want something more targeted. In this situation is navigation2/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_node.hpp Lines 209 to 228 in 34d41ed
|
I have a similar issue. I use the Increasing Example of full output (this repeats for a while):
I also have a similar issue with |
Did you read over the thread above and determine if that is an issue for you, or just increasing the timeout is sufficient? What compute platform / ROS 2 distribution are you on? |
I am running on Jazzy on Gazebo simulation, on a laptop with i7-12700H. Currently using the higher timeout seems to be working, but it does mean many nodes may run slower than the BT tick frequency. I am not sure how big of an issue it is, but it does not sound correct. I did read the thread, my intention was to support the idea of either using spin for the action cancellation, or better yet supporting a configurable timeout for cancellation different than the "normal" one. |
Bug report
Required Info:
Steps to reproduce issue
In some cases, the
follow_path
action keeps on running after having canceled anavigate_to_pose
goal.Expected behavior
After canceling the
navigate_to_pose
goal, we would expect thecontroller_server
to properly interrupt itsfollow_path
action.Actual behavior
The
bt_navigator
gets aFailed to get result for compute_path_to_pose in node halt!
or aFailed to get result for follow_path in node halt!
error, and thecontroller_server
keeps on trying to follow the last received path.Additional information
In the case reported above, before that new instance of the
Starting path following
, in a previous attempt in the same instance of thenavigate_to_pose
behavior tree, thebt_navigator
already encountered the following errorwhat could indicate that the
bt_navigator
might somehow be desynchronized with thecontroller_server
?Also, the map is quite big, and the
planner_server
takes some time to compute a path. The goal canceling occurred while thecompute_path_to_pose
action was still running.The text was updated successfully, but these errors were encountered: