Template Function rclcpp::create_generic_client(NodeT, const std::string&, const std::string&, const rclcpp::QoS&, rclcpp::CallbackGroup::SharedPtr)
Defined in File create_generic_client.hpp
Function Documentation
-
template<typename NodeT>
rclcpp::GenericClient::SharedPtr rclcpp::create_generic_client(NodeT node, const std::string &service_name, const std::string &service_type, const rclcpp::QoS &qos = rclcpp::ServicesQoS(), rclcpp::CallbackGroup::SharedPtr group = nullptr) Create a generic service client with a name of given type.
The NodeT type needs to have NodeBaseInterface implementation, NodeGraphInterface implementation and NodeServicesInterface implementation of the node which to create the client.
- Parameters:
node – [in] The node on which to create the client.
service_name – [in] The name on which the service is accessible.
service_type – [in] The name of service type, e.g. “test_msgs/srv/BasicTypes”
qos – [in] Quality of service profile for client.
group – [in] Callback group to handle the reply to service calls.
- Returns:
Shared pointer to the created client.