generate_parameter_library
generate_parameter_library copied to clipboard
Add ability for param_listener to load values from yaml dictionary
This PR makes it so the parameter_listener can refresh it's copy of parameters with ones specified in a yaml dictionary and would close #208.
To load and the get the parameters
self.param_listener = my_param_namespace.ParamListener(self.node)
path_to_config = os.path.dirname(__file__) + '/config/my_config_file.yaml'
with open(path_to_config) as file:
configParamsFromYaml = yaml.safe_load(file)['my_param_namespace']['ros__parameters']
self.param_listener.set_params_from_dict(configParamsFromYaml)
self.test_params = self.param_listener.get_params()