roscpp relative parameter
Hi,
I somehow can't manage to get or search relative parameter names. What I do is, I launch a launch file which sets parameters.
<launch>
<node pkg="test" type="test_node" name="test_node">
<param name="testparameter" value="a" />
<param name="show_windows" value="true" />
<rosparam file="$(find test)/config/params.yaml" command="load"/>
</node>
</launch>
This all works, I can get and set parameters using rosparam via the shell. They are published over e.g. /test_node/orientations, /test_node/kernels/kernel_1/wavelength, /test_node/kernels/kernel_2/wavelength and so on. Now within the test node I want to read those parameter. But when I try
nh_.getParam("orientations", orientations_list);
The parameter won't be found, I have to explicitly name the whole global name "/test_node/orientations". I have the same issue with
nh_.searchParam("orientations", orientations_param_name);
Am I doing something wrong? Is there a way to get the current namespace the node is in as a workaround?
(I'm using Ubuntu 10.04.1, 64 bit with the standard ros diamondback package from the package manager)