Skip to content

Commit 59a09b2

Browse files
committed
More unit test fixes.
Distro A, OPSEC #4584. You may have additional rights; please see https://rosmilitary.org/faq/?category=ros-2-license Signed-off-by: matthew.lanting <[email protected]>
1 parent d3d8a97 commit 59a09b2

File tree

2 files changed

+7
-7
lines changed
  • launch_ros/launch_ros/descriptions
  • test_launch_ros/test/test_launch_ros/actions

2 files changed

+7
-7
lines changed

launch_ros/launch_ros/descriptions/node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def _create_params_file_from_dict(self, params):
273273

274274
def _get_parameter_rule(self, param: 'Parameter', context: LaunchContext):
275275
name, value = param.evaluate(context)
276-
return f'{self.__expanded_node_name}:{name}:={yaml.dump(value)}'
276+
return f'{name}:={yaml.dump(value)}'
277277

278278
def prepare(self, context: LaunchContext, executable: Executable, action: Action) -> None:
279279
self._perform_substitutions(context, executable)
@@ -385,7 +385,7 @@ def _perform_substitutions(self, context: LaunchContext, executable: Executable)
385385
if self.__expanded_remappings:
386386
cmd_ext = []
387387
for src, dst in self.__expanded_remappings:
388-
cmd_ext.extend(['-r', f'{self.__expanded_node_name}:{src}:={dst}'])
388+
cmd_ext.extend(['-r', f'{src}:={dst}'])
389389
cmd.extend([normalize_to_list_of_substitutions(x) for x in cmd_ext])
390390
# Prepare the ros_specific_arguments list and add it to the context so that the
391391
# LocalSubstitution placeholders added to the the cmd can be expanded using the contents.

test_launch_ros/test/test_launch_ros/actions/test_node.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,11 @@ def test_launch_node_with_parameter_descriptions(self):
195195
name, value = item.split(':=')
196196
parameters.append((name, yaml.safe_load(value)))
197197
assert parameters == [
198-
('my_node:param1', 'param1_value'),
199-
('my_node:param2', ['param2', '_value']),
200-
('my_node:param_group1.list_params', [1.2, 3.4]),
201-
('my_node:param_group1.param_group2.param2_values', ['param2_value']),
202-
('my_node:param3', ''),
198+
('param1', 'param1_value'),
199+
('param2', ['param2', '_value']),
200+
('param_group1.list_params', [1.2, 3.4]),
201+
('param_group1.param_group2.param2_values', ['param2_value']),
202+
('param3', ''),
203203
]
204204

205205
def test_launch_node_with_parameter_dict(self):

0 commit comments

Comments
 (0)