ros2 / ros2/launch

YAML: Allow use of typed values (boolean & number) instead of requiring strings for everything

Open
#955 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
155
Forks
182
Avg merge
2d 14h
Merged PRs (30d)
6

Description

Description

In a YAML launchfile, one must

include:
   ...
   if: "False"

even though the expected final substitution resolution is a boolean, and YAML has a boolean type.
It's opaque to users why this acts this way and adds friction to usage of the YAML frontend.
It would be more ergonomic to allow:

node:
    if: false

I believe this restriction comes from the legacy of XML being the original launch frontend, which doesn't have boolean and numeric types, really, though XSD schemas can check them the same way we do the strings that come in.

Motivation

Reduce friction for writers of YAML launchfiles. How many times have I done if: false or the like and had the launchfile fail to launch? Too many, what a waste of time.

Design / Implementation Considerations

No response

Additional Information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by locating the YAML frontend and the validation or substitution-resolution entry points for launch arguments, then trace how boolean and numeric YAML values are handled. Done means values such as false and numbers are accepted where substitutions expect them, while existing string inputs continue to work, with regression tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, yaml
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.