rclcpp
master
C++ ROS Client Library API
|
Go to the documentation of this file.
15 #ifndef RCLCPP__PUBLISHER_OPTIONS_HPP_
16 #define RCLCPP__PUBLISHER_OPTIONS_HPP_
22 #include "rcl/publisher.h"
56 template<
typename Allocator>
70 template<
typename MessageT>
76 using MessageAllocatorT =
typename AllocatorTraits::template rebind_alloc<MessageT>;
77 auto message_alloc = std::make_shared<MessageAllocatorT>(*this->
get_allocator().get());
78 result.
allocator = rclcpp::allocator::get_rcl_allocator<MessageT>(*message_alloc);
94 if (!this->allocator) {
110 #endif // RCLCPP__PUBLISHER_OPTIONS_HPP_
rmw_publisher_options_t rmw_publisher_options
@ NodeDefault
Take intraprocess configuration from the node.
rmw_qos_profile_t & get_rmw_qos_profile()
Return the rmw qos profile.
Non-templated part of PublisherOptionsWithAllocator<Allocator>.
Definition: publisher_options.hpp:36
rcl_publisher_options_t to_rcl_publisher_options(const rclcpp::QoS &qos) const
Convert this class, and a rclcpp::QoS, into an rcl_publisher_options_t.
Definition: publisher_options.hpp:72
Contains callbacks for various types of events a Publisher can receive from the middleware.
Definition: qos_event.hpp:49
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
std::shared_ptr< rclcpp::CallbackGroup > callback_group
Callback group in which the waitable items from the publisher should be placed.
Definition: publisher_options.hpp:48
Encapsulation of Quality of Service settings.
Definition: qos.hpp:59
IntraProcessSetting use_intra_process_comm
Setting to explicitly set intraprocess communications.
Definition: publisher_options.hpp:39
CallbackGroup CallbackGroup
Definition: callback_group.hpp:166
IntraProcessSetting
Used as argument in create_publisher and create_subscriber.
Definition: intra_process_setting.hpp:22
bool use_default_callbacks
Whether or not to use default callbacks when user doesn't supply any in event_callbacks.
Definition: publisher_options.hpp:45
PublisherEventCallbacks event_callbacks
Callbacks for various events related to publishers.
Definition: publisher_options.hpp:42
std::shared_ptr< Allocator > allocator
Optional custom allocator.
Definition: publisher_options.hpp:60
Structure containing optional configuration for Publishers.
Definition: publisher_options.hpp:57
std::shared_ptr< rclcpp::detail::RMWImplementationSpecificPublisherPayload > rmw_implementation_payload
Optional RMW implementation specific payload to be used during creation of the publisher.
Definition: publisher_options.hpp:52
PublisherOptionsWithAllocator(const PublisherOptionsBase &publisher_options_base)
Constructor using base class as input.
Definition: publisher_options.hpp:65
std::shared_ptr< Allocator > get_allocator() const
Get the allocator, creating one if needed.
Definition: publisher_options.hpp:92
rcl_allocator_t allocator