21 Substitution that checks if a param file contains parameters for a node.
27 self, source_file: launch.SomeSubstitutionsType, node_name: str
31 Construct the substitution
33 :param: source_file the parameter YAML file
34 :param: node_name the name of the node to check
38 from launch.utilities
import normalize_to_list_of_substitutions
40 self.__source_file: list[launch.Substitution] = \
41 normalize_to_list_of_substitutions(source_file)
45 def name(self) -> list[launch.Substitution]:
46 """Getter for name."""
47 return self.__source_file
50 """Return a description of this substitution as a string."""
53 def perform(self, context: launch.LaunchContext) -> str:
54 yaml_filename = launch.utilities.perform_substitutions(context, self.
namename)
55 data = yaml.safe_load(open(yaml_filename))
list[launch.Substitution] name(self)