nodehandle parameter
I am reading the tutorial on the website http://wiki.ros.org/roscpp/Overview/P... But I am not sure understand the following the _Default value version_.
ros::NodeHandle nh;
std::string global_name, relative_name, default_param;
if (nh.getParam("/global_name", global_name))
{
...
}
if (nh.getParam("relative_name", relative_name))
{
...
}
// Default value version
nh.param<std::string>("default_param", default_param, "default_value");
So in the _defalut value version_, nh.param does the same function as get parameter? What is the "default_param", default_param, "default_value"? The first "default_param" with double quotation means the name of parameter right? And the default_param without double quotation means: if the nodehandle "default_param" has a value ,then we pass the value to default_param? Otherwise we set the value of default_param to be "default_value" ?