Class Publisher
Defined in File publisher.hpp
Nested Relationships
Nested Types
Class Documentation
-
class Publisher
Publisher 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 publisher instance has to implement the virtual functions mentioned in the concept
Public Functions
-
inline bool isInitialized() const
checks if the publisher is correctly initialized on the ros-master @
- Returns:
bool value indicating true for success
-
inline bool isSubscribed() const
checks if the publisher has a subscription and is hence allowed to publish
- Returns:
bool value indicating true for number of sub > 0
-
inline void reset(rclcpp::Node *node)
initializes/resets the publisher into ROS with a given Node object, this will be called at first for initialization
- Parameters:
node – rclcpp::Node pointer from which the publisher is created
-
inline std::string topic() const
getting the topic to publish on
- Returns:
string indicating the topic
-
inline bool isInitialized() const