ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Values in launch-prefix
are really used as prefixes: so instead of starting simply binary_a
, the command line changes to whatever_you_had_in_launch_prefix binary_a
. So whatever you have as a launch-prefix
must result in a valid command line when concatenated with the name of the binary and the rest of the arguments.
Separate from this, your .launch
file will still need to be valid XML (as that's what .launch
files are), which is what your immediate problem is: you cannot embed "
in an XML attribute like you do now. It can be done, but you'd probably end up with all sorts of XML entity substitutions which may be hard to get right.
Easiest way out would probably be to write a separate Bash script which takes care of all of this. Then you'd pass the path to the script as your launch-prefix
and you can make your conditional logic as complex as a Bash script would allow.
(you're obviously not limited to Bash scripts, anything which is executable could be used)
2 | No.2 Revision |
Values in launch-prefix
are really used as prefixes: so instead of starting simply simplybinary_a
,
binary_a [rest of args]
the command line changes to towhatever_you_had_in_launch_prefix binary_a
.
$value_of_launch_prefix binary_a [rest of args]
So whatever you have as a launch-prefix
must result in a valid command line when concatenated with the name of the binary and the rest of the arguments.
Separate from this, your .launch
file will still need to be valid XML (as that's what .launch
files are), which is what your immediate problem is: you cannot embed "
in an XML attribute like you do now. It can be done, but you'd probably end up with all sorts of XML entity substitutions which may be hard to get right.
Easiest way out would probably be to write a separate Bash script which takes care of all of this. Then you'd pass the path to the script as your launch-prefix
and you can make your conditional logic as complex as a Bash script would allow.
(you're obviously not limited to Bash scripts, anything which is executable could be used)