15 #ifndef RCLCPP__CREATE_PUBLISHER_HPP_ 16 #define RCLCPP__CREATE_PUBLISHER_HPP_ 57 auto pub = node_topics->create_publisher(
59 rclcpp::create_publisher_factory<MessageT, AllocatorT, PublisherT>(options),
64 node_topics->add_publisher(pub, options.callback_group);
71 #endif // RCLCPP__CREATE_PUBLISHER_HPP_
std::shared_ptr< PublisherT > create_publisher(NodeT &node, const std::string &topic_name, const rclcpp::QoS &qos, const rclcpp::PublisherOptionsWithAllocator< AllocatorT > &options=(rclcpp::PublisherOptionsWithAllocator< AllocatorT >()))
Create and return a publisher of the given MessageT type.
Definition: create_publisher.hpp:43
Encapsulation of Quality of Service settings.
Definition: qos.hpp:55
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
A publisher publishes messages of any type to a topic.
Definition: publisher.hpp:51
T dynamic_pointer_cast(T... args)
rclcpp::node_interfaces::NodeTopicsInterface * get_node_topics_interface(NodeType node_pointer)
Get the NodeTopicsInterface as a pointer from a pointer to a "Node like" object.
Definition: get_node_topics_interface.hpp:126