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

Forside
Vedhæftede filer:
Indlæg som e-mail
+ (text/plain)
Slet denne besked
Besvar denne besked
Skribent: User discussions
Dato:  
Til: User discussions
Emne: 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.