Template Function rclcpp_action::create_server(rclcpp::node_interfaces::NodeBaseInterface::SharedPtr, rclcpp::node_interfaces::NodeClockInterface::SharedPtr, rclcpp::node_interfaces::NodeLoggingInterface::SharedPtr, rclcpp::node_interfaces::NodeWaitablesInterface::SharedPtr, const std::string&, typename Server<ActionT>::GoalCallback, typename Server<ActionT>::CancelCallback, typename Server<ActionT>::AcceptedCallback, const rcl_action_server_options_t&, rclcpp::CallbackGroup::SharedPtr)
Defined in File create_server.hpp
Function Documentation
-
template<typename ActionT>
Server<ActionT>::SharedPtr rclcpp_action::create_server(rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_base_interface, rclcpp::node_interfaces::NodeClockInterface::SharedPtr node_clock_interface, rclcpp::node_interfaces::NodeLoggingInterface::SharedPtr node_logging_interface, rclcpp::node_interfaces::NodeWaitablesInterface::SharedPtr node_waitables_interface, const std::string &name, typename Server<ActionT>::GoalCallback handle_goal, typename Server<ActionT>::CancelCallback handle_cancel, typename Server<ActionT>::AcceptedCallback handle_accepted, const rcl_action_server_options_t &options = rcl_action_server_get_default_options(), rclcpp::CallbackGroup::SharedPtr group = nullptr) Create an action server.
All provided callback functions must be non-blocking. This function is equivalent to
See also
create_server()` however is using the individual node interfaces to create the server.
See also
Server::Server() for more information.
- Parameters:
node_base_interface – [in] The node base interface of the corresponding node.
node_clock_interface – [in] The node clock interface of the corresponding node.
node_logging_interface – [in] The node logging interface of the corresponding node.
node_waitables_interface – [in] The node waitables interface of the corresponding node.
name – [in] The action name.
handle_goal – [in] A callback that decides if a goal should be accepted or rejected.
handle_cancel – [in] A callback that decides if a goal should be attempted to be canceled. The return from this callback only indicates if the server will try to cancel a goal. It does not indicate if the goal was actually canceled.
handle_accepted – [in] A callback that is called to give the user a handle to the goal.
options – [in] Options to pass to the underlying
rcl_action_server_t
.group – [in] The action server will be added to this callback group. If
nullptr
, then the action server is added to the default callback group.