-
Notifications
You must be signed in to change notification settings - Fork 23
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
Navigate to staging pose cannot be terminated #54
Comments
This seems correct to me. Please be more specific.
|
I'm sorry, let me explain. Later at the precise docking stage this is handled correctly in a loop: while (rclcpp::ok()) {
try {
// Approach the dock using control law
if (approachDock(dock, dock_pose)) {
...
}
// Cancelled, preempted, or shutting down (recoverable errors throw DockingException)
stashDockData(goal->use_dock_id, dock, false);
publishZeroVelocity();
docking_action_server_->terminate_all(result); And in // Stop if cancelled/preempted
if (checkAndWarnIfCancelled(docking_action_server_, "dock_robot") ||
checkAndWarnIfPreempted(docking_action_server_, "dock_robot"))
{
return false;
} But above for the navigation part we don't check so it doesn't terminate: navigator_->goToPose(
initial_staging_pose, rclcpp::Duration::from_seconds(goal->max_staging_time));
RCLCPP_INFO(get_logger(), "Successful navigation to staging pose"); |
Ohhh, ok. That is not what I thought you were going with this. That seems like a great idea then We can have a while loop for spinning the executor for a The only API change that should be required is passing Sound good? |
All right. I wrote the code, I'm gonna open the PR as soon as I've had the time to test. |
Terminate during navigation is not handled.
I think instead of the
spin_until_future_complete
here, there should be a loop that checks if the action was terminated (which has to be propagated from above).The text was updated successfully, but these errors were encountered: