Template Class ROSServiceWrapper
Defined in File system_ros_interface.hpp
Class Documentation
-
template<typename SrvT, typename CallbackT>
class ROSServiceWrapper A wrapper class for ROS services that simplifies the creation and management of a service server.
- Template Parameters:
SrvT – The type of the service message, derived from a .srv file by the ROS build system.
CallbackT – The type of the callback function to be invoked on service request. Currently supported callback function signatures include void() and void(bool).
Public Types
Public Functions
-
inline ROSServiceWrapper(const CallbackT &callback)
Constructs a ROSServiceWrapper object with the specified callback function.
- Parameters:
callback – The callback function to be called whenever the service receives a request. Currently supported callback function signatures include void() and void(bool).
Register and advertises the service with the specified name under the given ROS node.
- Parameters:
node – The shared pointer to the ROS node under which the service will be advertised.
service_name – The name of the service. This is the name under which the service will be advertised over ROS.
group – The shared pointer to the node’s callback group. Defaults to nullptr, which indicates that the node’s default callback group will be used.
qos – The QoS settings for the service. Defaults to ServicesQoS.