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

How to see all parameters in the parameter server ?

asked 2016-06-15 06:16:41 -0600

lfr gravatar image

updated 2016-06-15 09:57:07 -0600

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

edit retag flag offensive close merge delete

Comments

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.

dornhege gravatar image dornhege  ( 2016-06-15 09:12:45 -0600 )edit

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.

lfr gravatar image lfr  ( 2016-06-15 09:52:11 -0600 )edit

just notice that trying to get a parameter does not mean that it exist in the parameter server. (I explained it below)

Pablo Iñigo Blasco gravatar image Pablo Iñigo Blasco  ( 2016-06-15 10:36:41 -0600 )edit

1 Answer

Sort by » oldest newest most voted
4

answered 2016-06-15 06:56:59 -0600

updated 2016-06-16 12:16:27 -0600

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).

edit flag offensive delete link more

Comments

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_...
I want just to be able to read and modify them from param server

lfr gravatar image lfr  ( 2016-06-15 08:42:35 -0600 )edit

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

Pablo Iñigo Blasco gravatar image Pablo Iñigo Blasco  ( 2016-06-15 10:23:40 -0600 )edit

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.

Pablo Iñigo Blasco gravatar image Pablo Iñigo Blasco  ( 2016-06-15 10:24:44 -0600 )edit

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

Pablo Iñigo Blasco gravatar image Pablo Iñigo Blasco  ( 2016-06-15 10:25:47 -0600 )edit

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

Pablo Iñigo Blasco gravatar image Pablo Iñigo Blasco  ( 2016-06-15 10:27:14 -0600 )edit

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.

lfr gravatar image lfr  ( 2016-06-16 01:55:09 -0600 )edit

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/ros...

Pablo Iñigo Blasco gravatar image Pablo Iñigo Blasco  ( 2016-06-16 02:48:55 -0600 )edit

Yes obviously, I load it from a launch file, it was implicit

lfr gravatar image lfr  ( 2016-06-16 03:42:03 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-06-15 06:16:41 -0600

Seen: 11,021 times

Last updated: Jun 16 '16