As a long time ROS user with complex launch scripts, I have always been frustrated by the fact that yaml files cannot reference other yaml files. I recently found this python package (https://github.com/tanbro/pyyaml-include) that adds this functionality to python-yaml. Basically, it will capture '!include 1.yaml' and replace it with the contents of a file named '1.yaml'. This seems like an easy to implement feature for rosparam.
Simply replace
import yaml
with
import yaml
from yamlinclude import YamlIncludeConstructor
YamlIncludeConstructor.add_to_loader_class(loader_class=yaml.SafeLoader, base_dir='')
I would summit this as pull request ,but I am not sure how to add pyyaml-include, which is only available through pip, as a dependency.
As a long time ROS user with complex launch scripts, I have always been frustrated by the fact that yaml files cannot reference other yaml files. I recently found this python package (https://github.com/tanbro/pyyaml-include) that adds this functionality to python-yaml. Basically, it will capture '!include 1.yaml' and replace it with the contents of a file named '1.yaml'. This seems like an easy to implement feature for rosparam.
Simply replace
with
I would summit this as pull request ,but I am not sure how to add pyyaml-include, which is only available through pip, as a dependency.