Bug report
I guess there is some wrong with this line of code in https://github.com/ros-planning/navigation2/blob/main/nav2_util/include/nav2_util/simple_action_server.hpp#L577
The argument std::shared_ptr<rclcpp_action::ServerGoalHandle<ActionT>> handle should change to std::shared_ptr<rclcpp_action::ServerGoalHandle<ActionT>>& handle. Otherwise, the function terminate won't free the 'handle' correctly.
And if you send a wrong goal to a running action server as a pending goal, the code will terminate the pending goal with not free it. And then this function is_cancel_requested in https://github.com/ros-planning/navigation2/blob/main/nav2_util/include/nav2_util/simple_action_server.hpp#L449 will always return false cause the pending handle is not a nullptr.
Bug report
I guess there is some wrong with this line of code in https://github.com/ros-planning/navigation2/blob/main/nav2_util/include/nav2_util/simple_action_server.hpp#L577
The argument
std::shared_ptr<rclcpp_action::ServerGoalHandle<ActionT>> handleshould change tostd::shared_ptr<rclcpp_action::ServerGoalHandle<ActionT>>& handle. Otherwise, the functionterminatewon't free the 'handle' correctly.And if you send a wrong goal to a running action server as a pending goal, the code will terminate the pending goal with not free it. And then this function
is_cancel_requestedin https://github.com/ros-planning/navigation2/blob/main/nav2_util/include/nav2_util/simple_action_server.hpp#L449 will always return false cause the pending handle is not a nullptr.