generate_parameter_library icon indicating copy to clipboard operation
generate_parameter_library copied to clipboard

Add ability for param_listener to load values from yaml dictionary

Open MarqRazz opened this issue 1 year ago • 1 comments

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()

MarqRazz avatar Jul 17 '24 19:07 MarqRazz