-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
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.