rclcpp_lifecycle
master
C++ ROS Lifecycle Library API
|
Go to the documentation of this file.
15 #ifndef RCLCPP_LIFECYCLE__LIFECYCLE_PUBLISHER_HPP_
16 #define RCLCPP_LIFECYCLE__LIFECYCLE_PUBLISHER_HPP_
49 template<
typename MessageT,
typename Alloc = std::allocator<
void>>
62 rclcpp::node_interfaces::NodeBaseInterface * node_base,
63 const
std::
string & topic,
86 "Trying to publish message on the topic '%s', but the publisher is not activated",
106 "Trying to publish message on the topic '%s', but the publisher is not activated",
133 bool enabled_ =
false;
139 #endif // RCLCPP_LIFECYCLE__LIFECYCLE_PUBLISHER_HPP_
virtual void on_activate()
Definition: lifecycle_publisher.hpp:115
#define RCLCPP_WARN(logger,...)
const char * get_topic_name() const
Publisher(rclcpp::node_interfaces::NodeBaseInterface *node_base, const std::string &topic, const rclcpp::QoS &qos, const rclcpp::PublisherOptionsWithAllocator< AllocatorT > &options)
virtual bool is_activated()
Definition: lifecycle_publisher.hpp:127
base class with only
Definition: lifecycle_publisher.hpp:36
virtual ~LifecyclePublisherInterface()
Definition: lifecycle_publisher.hpp:39
#define RCLCPP_SMART_PTR_DEFINITIONS(...)
rclcpp::allocator::Deleter< MessageAlloc, MessageT > MessageDeleter
Definition: lifecycle_publisher.hpp:58
Definition: lifecycle_node.hpp:90
virtual void on_deactivate()
Definition: lifecycle_publisher.hpp:121
typename std::allocator_traits< Alloc >::template rebind_traits< T > AllocRebind
typename MessageAllocTraits::allocator_type MessageAlloc
Definition: lifecycle_publisher.hpp:57
virtual void publish(const MessageT &msg)
LifecyclePublisher publish function.
Definition: lifecycle_publisher.hpp:101
virtual void publish(std::unique_ptr< MessageT, MessageDeleter > msg)
LifecyclePublisher publish function.
Definition: lifecycle_publisher.hpp:81
typename std::conditional< std::is_same< typename std::allocator_traits< Alloc >::template rebind_alloc< T >, typename std::allocator< void >::template rebind< T >::other >::value, std::default_delete< T >, AllocatorDeleter< Alloc > >::type Deleter
~LifecyclePublisher()
Definition: lifecycle_publisher.hpp:72
virtual void on_activate()=0
virtual bool is_activated()=0
virtual void on_deactivate()=0
rclcpp::allocator::AllocRebind< MessageT, Alloc > MessageAllocTraits
Definition: lifecycle_publisher.hpp:56
virtual void publish(std::unique_ptr< MessageT, MessageDeleter > msg)
brief child class of rclcpp Publisher class.
Definition: lifecycle_publisher.hpp:50