roslaunch XML "if" comparison
In the page on roslaunch XML, it discusses the use of "if" and "unless" attributes for tags. In the examples, however, it only shows how to do it if the argument you are checking is a boolean.
I need to do something like this:
<arg name="mode" default="simulate"/>
<group unless="$(arg mode) == simulate">
<!-- start a second node -->
</group>
where the "if" attribute is doing a comparison instead of checking a boolean. This syntax throws an error though. Is there an alternative way to do this?
EDIT: To give more info as to why this is complicated, I've edited the code sample a bit. Note that I need to start a new node unless the "mode" argument is of a specific type. That second node requires a whole bunch of arguments and parameters that are defined earlier in the master launch file. This makes the proposed solution of including sub-launch files more complex, because for each one of those files I would have to import a whole array of arguments to start that node, and there are a LOT of modes (and "simulate" is the only one where I don't want to start the second node). The reason I was asking about getting an argument back from a sub-launch file is because then I could just set a simple boolean in each sub-launch file, and in the master file (where all of the many arguments are available) I could start the second node if that boolean is true.