53int main(
int argc,
char** argv)
55 rclcpp::init(argc, argv);
56 rclcpp::NodeOptions node_options;
57 auto node = rclcpp::Node::make_shared(
"action_server_cancellation",
"", node_options);
59 rclcpp_action::Client<HPAction>::SharedPtr client_ptr =
60 rclcpp_action::create_client<HPAction>(node,
"/test/hybrid_planning/run_hybrid_planning");
61 if (!client_ptr->wait_for_action_server(std::chrono::seconds(5)))
63 RCLCPP_ERROR(node->get_logger(),
"Action server not available after waiting");
66 client_ptr->async_cancel_all_goals();
67 RCLCPP_ERROR(node->get_logger(),
"Cancellation was requested.");