Launchfile: standard entry for machine tag?

asked 2018-11-26 10:53:10 -0600


I would like to launch a node on my local machine (i.e. machine tag not included) if an argument is set to true and on a remote machine otherwise. Is there a nice way for doing that except writing the node twice in the launchfile?

<arg name="local" default="true"/>

<machine name="lala" .../>
<node pkg="move_base" type="move_base" if="$(arg local)">
    ... a lot of arguments ...
<node pkg="move_base" type="move_base" machine="lala" unless="$(arg local)">
    ... a lot of arguments (same as above) ...

So I would like to combine these two identical code blocks. Two things came to my mind: (1) is there anything like a string for the standard machine, like machine="localhost" (this does not work..)? (2) is there any way to not define a tag, like machine="$(NaN)" (which would be equivalent to not writing the machine tag)?

Thank you! Julien

edit retag flag offensive close merge delete