# Revision history [back]

I'm not exactly sure, what you want to do, but I think using args should solve your problem.

Set the parameter in the base launch file to an arg that is passed in and then when launching multiple anonymous launches, you set the arg for the include (like you tried with param).

I'm not exactly sure, what you want to do, but I think using args should solve your problem.

Set the parameter in the base launch file to an arg that is passed in and then when launching multiple anonymous launches, you set the arg for the include (like you tried with param).

Update: I'm assuming you want to do the following:

• There should only be one launch file for your node launching it anonymously
• There is some other launch file that uses this launch file to launch multiple nodes
• There are different sets of private parameters for this node that should be used

Given that is what you want, I'd suggest the following: ocu_base.launch:

<arg name="param_set" />

<node ...>
<rosparam ..load.. $(find ocu)/config/$(param_set).yaml>
</node>


main.launch:

<include file=...ocu_base.launch">
<arg name="param_set" value="set1" />
</include>
<include file=...ocu_base.launch">
<arg name="param_set" value="set1" />
</include>
...


I'm not exactly sure, what you want to do, but I think using args should solve your problem.

Set the parameter in the base launch file to an arg that is passed in and then when launching multiple anonymous launches, you set the arg for the include (like you tried with param).

Update: I'm assuming you want to do the following:

• There should only be one launch file for your node launching it anonymously
• There is some other launch file that uses this launch file to launch multiple nodes
• There are different sets of private parameters for this node that should be used

Given that is what you want, I'd suggest the following: ocu_base.launch:

<arg name="param_set" />

<node ...>
<rosparam ..load.. $(find ocu)/config/$(param_set).yaml>
</node>


main.launch:

<include file=...ocu_base.launch">
<arg name="param_set" value="set1" />
</include>
<include file=...ocu_base.launch">
<arg name="param_set" value="set1" value="set2" />
</include>
...


I'm not exactly sure, what you want to do, but I think using args should solve your problem.

Set the parameter in the base launch file to an arg that is passed in and then when launching multiple anonymous launches, you set the arg for the include (like you tried with param).

Update: I'm assuming you want to do the following:

• There should only be one launch file for your node launching it anonymously
• There is some other launch file that uses this launch file to launch multiple nodes
• There are different sets of private parameters for this node that should be used

Given that is what you want, I'd suggest the following: ocu_base.launch:

<arg name="param_set" />

<node ...>
<rosparam ..load.. $(find ocu)/config/$(param_set).yaml>
command="load" textfile="$(find ocu)/config/$(arg param_set).yaml">
</node>


main.launch:

<include file=...ocu_base.launch">
<arg name="param_set" value="set1" />
</include>
<include file=...ocu_base.launch">
<arg name="param_set" value="set2" />
</include>
...