0
$\begingroup$

Rosanswers logo

Hello everyone !

I use the eband_local_planner for the navigation of my robot in simulation.
The problem is that when I type the command rosparam list, I can't see the parameters of my planner.
It is the same if I type rosparam get parameter_name, I get a message which says that the requested parameter does not exist.
However, if I load these invisible parameters from a YAML file, I can see their effects but they doesn't appear in the parameter server through the previously indicated commands.
They doesn't appear neither using the rosrun rqt_reconfigure rqt_reconfigure command.
My question is: How to have this visibility ?
I ask that because I want to be able to access these parameters in the parameter server in order to modify the behaviour of my robot from a C++ node.

If anyone can help me, I will be grateful,
lfr


Originally posted by lfr on ROS Answers with karma: 201 on 2016-06-15

Post score: 2


Original comments

Comment by dornhege on 2016-06-15:
What do you mean when you say "load invisible parameters". When you load parameters they are on the param server and also appear in rosparam list.

Comment by lfr on 2016-06-15:
I mean that the parameters exists but are not in the parameter server when I try to get them. This is exactly the problem. rosparam list should display the eband_local_planner parameters but it doesn't and I don't know why.

Comment by Pablo Iñigo Blasco on 2016-06-15:
just notice that trying to get a parameter does not mean that it exist in the parameter server. (I explained it below)

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

There are many ways to see the parameters in the parameter server, for instance:

$ rosparam list

or

$ rosparam get /

Concerning your specific question: those "hidden parameters" you describe really do not exist in the parameter server. The node just attempts to get those parameters and takes a default value if they do not exist.

Sometimes nodes try to get parameters from the parameter server (using the NodeHandle::getParam function call) but they do not exist in the parameter server. Then, the node takes some default value (also specified in the NodeHandle::getParam function call). Sometimes, you only realize that these parameters exist because you have read the code because they really do not exist in the parameter server (you do not see them using the "rosparam list"). Those parameters sometimes are neither documented in the roswiki node information. Somehow they look "hidden parameters", but the exact answer is that they do not exist in the parameter server.

However, if you set the values of those parameters manually (using roslaunch or rosparam set) they would already exist in the parameter server, then the node would use it properly (without needing to take the default value specified in the getParam function call).


Originally posted by Pablo Iñigo Blasco with karma: 2982 on 2016-06-15

This answer was ACCEPTED on the original site

Post score: 4


Original comments

Comment by lfr on 2016-06-15:
Thanks for answering me. The problem is that the parameters exists in the source code of the planner. You can find it here: http://docs.ros.org/indigo/api/eband_local_planner/html/eband__trajectory__controller_8cpp_source.html
I want just to be able to read and modify them from param server

Comment by Pablo Iñigo Blasco on 2016-06-15:
In your example, the node tries to read the parameters server, if they exist they are read from the parameterserver, otherwise a default value is taken. But that default value is not set in the parameters server. In resume, the parameter did not exist and it does not exist yet after the getParam

Comment by Pablo Iñigo Blasco on 2016-06-15:
If you want to set those parameters you have to do it previously to the initialization of your node, you can use a roslaunch file to change those values. If you set in a launch file a parameter it will work.

Comment by Pablo Iñigo Blasco on 2016-06-15:
Another thing that you may be not taking into account is that the parameter server is a totally diferent mechanism to the dynamic_reconfigure properties. getParams get parameters from the parameter server (let's say the roscore)... the dynamic reconfigure client gets parameters from the target node

Comment by Pablo Iñigo Blasco on 2016-06-15:
the eband local planner does not use the dynamic_reconfigure mechanism, so you will not be able to read any data with the rqt_reconfigure app. parameters cannot be updated in runtime. Instead, they are only read once at the node start from the parameter server using the getParam method

Comment by lfr on 2016-06-16:
Ok, thank you for your answer. But I still have a misunderstanding. Usually, when I load parameter from a YAML file, they appear in the parameter server even if they are useless. And I don't understand why they doesn't appear with the eband_local_planner.

Comment by Pablo Iñigo Blasco on 2016-06-16:
A yaml file is just a file, those parameters are not loaded into the parameter server except if they are explicitly loaded. There are two ways to load a yaml file... trough the "rosparam load" command and through a launchfile. http://wiki.ros.org/roslaunch/XML/rosparam

Comment by lfr on 2016-06-16:
Yes obviously, I load it from a launch file, it was implicit

Comment by Pablo Iñigo Blasco on 2016-06-16:
If the launch file really load properly the yaml config file. The parameter must be available in the parameter server, because you are doing a "write operation" of the parameters specified in the YAML file.

If that is not working is because you are not loading properly the yaml file.

Comment by Pablo Iñigo Blasco on 2016-06-16:
If you only do a "read operation" the parameter is not created. The code of the eband does "read operations" on parameters, so they are not created.

Comment by Pablo Iñigo Blasco on 2016-06-16:
you said this: "if I load these invisible parameters from a YAML file, I can see their effects but they doesn't appear in the parameter server through the previously indicated commands." This cannot be true. The only possibility to explain what you describe would be deleting parameters (rarely used)

Comment by lfr on 2016-06-16:
Yes but my launch file is correct. It works properly with costmap configuration YAML files, the same with gmapping and dwa_local_planner configuration files. If I asked this question, it is exactly because this problem is really strange. My YAML file is correct and the same with my launch file.

Comment by lfr on 2016-06-16:
Moreover, the parameters I load have a real impact on the motion of the robot. This is a proof that they really exist. I just cannot see them in the parameter server.

Comment by lfr on 2016-06-16:
But it doesn't matter now, If I can't use dynamic_reconfigure with the eband_local_planner, I no longer need to access to these parameters.
Thanks for your help.

Comment by Pablo Iñigo Blasco on 2016-06-16:
You are welcome, but I insist, your idea of "hidden parameters" are really not existing parameters in the parameter server. They are not properly loaded somehow. you should try to go from a very simple example of a lauhch file and a config yaml file to check it.

Comment by Pablo Iñigo Blasco on 2016-06-16:
Otherwise you would have found a bug that nobody have found or experienced (It really can be possible, but it would be really weird). The basic functionality of parameters is has been tested by thousands of ros users.

Comment by lfr on 2016-06-16:
I already made the simple example (YAML + launch file) to check it and it works correctly. This is why I don't understand why when it is about the eband_local_planner parameters it doesn't works. A great mystery for me.

Comment by lfr on 2016-06-20:
I don't know what I changed but it works properly now, thank you for your help

Comment by Pablo Iñigo Blasco on 2016-06-20:
Nice! Please mark then the question as solved.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.