Roslaunch complains of unused args when <arg> is inside <group>
I have the following "inner" launch file:
<launch>
<group>
<arg name="foo_topic" />
<node name="foo" pkg="rostopic" type="rostopic" args="hz $(arg foo_topic)" />
</group>
</launch>
And the following "outer" launch file:
<launch>
<include file="inner.launch">
<arg name="foo_topic" value="/tf" />
</include>
</launch>
Roslaunch refuses to launch the outer file, complaining the foo_topic
is unused:
RLException: unused args [foo_topic] for include of [inner.launch]
The traceback for the exception was written to the log file
Why does roslaunch not detect the <arg>
tag inside <group>
? Is there something I can do to make this pattern work?
Declaring the argument outside of the group will not do, as I ultimately want to use <group if="$(arg enable_group)">
to toggle the group (and its required arguments).
@alcedine any follow up on this?
Unfortunately, I have not found any documentation that explains what is going on here. The wiki page for
<arg>
states, "An arg declaration is specific to a single launch file", which reads as if the<arg>
being inside the<group>
should be fine (there is no change of file, after all), but apparently this is not so. The wiki page for<group>
does not indicate it to be an<arg>
barrier, either.I could find out by trawling the source code, but as of yet have not been able to justify the time investment.