# Rosparam fails silenntly with a wrong param?

How can I see the type of parameter I can pass to when I set a Rosparam?

I do

$rosparam list and got: /background_r /background_g /background_b etc those are intuitive enough to predict that are ints but if i need the type by doing$rosparam type /background_r

I got an error since that command is not existing...

on the other hand, doing:

$rosparam set /background_r "foo" fails silently... what am doing wrong? edit retag close merge delete ## 2 Answers Sort by » oldest newest most voted Actually Ros has a parameter server that is nothing else as a Dictionary, parameter there has not type as you are specting... so to the question: when you do:$rosparam set /background_r "foo"

How you now it is failing? is not actually, you just wrote the parameter /background_r to "foo" in the dictionary

you can verify that by getting the value: just do:

\$rosparam get /background_r

and you will get foo

more

rosparam is not failing silently, it's doing exactly what you're telling it to. As ΦXocę 웃 Пepeúpa ツ said, you're actually setting the parameter to that value. According to the rosparam wiki, the syntax for setting a parameter via the command line is:

rosparam set parameter_name value

where, in your case, parameter_name is /background_r and value is "foo". If you were to call

rosparam get /background_r

after running the command that "silently fails" you would see that it actually has the value of "foo". The parameter server just stores a bunch of dictionary values that you can set, use, and even delete.

more