20 #ifndef INCLUDE_FKIE_MESSAGE_FILTERS_SUBSCRIBER_H_ 21 #define INCLUDE_FKIE_MESSAGE_FILTERS_SUBSCRIBER_H_ 53 template<
class M,
template<
typename>
class Translate = RosMessageEvent>
107 virtual std::string
topic()
const noexcept
override;
130 std::shared_ptr<ros::NodeHandle>
nh_;
virtual void unsubscribe_impl() noexcept override
Shut the ROS subscriber down.
Base class for data providers.
virtual void subscribe_impl() noexcept override
Create a ROS subscriber.
void set_subscribe_options(ros::NodeHandle &nh, const std::string &topic, uint32_t queue_size, const ros::TransportHints &transport_hints=ros::TransportHints(), ros::CallbackQueueInterface *callback_queue=nullptr) noexcept
Configure ROS topic that is to be subscribed.
Subscribe to a ROS topic as data provider.
virtual bool is_configured() const noexcept override
Check if the ROS subscriber is properly configured.
virtual void subscribe_on_demand(PublisherBase &pub)
Subscribe to the configured ROS topic whenever the given publisher is active.
virtual void subscribe()
Subscribe to the configured ROS topic.
Base class for ROS subscribers in a filter pipeline.
typename Translate< M >::FilterType FilterType
Subscriber() noexcept
Constructs an empty subscriber.
void cb(const EventType &event)
typename Translate< M >::EventType EventType
virtual void unsubscribe()
Unsubscribe from the configured ROS topic.
ros::SubscribeOptions opts_
virtual std::string topic() const noexcept override
Return the subscribed topic name.
std::shared_ptr< ros::NodeHandle > nh_