From f6fdd8999f7506dfdc035705218ccfa84e4fec90 Mon Sep 17 00:00:00 2001 From: Michel Hidalgo Date: Wed, 4 Sep 2019 20:49:57 -0300 Subject: [PATCH 1/2] Promote special CLI rules to flags. Signed-off-by: Michel Hidalgo --- launch_ros/launch_ros/actions/node.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/launch_ros/launch_ros/actions/node.py b/launch_ros/launch_ros/actions/node.py index 5b27b72d5..34406e43b 100644 --- a/launch_ros/launch_ros/actions/node.py +++ b/launch_ros/launch_ros/actions/node.py @@ -139,7 +139,7 @@ def __init__( # evaluate to paths), or dictionaries of parameters (fields can be substitutions). i = 0 for param in parameters: - cmd += [LocalSubstitution( + cmd += ['-f', LocalSubstitution( "ros_specific_arguments['params'][{}]".format(i), description='parameter {}'.format(i))] i += 1 @@ -349,10 +349,7 @@ def execute(self, context: LaunchContext) -> Optional[List[Action]]: if self.__expanded_node_namespace != '': ros_specific_arguments['ns'] = '__ns:={}'.format(self.__expanded_node_namespace) if self.__expanded_parameter_files is not None: - ros_specific_arguments['params'] = [] - param_arguments = cast(List[str], ros_specific_arguments['params']) - for param_file_path in self.__expanded_parameter_files: - param_arguments.append('__params:={}'.format(param_file_path)) + ros_specific_arguments['params'] = self.__expanded_parameter_files if self.__expanded_remappings is not None: ros_specific_arguments['remaps'] = [] for remapping_from, remapping_to in self.__expanded_remappings: From e28cc82d9ad96f1279be6017efd1c420d2c5931e Mon Sep 17 00:00:00 2001 From: Michel Hidalgo Date: Mon, 9 Sep 2019 22:10:28 -0300 Subject: [PATCH 2/2] Remove some short form CLI flags. Signed-off-by: Michel Hidalgo --- launch_ros/launch_ros/actions/node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launch_ros/launch_ros/actions/node.py b/launch_ros/launch_ros/actions/node.py index 34406e43b..8267d494a 100644 --- a/launch_ros/launch_ros/actions/node.py +++ b/launch_ros/launch_ros/actions/node.py @@ -139,7 +139,7 @@ def __init__( # evaluate to paths), or dictionaries of parameters (fields can be substitutions). i = 0 for param in parameters: - cmd += ['-f', LocalSubstitution( + cmd += ['--params-file', LocalSubstitution( "ros_specific_arguments['params'][{}]".format(i), description='parameter {}'.format(i))] i += 1