ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If, for example, you had:

ros::NodeHandle nh;
ros::NodeHandle private_nh("~");

Then, nh.getParam() would look in the global namespace for a parameter, whereas private_nh.getParam() would look in a private namespace.

This configuration (one global, one private) is most common situation in which I use multiple NodeHandles.