Skip to content

Commit 39072de

Browse files
Roger Strainmlanting
authored andcommitted
Add node prefix to command line remaps
Distro A; OPSEC #4584 Signed-off-by: Roger Strain <[email protected]>
1 parent 67ed746 commit 39072de

File tree

1 file changed

+2
-2
lines changed
  • launch_ros/launch_ros/descriptions

1 file changed

+2
-2
lines changed

launch_ros/launch_ros/descriptions/node.py

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

216216
def _get_parameter_rule(self, param: 'Parameter', context: LaunchContext):
217217
name, value = param.evaluate(context)
218-
return f'{name}:={yaml.dump(value)}'
218+
return f'{self.__expanded_node_name}:{name}:={yaml.dump(value)}'
219219

220220
def prepare(self, context: LaunchContext, executable: Executable, action: Action) -> None:
221221
self._perform_substitutions(context, executable.cmd)
@@ -316,7 +316,7 @@ def _perform_substitutions(self, context: LaunchContext, cmd: List) -> None:
316316
if self.__expanded_remappings:
317317
cmd_ext = []
318318
for src, dst in self.__expanded_remappings:
319-
cmd_ext.extend(['-r', f'{src}:={dst}'])
319+
cmd_ext.extend(['-r', f'{self.__expanded_node_name}:{src}:={dst}'])
320320
cmd.extend([normalize_to_list_of_substitutions(x) for x in cmd_ext])
321321
# Prepare the ros_specific_arguments list and add it to the context so that the
322322
# LocalSubstitution placeholders added to the the cmd can be expanded using the contents.

0 commit comments

Comments
 (0)