roslaunch: rosparam does not override parameters in local namespace

asked 2017-05-27 05:38:48 -0500

rossie ros gravatar image

The wikipage on rosparam states that

Similarly, load commands can override parameters previously declared.

But I found that having a rosparam in a node tag does not behave this way. Am I misinterpreting the wiki page or may this be a bug?

A minimal example: This works as expected:

    <node name="my_node" pkg="roscpp_tutorials" type="talker" />
    <param name="my_param" value="my value" />
    <rosparam>my_param: "my_overridden_value"</rosparam>

rosparam dump gives "[...] my_param: my_overridden_value [...]".


    <node name="my_node" pkg="roscpp_tutorials" type="talker">
      <param name="my_param" value="my value" />
      <rosparam>my_param: "my_overridden_value"</rosparam>

yields "[...] my_node: {my_param: my value} [...]"., whereas on might expect "my_node: {my_param: my_overridden value}".

edit retag flag offensive close merge delete


From the doc, I also understand that the rule should be "Last value wins", which shows to be the case at the root level of the launchfile, but not within a node description. In addition to that, manually loading this param after launching the process works as expected with rosparam load

serial gravatar image serial  ( 2017-05-30 04:11:14 -0500 )edit

@serial: If this is not the case within a node description, wouldn't this be a bug then?

Timple86 gravatar image Timple86  ( 2019-11-14 01:08:15 -0500 )edit