Re: [ros-users] How to identify the subscriber or the topic …

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: User discussions
日付:  
To: User discussions
題目: Re: [ros-users] How to identify the subscriber or the topic name related to a callback
On Tue, Feb 1, 2011 at 11:49 AM, Jeremy Leibs <> wrote:
> I apologize, I hadn't seen the full context of the original message,
> just Brian's response.  I see you are already using The MessageEvent.
> You can get the topic using something like:
>
> ros::M_string connection_header = event.getConnectionHeader();
> std::string topic = connection_header["topic"];


That's much better! For some reason, I thought that
getConnectionHeader() gave you a string that you would have to parse
manually.

    brian.