Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ros::SubscribeOptions::create doesn't take object T* Obj pointer.

Hi,

SubscribeOptions::create function doesn't support setting class member function as callback function? I cannot see the argument option in its signature. template<class m="" &gt;="" static="" subscribeoptions="" create="" (const="" std::string="" &amp;topic,="" uint32_t="" queue_size,="" const="" boost::function&lt;="" void(const="" boost::shared_ptr&lt;="" m="" const="" &gt;="" &amp;)&gt;="" &amp;callback,="" const="" voidconstptr="" &amp;tracked_object,="" callbackqueueinterface="" *queue)="" <="" p="">

Like subscribe does below. Is it possible to add a class member function as callback function to the SubscribeOptions?

Subscriber subscribe(const std::string& topic, uint32_t queue_size, void(T::fp)(const boost::shared_ptr<m const="">&) const, T obj, const TransportHints& transport_hints = TransportHints())

ros::SubscribeOptions::create doesn't take object T* Obj pointer.

Hi,

SubscribeOptions::create function doesn't support setting class member function as callback function? I cannot see the argument option in its signature. signature.

template<class m="" &gt;="" static="" subscribeoptions="" create="" (const="" std::string="" &amp;topic,="" uint32_t="" queue_size,="" const="" boost::function&lt;="" void(const="" boost::shared_ptr&lt;="" m="" const="" &gt;="" &amp;)&gt;="" &amp;callback,="" const="" voidconstptr="" &amp;tracked_object,="" callbackqueueinterface="" *queue)="" <="" p="">
M >
static SubscribeOptions     create (const std::string &topic, uint32_t queue_size, const boost::function< void(const boost::shared_ptr< M const > &)> &callback, const VoidConstPtr &tracked_object, CallbackQueueInterface *queue)

Like subscribe does below. Is it possible to add a class member function as callback function to the SubscribeOptions?

 Subscriber subscribe(const std::string& topic, uint32_t queue_size, 
                         void(T::fp)(const boost::shared_ptr<m const="">&) void(T::*fp)(const boost::shared_ptr<M const>&) const, T obj, T* obj, 
                          const TransportHints& transport_hints = TransportHints())

TransportHints())