Description
It is brought to my attention dynamic parameter handling matured in Humble that allows us to use the add_post_set_parameters_callback
instead of add_on_set_parameters_callback
for processing parameter updates into member functions. This was brought up from a conversation started by @pepisg and myself on MPPI dynamic parameter handling issues and explained in ros2/rclcpp#2735 by Chris. We should not be using the on_set one anymore and should be using the post- condition once the parameter updates have been accepted.
The tl;dr minimum of this ticket is to: Update globally all of the add_on_set_parameters_callback
to use add_post_set_parameters_callback
instead and update the dynamic parameter callback if the signature changes. Update the on_set callback to contain any validity checking and post-set for actually making the state updates.
This is a really nice first contribution that touches alot of code!
Secondarily, many nodes are not as well organized with larger sets of parameters like MPPI and RPP with parameter handler objects. Along with the migration, we should consider making that also a global pattern of having all objects have parameter handlers to manage the parameter's state and dynamic callbacks to simplify the application code and have consistency architecturally.
Also a really nice first-contribution that gets folks into the architecture a little!