jrl-umi3218 / mc_rtc

mc_rtc is an interface for simulated and real robotic systems suitable for real-time control
BSD 2-Clause "Simplified" License
122 stars 36 forks source link

[mc_control] Add overwrite support for configuration #339

Closed gergondet closed 1 year ago

gergondet commented 1 year ago

Allow functionalities similar to those discussed in https://github.com/isri-aist/BaselineWalkingController/pull/12

The approach relies on installed files rather than nested keys in the configuration but can achieve the same effect, i.e., overwrite any main configuration entry from extraneous files

As noted in the doxygen, the extra configuration files are loaded after the robots' specific files for the robot that are provided at construction but after the ones loaded through the robots entry. Otherwise it would become really hard to track the loading order since those extra files can themselves specify extra robots to load.

mmurooka commented 1 year ago

Thank you for the changes. @gergondet

I was not sure about the above comment and Doxygen's comment, but the order of loading configuration files is exactly to load and set robot-specific configuration files first, and then load and set extra configuration files, right?

gergondet commented 1 year ago

I was not sure about the above comment and Doxygen's comment, but the order of loading configuration files is exactly to load and set robot-specific configuration files first, and then load and set extra configuration files, right?

Not exactly, and maybe the documentation is not clear enough about this, the loading is a follows: (in every instance, there is always a installed -> local loading order)

This allows the overwrite keys to insert new robots into the robots entry and to have those robots' specific files be loaded as well. This also allows the overwrite set to overwrite init_pos for every robots.