NodeHandle namespaces
This is just an question about a very specific corner-case of the NodeHandle
API, that is not covered by its documentation. I have no bug for you to solve or anything, I just need to know whether the scenario I'm describing in a second is possible, for my Master Thesis.
So, in this C++ code snippet
using namespace ros; ... NodeHandle nh("outer_namespace/inner_namespace");
a NodeHandle
is specifying a nested namespace in its constructor. Does outer_namespace
have to exist before nh
is constructed, or will it be created on the spot? In other words, can NodHandle
define a hierarchy of namespaces, or should all but the rightmost namespace exist at creation time?
Basically, does NodeHandle nh("outer_namespace/inner_namespace");
behave like the UNIX command mkdir outer_namespace/inner_namespace
or like mkdir -p outer_namespace/inner_namespace
?