Public Member Functions | Private Member Functions | Private Attributes
image_transport::SubscriberFilter Class Reference

Image subscription filter. More...

#include <subscriber_filter.h>

Inheritance diagram for image_transport::SubscriberFilter:
Inheritance graph
[legend]

List of all members.

Public Member Functions

uint32_t getNumPublishers () const
 Returns the number of publishers this subscriber is connected to.
const SubscribergetSubscriber () const
 Returns the internal image_transport::Subscriber object.
std::string getTopic () const
std::string getTransport () const
 Returns the name of the transport being used.
void subscribe (ImageTransport &it, const std::string &base_topic, uint32_t queue_size, const TransportHints &transport_hints=TransportHints())
 Subscribe to a topic.
 SubscriberFilter (ImageTransport &it, const std::string &base_topic, uint32_t queue_size, const TransportHints &transport_hints=TransportHints())
 Constructor.
 SubscriberFilter ()
 Empty constructor, use subscribe() to subscribe to a topic.
void unsubscribe ()
 Force immediate unsubscription of this subscriber from its topic.
 ~SubscriberFilter ()

Private Member Functions

void cb (const sensor_msgs::ImageConstPtr &m)

Private Attributes

Subscriber sub_

Detailed Description

Image subscription filter.

This class wraps Subscriber as a "filter" compatible with the message_filters package. It acts as a highest-level filter, simply passing messages from an image transport subscription through to the filters which have connected to it.

When this object is destroyed it will unsubscribe from the ROS subscription.

connections

SubscriberFilter has no input connection.

The output connection for the SubscriberFilter object is the same signature as for roscpp subscription callbacks, ie.

void callback(const boost::shared_ptr<const sensor_msgs::Image>&);

Definition at line 64 of file subscriber_filter.h.


Constructor & Destructor Documentation

image_transport::SubscriberFilter::SubscriberFilter ( ImageTransport it,
const std::string &  base_topic,
uint32_t  queue_size,
const TransportHints transport_hints = TransportHints() 
) [inline]

Constructor.

See the ros::NodeHandle::subscribe() variants for more information on the parameters

Parameters:
nhThe ros::NodeHandle to use to subscribe.
base_topicThe topic to subscribe to.
queue_sizeThe subscription queue size
transport_hintsThe transport hints to pass along

Definition at line 77 of file subscriber_filter.h.

Empty constructor, use subscribe() to subscribe to a topic.

Definition at line 86 of file subscriber_filter.h.

Definition at line 90 of file subscriber_filter.h.


Member Function Documentation

void image_transport::SubscriberFilter::cb ( const sensor_msgs::ImageConstPtr &  m) [inline, private]

Definition at line 153 of file subscriber_filter.h.

Returns the number of publishers this subscriber is connected to.

Definition at line 130 of file subscriber_filter.h.

Returns the internal image_transport::Subscriber object.

Definition at line 146 of file subscriber_filter.h.

std::string image_transport::SubscriberFilter::getTopic ( ) const [inline]

Definition at line 122 of file subscriber_filter.h.

std::string image_transport::SubscriberFilter::getTransport ( ) const [inline]

Returns the name of the transport being used.

Definition at line 138 of file subscriber_filter.h.

void image_transport::SubscriberFilter::subscribe ( ImageTransport it,
const std::string &  base_topic,
uint32_t  queue_size,
const TransportHints transport_hints = TransportHints() 
) [inline]

Subscribe to a topic.

If this Subscriber is already subscribed to a topic, this function will first unsubscribe.

Parameters:
nhThe ros::NodeHandle to use to subscribe.
base_topicThe topic to subscribe to.
queue_sizeThe subscription queue size
transport_hintsThe transport hints to pass along

Definition at line 105 of file subscriber_filter.h.

Force immediate unsubscription of this subscriber from its topic.

Definition at line 117 of file subscriber_filter.h.


Member Data Documentation

Definition at line 158 of file subscriber_filter.h.


The documentation for this class was generated from the following file:


image_transport
Author(s): Patrick Mihelich
autogenerated on Thu Jun 6 2019 21:19:55