Use of RewrittenYaml in launch of nav2 stack and providing controller plugin params from a separate yaml file
I am creating a controller plugin for the nav2 stack. I have added the params of my controller plugin by replacing those of the DWB controller in the nav2_params.yaml file as per the tutorials. My plugin is working as expected. I want to now separate the params of my controller plugin from the rest of the nav2 params by providing them from a separate yaml file. When I traced the way in which the nav2 stack is launched from the nav2_bringup package, I noticed that RewrittenYaml is used in both the localization_launch.py and navigation_launch.py files.
I have two questions.
1) How can I provide the params of my controller plugin from a separate yaml file and the remaining params from another yaml file?
2) What is the use of RewrittenYaml and why is it used in the launch system?
I am using Ubuntu 20.04 with ROS2 Foxy
Thanks for the help in advance