35 #ifndef IMAGE_TRANSPORT_SUBSCRIBER_PLUGIN_H
36 #define IMAGE_TRANSPORT_SUBSCRIBER_PLUGIN_H
39 #include <sensor_msgs/Image.h>
40 #include <boost/noncopyable.hpp>
48 class SubscriberPlugin : boost::noncopyable
51 typedef boost::function<void(
const sensor_msgs::ImageConstPtr&)>
Callback;
66 const TransportHints& transport_hints = TransportHints())
68 return subscribeImpl(nh, base_topic, queue_size, callback, tracked_object, transport_hints);
75 void(*fp)(
const sensor_msgs::ImageConstPtr&),
76 const TransportHints& transport_hints = TransportHints())
78 return subscribe(nh, base_topic, queue_size,
79 boost::function<
void(
const sensor_msgs::ImageConstPtr&)>(fp),
88 void(T::*fp)(
const sensor_msgs::ImageConstPtr&), T* obj,
91 return subscribe(nh, base_topic, queue_size, boost::bind(fp, obj, boost::placeholders::_1),
ros::VoidPtr(), transport_hints);
99 void(T::*fp)(
const sensor_msgs::ImageConstPtr&),
101 const TransportHints& transport_hints = TransportHints())
103 return subscribe(nh, base_topic, queue_size, boost::bind(fp, obj.get(), boost::placeholders::_1), obj, transport_hints);
109 virtual std::string
getTopic()
const = 0;
125 static std::string
getLookupName(
const std::string& transport_type)
127 return "image_transport/" + transport_type +
"_sub";