Class Service

Nested Relationships

Nested Types

Class Documentation

class Service

Service concept interface.

Note

this defines an private concept struct, which each instance has to implement

Note

a type erasure pattern in implemented here to avoid strict inheritance, thus each possible service instance has to implement the virtual functions mentioned in the concept

Public Functions

template<typename T>
inline Service(T srv)

Constructor for service interface.

inline void reset(rclcpp::Node *node)

initializes/resets the service into ROS with a given node, this will be called at first for initialization

Parameters:

node – rclcpp::Node pointer used to create the service

inline std::string name() const

getting the descriptive name for this service instance

Returns:

string with the name

inline std::string topic() const

getting the topic to service on

Returns:

string indicating the topic