15 #ifndef RCLCPP__CREATE_GENERIC_PUBLISHER_HPP_
16 #define RCLCPP__CREATE_GENERIC_PUBLISHER_HPP_
22 #include "rclcpp/generic_publisher.hpp"
23 #include "rclcpp/node_interfaces/node_topics_interface.hpp"
24 #include "rclcpp/publisher_options.hpp"
25 #include "rclcpp/qos.hpp"
26 #include "rclcpp/typesupport_helpers.hpp"
44 template<
typename AllocatorT = std::allocator<
void>>
46 rclcpp::node_interfaces::NodeTopicsInterface::SharedPtr topics_interface,
47 const std::string & topic_name,
48 const std::string & topic_type,
56 auto pub = std::make_shared<GenericPublisher>(
57 topics_interface->get_node_base_interface(),
63 topics_interface->add_publisher(pub, options.callback_group);
Encapsulation of Quality of Service settings.
Versions of rosidl_typesupport_cpp::get_message_type_support_handle that handle adapted types.
RCLCPP_PUBLIC std::shared_ptr< rcpputils::SharedLibrary > get_typesupport_library(const std::string &type, const std::string &typesupport_identifier)
Load the type support library for the given type.
std::shared_ptr< GenericPublisher > create_generic_publisher(rclcpp::node_interfaces::NodeTopicsInterface::SharedPtr topics_interface, const std::string &topic_name, const std::string &topic_type, const rclcpp::QoS &qos, const rclcpp::PublisherOptionsWithAllocator< AllocatorT > &options=(rclcpp::PublisherOptionsWithAllocator< AllocatorT >()))
Create and return a GenericPublisher.
Structure containing optional configuration for Publishers.