On this page, you will learn how to tweak the mpc controller gains or updates the mechanical properties of the AUV in proc-control.
In the past, all parameters was located in the code itself, so even the smallest modification require to recompile proc-control, generating a new docker image. Therefore long timeout happen between modification wich wasn't efficent during pool testing.
On top of that, we are now operating with 2 AUVs. It was necessary to develop a mechanism that allows to tunes the controller parameters without iterrupt the execution of proc_control. Moreover the idea can be extended where each AUV have its own parameters files. So they can both run the same code.
Proc_control is design such as it's doesn't need modification in the code when a new AUV will be built.
It was decided to use rosparam to expose all paramters. the YAML format is easy to work with and ROS provide a lot of command to interact.
All parameters are well documented in the files themselves where they can be found in the proc-control repositoryunder de config folder
At the start of proc_control node, it will look at the $AUV environement variable to load the correct parameter file in the config folder. For exemple, on AUV8, the $AUV variable is AUV8. So it will load AUV8.YAML.
So if you are plannig the next AUV, make sure that
$AUVenvironement variable on the onboard computer match the new parameter files .
In order to change the controller parameters on the AUV, you will need one of the following.
The step to follow to tweak and push the controller parameters on the AUV on the side of the pool will be explain.
Changing the controller parameters can bring the AUV in a instability state where dangerous maneuvers can occurs USE CAUTION, ALLWAYS DO THESE MODIFICATIONS FAR FROM EVERYTHING WITH ALERTED DIVERS
ros_connect_auv7 ros_connect_auv8, or you can connect manually with this two commands export ROS_MASTER_URI=http://{AUV IP}:11311/ and export ROS_IP={YOUR_IP_ADDRESS} .rosparam load {path to the parameter file on your computer }For safety reason and to avoid weird controller behavior, proc-control only update its parameters when Soft kill mode is activated.
You can allways restart the proc-control container to reset the parameters to its default value.