Changing controller gains online

Hi everyone I would like to change the pitch roll and yaw gains of the body rate controller and the attitude controller dynamically in flight.

Is there any way to do this ? For example being able to do this directly from ROS2 would be great !