-
Notifications
You must be signed in to change notification settings - Fork 165
Open
Labels
enhancementNew feature or requestNew feature or request
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__'"]))Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request