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

Revision history [back]

click to hide/show revision 1
initial version

"Private" parameters aren't really "private." The concept of private parameters is just useful for bookkeeping. The "private" namespace of a node is just the namespace that has the same path as the node. The parameter server doesn't hide private parameters from other nodes.

You could, perhaps, infer that a parameter is private if there exists a node whose ROS graph path is a prefix of the parameter. However, this would be prone to errors. For example, the following launch file is valid:

<launch>
<node name="my_node" pkg="my_pkg" type="my_exe" />
<group ns="my_node">
    <param name="my_private_param" value="foo"/>
    <node name="my_inception_node" pkg="my_pkg" type="my_other_exe">
        <param name="my_super_private_param" value="foo"/>
    </node>
</group>
<node name="another_node" pkg="my_pkg" type="yet_another_exe"/>
</launch>

The parameter /my_node/my_private_param is private to /my_node, but it's public to /my_node/my_inception_node. Even /another_node can see that parameter by querying the fully-qualified path, i.e. /my_node/my_private_param.