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

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: User discussions
Date:  
To: User discussions
Subject: 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.