Ask Your Question
3

Determine a Node's Name/Namespace from within the Node (C++)

asked 2012-03-30 13:49:21 -0500

gavinmachine gravatar image

updated 2014-01-28 17:11:49 -0500

ngrennan gravatar image

Hello,

Is there a way to determine the name of a node and/or its namespace from within the node's C++?

Thanks!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
8

answered 2012-03-30 15:25:03 -0500

joq gravatar image

updated 2012-03-30 15:25:56 -0500

Use ros::this_node::getName() and ros::this_node::getNamespace().

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Stats

Asked: 2012-03-30 13:49:21 -0500

Seen: 674 times

Last updated: Mar 30 '12