You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#254 adds the --launch-prefix flag to provide a means of prepending the same prefix (e.g. xterm -e valgrind) to each executable command in the launch file. For large launch files this launches many instances of the desired prefix program even if the user may only require it for certain executables. Currently selectively applying prefixes can be achieved by editing the launch file and directly specifying the applied prefix for a given executable; however, this is a slow process if the prefix is frequently changed or the developer only wishes to use a prefix one time.
To provide a means of filtering which executables the --launch-prefix value is applied to, I propose that we add a --launch-prefix-filter flag (or something to this effect) which allows the user to provide a list of executable names for which the prefix should be applied. When used alone --launch-prefix would apply the prefix to all executables, and when used in conjunction with the new --launch-prefix-filter flag, the prefix would only be applied to matching executables.
The goal of these two flags is to provide a faster means of debugging multiple, specific executables without requiring the launch file to be edited.
Implementation considerations
For the launch_ros repo:
Add --launch-prefix-filter argument which accepts at least 1 executable name
Pass list of executable names as a / separated list via service.context.launch_configurations (this is because Unix & Windows filenames cannot contain /)
For the launch repo (Assuming #254 provides the prefix via service.context.launch_configurations):
Modify ExecuteProcess.__expand_substitutions() such that when a launch prefix filter is available in the launch configuration, the prefix is only prepended to the command if its executable name matches an executable name that was provided via the launch configuration
The name property within ExecuteProcess is purposely not used so that the behavior is the same between Node and ExecuteProcess. Node sets the ExecuteProcess name to the executable name by default, but when the user creates their own ExecuteProcess in a launch file, they are able to provide their own name, overriding it from being set to the executable name. This could cause an issue where user-named ExecuteProcess elements wouldn't be properly selected by the filter, so it's executable name should be extracted directly from the cmd property instead.
The text was updated successfully, but these errors were encountered:
Pass list of executable names as a / separated list via service.context.launch_configurations (this is because Unix & Windows filenames cannot contain /)
I like the idea but this bit is unusual. How about using regex instead?
Feature request
Feature description
#254 adds the
--launch-prefix
flag to provide a means of prepending the same prefix (e.g.xterm -e valgrind
) to each executable command in the launch file. For large launch files this launches many instances of the desired prefix program even if the user may only require it for certain executables. Currently selectively applying prefixes can be achieved by editing the launch file and directly specifying the applied prefix for a given executable; however, this is a slow process if the prefix is frequently changed or the developer only wishes to use a prefix one time.To provide a means of filtering which executables the
--launch-prefix
value is applied to, I propose that we add a--launch-prefix-filter
flag (or something to this effect) which allows the user to provide a list of executable names for which the prefix should be applied. When used alone--launch-prefix
would apply the prefix to all executables, and when used in conjunction with the new--launch-prefix-filter
flag, the prefix would only be applied to matching executables.The goal of these two flags is to provide a faster means of debugging multiple, specific executables without requiring the launch file to be edited.
Implementation considerations
For the
launch_ros
repo:--launch-prefix-filter
argument which accepts at least 1 executable name/
separated list viaservice.context.launch_configurations
(this is because Unix & Windows filenames cannot contain/
)For the
launch
repo (Assuming #254 provides the prefix viaservice.context.launch_configurations
):ExecuteProcess.__expand_substitutions()
such that when a launch prefix filter is available in the launch configuration, the prefix is only prepended to the command if its executable name matches an executable name that was provided via the launch configurationThe
name
property withinExecuteProcess
is purposely not used so that the behavior is the same betweenNode
andExecuteProcess
.Node
sets theExecuteProcess
name to the executable name by default, but when the user creates their ownExecuteProcess
in a launch file, they are able to provide their ownname
, overriding it from being set to the executable name. This could cause an issue where user-namedExecuteProcess
elements wouldn't be properly selected by the filter, so it's executable name should be extracted directly from thecmd
property instead.The text was updated successfully, but these errors were encountered: