Re: [ros-users] question about callback functions

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: Blaise Gassend
日付:  
To: ros-users
題目: Re: [ros-users] question about callback functions
> I'm wondering what happens if callback function has a blocking code inside
> and gets automatically called back because of a newly arriving message when
> the callback function is still busy.


The callback will not be called again until you

> Another thing I'm unclear about callback functions is if there exists an
> easy way to supply function input arguments to callback functions. Only
> example I found that does this is using registerCallBack method. Is there a
> easier way to supply function inputs?


The easiest way is for the callback to be a member function of a class.
You can then access any member variables from the callback. Alternately,
you can use boost::bind to create a boost::function in which you have
specified some of the arguments.