Re: [ros-users] NodeHandle.subscribe(...) - callbacks

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
+ (text/html)
このメッセージを削除
このメッセージに返信
著者: Peter Müller
日付:  
To: ros-users
題目: Re: [ros-users] NodeHandle.subscribe(...) - callbacks
Hi Ken,

this is actually what I was looking for, unfortunately your example does not compile:

ros::Subscriber chatter_sub1 = n.subscribe("chatter", 100, boost::bind(chatterCallback1, _1, 10));

I used this for my example and the following error is returned:

error: no matching function for call to ‘ros::NodeHandle::subscribe(const char [8], int, boost::_bi::bind_t<void, void (*)(const std_msgs::StringConstPtr&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >)’

note: candidates are: ros::Subscriber ros::NodeHandle::subscribe(ros::SubscribeOptions&)


Do you have any hints for me (my boost knowledge is rather low)