[ros-users] Nodelets and figuring out a publisher's source name

Josh Faust jfaust at willowgarage.com
Mon Dec 27 20:02:54 UTC 2010


Relying on the callerid to do anything programmatic is usually a bad idea.
 It's not just nodelets you'll have a problem with, it's any node with
multiple publishers to the same topic.  It's possible some identifying
information will be added for each publisher at some point in the future,
but not near-term.

What exactly are you trying to do that requires a unique identifier per
publisher?

Josh

On Mon, Dec 27, 2010 at 11:51 AM, François Ferland <
francoisferland at francoisferland.com> wrote:

> Hi,
>
> I'm currently porting some code over to a new Nodelet setup and I'm running
> into a small issue. We're using MessageEvent subscribers to find out from
> where some messages come from on topics with multiple publishers. The thing
> is, when these publishers are from nodelets, they all appear to come from
> the nodelet manager's node. From what I can figure out, this comes from the
> fact that ros::this_node::getName() is used to fill out message headers.
> Since this seems to be attached to the process itself, it
> won't contain the name of the ros::NodeHandle from which the publication
> was created.
>
> We do have have a workaround: running these specific nodelets as
> standalone, but it somewhat beats the whole point of writing them as
> nodelets. I do realize that changing the "callerid" header field behavior
> might have some important repercussions over the whole API, but would it be
> possible in a future revision ? Does anyone have a better workaround idea ?
>
> Thanks,
>
> François Ferland
> IntRoLab - Université de Sherbrooke, Canada
> http://introlab.gel.usherbrooke.ca
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20101227/ae2cb0e8/attachment-0004.html>


More information about the ros-users mailing list