1#ifndef MRS_LIB_SERVICE_SERVER_HPP_
2#define MRS_LIB_SERVICE_SERVER_HPP_
8#include <rclcpp/callback_group.hpp>
9#include <rclcpp/node_interfaces/node_base_interface.hpp>
10#include <rclcpp/node_interfaces/node_clock_interface.hpp>
11#include <rclcpp/node_interfaces/node_interfaces.hpp>
12#include <rclcpp/node_interfaces/node_logging_interface.hpp>
13#include <rclcpp/node_interfaces/node_services_interface.hpp>
14#include <rclcpp/qos.hpp>
26 rclcpp::node_interfaces::NodeInterfaces<rclcpp::node_interfaces::NodeServicesInterface, rclcpp::node_interfaces::NodeBaseInterface,
27 rclcpp::node_interfaces::NodeLoggingInterface, rclcpp::node_interfaces::NodeClockInterface>;
38 rclcpp::QoS
qos = rclcpp::ServicesQoS();
48 template <
class ServiceType>
53 using Request = ServiceType::Request;
54 using Response = ServiceType::Response;
58 using ServiceCallback = std::function<void(std::shared_ptr<const Request> req, std::shared_ptr<Response>)>;
102#ifndef MRS_LIB_SERVICE_SERVER_IMPL_HPP_
103#include "mrs_lib/service_server.impl.hpp"
Base template for CoroCallback.
Definition callback.hpp:166
Owning pointer wrapper with move only value semantics. Usefull for implementing the pointer to implem...
Definition pimpl.hpp:39
std::string get_unresolved_service_name() const
Returns the unresolved name of the service handled by this service server.
Definition service_server.impl.hpp:123
ServiceServer(const ServiceServerOptions &options, std::string_view service_name, ServiceCallback callback)
Construct the service server with the specified callback.
Definition service_server.impl.hpp:105
CoroCallback< void(std::shared_ptr< const Request > req, std::shared_ptr< Response >)> ServiceCoroCallback
Type of the accepted coroutine callback.
Definition service_server.hpp:61
std::string get_service_name() const
Returns the resolved (full) name of the service handled by this service server.
Definition service_server.impl.hpp:117
std::function< void(std::shared_ptr< const Request > req, std::shared_ptr< Response >)> ServiceCallback
Type of the accepted callback.
Definition service_server.hpp:58
All mrs_lib functions, classes, variables and definitions are contained in this namespace.
Definition attitude_converter.h:24
rclcpp::node_interfaces::NodeInterfaces< rclcpp::node_interfaces::NodeServicesInterface, rclcpp::node_interfaces::NodeBaseInterface, rclcpp::node_interfaces::NodeLoggingInterface, rclcpp::node_interfaces::NodeClockInterface > ServiceServerNodeInterfaces
ROS node interfaces required by the ServiceServer.
Definition service_server.hpp:25
Options for configuring the ServiceServer.
Definition service_server.hpp:33
rclcpp::QoS qos
QOS settings for the service server.
Definition service_server.hpp:38
std::shared_ptr< rclcpp::CallbackGroup > callback_group
ROS callback group used by the service server callbacks.
Definition service_server.hpp:40
ServiceServerNodeInterfaces node_interfaces
ROS node interfaces used by the service server.
Definition service_server.hpp:35