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

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
+ (text/html)
このメッセージを削除
このメッセージに返信
著者: User discussions
日付:  
To: ros-users
題目: [ros-users] Nodelets and figuring out a publisher's source name
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