[Documentation] [TitleIndex] [WordIndex

<param> tag

The <param> tag defines a parameter to be set on the Parameter Server. Instead of value, you can specify a textfile, binfile or command attribute to set the value of a parameter. The <param> tag can be put inside of a <node> tag, in which case the parameter is treated like a private parameter.

You can also set private parameter across a group of nodes by using the ~param syntax (see ROS names) in a <param> tag. The declared parameter will be set as a local parameter in the <node> tags that follow that are in the same scope (i.e. group or ns tag).

Attributes

Examples

<param name="publish_frequency" type="double" value="10.0" />

Parameters from YAML output

In order to load a YAML file, you can use:

<rosparam command="load" file="FILENAME" />

New in Lunar

But this doesn't work when using a command which outputs the parameters on stdout. In that case the new param type yaml can be used:

<param name="params_a" type="yaml" command="cat '$(find roslaunch)/test/params.yaml'" />

In the above example, the parameters from the described file would be loaded under the local namespace params_a.


2024-11-30 17:52