30template <
typename ServiceType>
44 RCLCPP_ERROR(
getLogger(),
"service client with no service name set. Skipping.");
49 getLogger(),
"[" << this->
getName() <<
"] Client Service: " << *serviceName_);
56 std::shared_ptr<typename ServiceType::Response>
call(
57 std::shared_ptr<typename ServiceType::Request> & request)
59 auto result =
client_->async_send_request(request);
66 std::shared_ptr<rclcpp::Client<ServiceType>>
client_;
rclcpp::Node::SharedPtr getNode()
virtual std::string getName() const
rclcpp::Logger getLogger()
std::shared_ptr< rclcpp::Client< ServiceType > > client_
std::shared_ptr< typename ServiceType::Response > call(std::shared_ptr< typename ServiceType::Request > &request)
std::optional< std::string > serviceName_
void onInitialize() override