-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Waypoint follower action server aborts goal upon reaching it after cancelling one before #3129
Comments
I see what you mean. I added logs to check on the goal IDs and it looks like when we cancel, the previous goals' result is returned in the There could be something subtle wrong with the WP Follower though, since I don't see this kind of behavior anywhere else. It seems like the other servers based on the simple action server are working properly. I do see however when we set So I think a couple of options:
|
#3130 Solved it (2nd suggestion above) |
Thanks! |
The issue is still happening @SteveMacenski . I think you missed a Update: Done in #3139 |
Bug report
Required Info:
Steps to reproduce issue
Get the latest binaries of ROS2 humble and nav2 on Ubuntu Jammy (I can share my Dockerfile if that would be of any value). Launch the default turtlebot world using these params (they are basically the same default parameters but setting
stop_on_failure
for the waypoint follower totrue
). I.e:ros2 launch nav2_bringup tb3_simulation_launch.py params_file:=<path_to_the_params>
:Then run the following python script. It uses the
nav2_simple_commander
API to send some goals to the robot, it cancels the first goal after 5 seconds and then sends the same goals again. What I'm seeing is that after the cancellation, when reaching the first waypoint on the second call of the action server the navigation is aborted.Expected behavior
When cancelling the
follow_waypoints
action server and sending new goals they should be executed without problemsActual behavior
After cancelling the
follow_waypoints
action server the navigation is aborted upon reaching a new goal.Additional information
I have conducted some investigation and gathered some insights on what may be the cause:
I understand that the
follow_waypoints
action server successively calls thenavigate_to_pose
action server with each of the waypoints that it receives in this loop. This block handles the cancellation event sent by thefollow_waypoints
client by cancelling thenavigate_to_pose
action and then spinning the executor to make sure that the navigation was actually cancelled. Thenavigate_to_pose
server then should send a result that should be handled by this callback, which should be spinned here, however this callback does not seem to be spinned until a new result is sent by thenavigate_to_pose
server, which happens precisely when a waypoint is reached on the navigation task sent after the cancellation. This should be asuccess
result, but what the callback seems to be receiving instead is the cancelled status from the previous cancellation.I have tried spinning the executor on different places without success. This seems weird since it is spun continuously anyway on the
while
loop here.I would be happy to keep reviewing this issue if someone could point me in the right direction. Also I have had a hard time debugging the action servers so I would really appreciate if you could share the tools you use for this (breakpoints and gdb have not been that useful because things do not happen sequentially).
The text was updated successfully, but these errors were encountered: