ros2 / ros2/launch

ROS 2 YAML launch: "choices" is not supported in arg

Open
#939 4 comments 0 reactions 1 assignee View on GitHub

@mjcarroll is already working on this.

Since Jan 29, 2026.

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

Description

Description:

Using the "choices" key in an arg inside a ROS 2 YAML launch file causes a runtime error, but this limitation is not clearly documented.

Steps to reproduce:
  1. Create YAML launch file:
launch:
  - arg:
      name: rviz
      default: "true"
      description: "Launch RViz2"
      choices: ["true", "false"]
  1. Run:
ros2 launch <package> <file>.yaml
Observed behavior:

Launch fails with:

ValueError: Unexpected key(s) found in `arg`: {'choices'}
Expected behavior:
  • Support "choices" in YAML launch files
Environment:
  • ROS 2: Jazzy

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.