Skip to content

Commit

Permalink
Merge pull request #53 from umdlife/main_umd
Browse files Browse the repository at this point in the history
Fix cancel goal with empty goal handle
  • Loading branch information
facontidavide committed Apr 10, 2024
2 parents ce923e1 + bd15f2f commit b82d850
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,12 @@ template<class T> inline
template<class T> inline
void RosActionNode<T>::cancelGoal()
{
if (!goal_handle_)
{
RCLCPP_WARN( node_->get_logger(), "cancelGoal called on an empty goal_handle");
return;
}

auto future_result = action_client_->async_get_result(goal_handle_);
auto future_cancel = action_client_->async_cancel_goal(goal_handle_);

Expand Down

0 comments on commit b82d850

Please sign in to comment.