Both launch XML and YAML frontends currently coexist with the YAML parsing of substitution text in Node parameters. This has caused us issues in the past (e.g. ros2/launch#226 (comment)), forcing additional quotes as escape mechanisms. At the time we deemed this as a situation we'd rarely find in the field.
Well, as you can see in RobotWebTools/rosbridge_suite#433, specifically on commit RobotWebTools/rosbridge_suite@d466c89, it's not as rare as we thought.
There, I'm forced to surround a * with two ' on each side.
-
Why a * needs this? Because it's later used as a Node parameter and parameters are parsed as YAML, that parses that * as a malformed alias (see PyYAML documentation about aliases).
-
Why two '? The inner pair prevents * from being parsed as a YAML alias, and the outer pair is removed by the frontend for consistency -- otherwise one has to remember that some values given in e.g. XML are parsed using YAML under the hood and some are not.
IMHO the deeper, unresolved issue that #31 partially addressed is that Substitutions in launch are always text and it is up to the receiving end to do any additional parsing, opening the door to things like this.
Both launch XML and YAML frontends currently coexist with the YAML parsing of substitution text in
Nodeparameters. This has caused us issues in the past (e.g. ros2/launch#226 (comment)), forcing additional quotes as escape mechanisms. At the time we deemed this as a situation we'd rarely find in the field.Well, as you can see in RobotWebTools/rosbridge_suite#433, specifically on commit RobotWebTools/rosbridge_suite@d466c89, it's not as rare as we thought.
There, I'm forced to surround a
*with two'on each side.Why a
*needs this? Because it's later used as aNodeparameter and parameters are parsed as YAML, that parses that*as a malformed alias (see PyYAML documentation about aliases).Why two
'? The inner pair prevents*from being parsed as a YAML alias, and the outer pair is removed by the frontend for consistency -- otherwise one has to remember that some values given in e.g. XML are parsed using YAML under the hood and some are not.IMHO the deeper, unresolved issue that #31 partially addressed is that Substitutions in
launchare always text and it is up to the receiving end to do any additional parsing, opening the door to things like this.