Support for OptionalDeclareLaunchArguments
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
Research direction
Start with DeclareLaunchArgument and the included launch-description argument validation shown in the error. Reproduce the YAML-parameter case without default_value, then compare it with the unset workaround. Done means an optional declaration can be omitted without failure while a CLI-provided value can still override the loaded parameter.
Written by the indexing model from the issue text.
Description
Description
Currently need to set default_value='foo' or get the following error.
[ERROR] [launch]: Caught exception in launch (see debug for traceback): Included launch description missing required argument 'bar' (description: 'no description given'), given: [foo]
Motivation
Basically I have parameter yaml file I'm loading. And I want to be able to override via the cli. But I can't easily have it override since the DeclareLaunchArgument gives the above error when there is no default.
Design / Implementation Considerations
Maybe some sort of subclass of DeclareLaunchArgument which is OptionalDeclareLaunchArgument which takes an action to execute if a value is passed at cli but, otherwise does nothing?
Additional Information
I got around this with making a canonical unset default but it is inelegant.
DeclareLaunchArgument('bar', default_value='__unset__')
IfCondition(PythonExpression(["'", bar, "' != '__unset__'"]))
- Dominant language
- Python
- Stars
- 156
- Forks
- 200
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 11
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ros2/launch
-
Use a relative target for the `latest` log symlink so it survives different absolute mount paths (host/Docker)Possibly taken @Old-Ding claimed this 139 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ros2/launch#978 · 1 reaction ·
Maintainers usually reply within 1 day
-
Add OpaqueFunction to list at docs.ros.orgMay be free again A pull request for this issue was closed without being merged. Openbug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ros2/launch#826 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
[launch_testing] pytest>8.1 dropped the legacy "path" argument from its internal hooks on humblePossibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
ros2/launch#979 · 6 comments ·
Maintainers usually reply within 1 day
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
hive size:simple
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
backend enhancement priority:P3
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
geolens-io/geolens#4161 ·
Maintainers usually reply within 1 day