Skip to content

Bad interaction between launch frontend and YAML parameters #74

@hidmic

Description

@hidmic

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions