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

dlae's profile - activity

2020-02-05 20:21:04 -0500 marked best answer 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?

2019-08-13 03:11:46 -0500 received badge  Famous Question (source)
2019-02-02 15:49:17 -0500 received badge  Notable Question (source)
2018-10-05 01:14:47 -0500 received badge  Popular Question (source)
2018-10-02 11:07:21 -0500 asked a question NodeHandle namespaces

NodeHandle namespaces This is just an question about a very specific corner-case of the NodeHandle API, that is not cove