Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

nodehandle parameter

I am reading the tutorial on the website http://wiki.ros.org/roscpp/Overview/Parameter%20Server 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" ?

nodehandle parameter

I am reading the tutorial on the website http://wiki.ros.org/roscpp/Overview/Parameter%20Server But I am not sure understand the following the // _// Default value versionversion_

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 version nh.param<std::string>("default_param", default_param, "default_value");

"default_value");

So in the defalut _defalut value version, nh.param 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" ? ?

nodehandle parameter

I am reading the tutorial on the website http://wiki.ros.org/roscpp/Overview/Parameter%20Server But I am not sure understand the following the _// Default _Default value version_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" ?

nodehandle parameter

I am reading the tutorial on the website http://wiki.ros.org/roscpp/Overview/Parameter%20Server 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" "default_param" with double quotation means the name of parameter right? And the default_param default_param without double quotation means: if the nodehandle "default_param" "default_param" has a value ,then we pass the value to default_param? default_param? Otherwise we set the value of default_param default_param to be "default_value" "default_value" ?

nodehandle parameter

I am reading the tutorial on the website http://wiki.ros.org/roscpp/Overview/Parameter%20Server 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" ??

Am I understand this correctly?