1#ifndef MRS_LIB_PUBLISHER_HPP_
2#define MRS_LIB_PUBLISHER_HPP_
11#include <rclcpp/node_interfaces/node_clock_interface.hpp>
12#include <rclcpp/node_interfaces/node_interfaces.hpp>
13#include <rclcpp/node_interfaces/node_logging_interface.hpp>
14#include <rclcpp/node_interfaces/node_topics_interface.hpp>
26 rclcpp::node_interfaces::NodeInterfaces<rclcpp::node_interfaces::NodeTopicsInterface, rclcpp::node_interfaces::NodeClockInterface,
27 rclcpp::node_interfaces::NodeLoggingInterface>;
35 rclcpp::QoS
qos = rclcpp::SystemDefaultsQoS();
46 template <
class MessageType>
66 void publish(
const MessageType& msg);
73 void publish(std::unique_ptr<MessageType> msg);
102#ifndef MRS_LIB_PUBLISHER_IMPL_HPP_
103#include "mrs_lib/publisher.impl.hpp"
Owning pointer wrapper with move only value semantics. Usefull for implementing the pointer to implem...
Definition pimpl.hpp:39
void publish(const MessageType &msg)
Publish a message.
Definition publisher.impl.hpp:123
std::string get_unresolved_topic_name() const
Returns the unresolved name of the topic handled by this publisher.
Definition publisher.impl.hpp:141
std::string get_topic_name() const
Returns the resolved (full) name of the topic handled by this publisher.
Definition publisher.impl.hpp:135
size_t get_subscriber_count() const
Get number of subscribers on the published topic.
Definition publisher.impl.hpp:147
Publisher(const PublisherOptions &options, std::string_view topic_name)
construct a publisher using the specified options.
Definition publisher.impl.hpp:118
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::NodeTopicsInterface, rclcpp::node_interfaces::NodeClockInterface, rclcpp::node_interfaces::NodeLoggingInterface > PublisherNodeInterfaces
ROS node interfaces required by the Publisher.
Definition publisher.hpp:25
Definition publisher.hpp:31
rclcpp::QoS qos
QOS settings for the publisher.
Definition publisher.hpp:35
PublisherNodeInterfaces node_interfaces
ROS node interfaces used by the publisher.
Definition publisher.hpp:33
std::optional< std::chrono::nanoseconds > throttle_duration
If set, the publisher drops messages so that the average output rate does not exceed 1/throttle_durat...
Definition publisher.hpp:38