Closed matijazigic closed 3 years ago
Many thanks for pointing this out and for providing a fix.
One problem now is the dynamic reconfigure namespace is in a different namespace to the rosparam server, only for collision avoidance. This can be seen here: https://github.com/rst-tu-dortmund/mpc_local_planner/blob/5b4e465fec718245484e8668e6dd45539ca37983/mpc_local_planner/src/mpc_local_planner_ros.cpp#L196
The fix is to modify collision
to collision_avoidance
like this:
ros::NodeHandle collision_nh(nh, "collision_avoidance");
You can see an example where the collision_avoidance
namespace is correctly used in other code:
https://github.com/rst-tu-dortmund/mpc_local_planner/blob/5b4e465fec718245484e8668e6dd45539ca37983/mpc_local_planner/src/mpc_local_planner_ros.cpp#L117
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