rst-tu-dortmund / mpc_local_planner

The mpc_local_planner package implements a plugin to the base_local_planner of the 2D navigation stack. It provides a generic and versatile model predictive control implementation with minimum-time and quadratic-form receding-horizon configurations.
http://wiki.ros.org/mpc_local_planner
GNU General Public License v3.0
545 stars 143 forks source link

Prevent reconfigure from overwriting parameters at the initialization #24

Closed matijazigic closed 3 years ago

matijazigic commented 3 years ago

During my testing, I run into one bug regarding reconfigure parameters loading. During initialization parameters from launch files and .yamls will be overwritten with the default ones from the .cfg file. To prevent this to be happening, params from .yamls and ones from .cfg files should have the same names. Now, they don't have the same names due to missing prefixes - controller, footprint_model and 'collision' inside .cfg files, so parameters from .yaml files are overwritten inside reconfigure callback.

Config file cheks is there parameter with the same name, if there is, the default value from params server will be used, and not the one specified from the user inside cfg file. See: https://answers.ros.org/question/28327/dynamic-reconfigure-default-parameters/?answer=28332#post-id-28332

amakarow commented 3 years ago

Many thanks for pointing this out and for providing a fix.