roscpp relative vs global parameter (tutorial)
Hello,
I thought I understood the concept of global and relative. But apparently while doing the tutorial
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))
{
...
}
I expect that if my global name is /bla and my param is /bla/param1. I could simply use the second if loop with getParam("param1",relative_name), But this doesn't work.
here is the solution which requires you to instantiate a private node handle.
My question now is what does the tutorial mean then by relative name ? and relative to what ? because it doesn't work relative to my node name.