saveGains saves gains for group to disk (XML)
This method saves gains from a GainStruct in a human
readable format on disk. This allows safety parameters to
be saved, revisioned, and shared across different APIs.
This format is the preferred way of storing and loading parameters
for different demos / applications. More information on the gains
XML format can be found at:
https://github.com/HebiRobotics/hebi-xml/blob/master/GAINS.md
Note that this includes only the control strategy and the
corresponding gains, and may exclude some fields such as 'time' or
'mStopStrategy'.
Examples:
% Make a new set of gains and save to XML
gains = GainStruct(); % alt: group.getGains();
gains.positionKp = [1 1 1 1];
gainFile = HebiUtils.saveGains(gains, 'MyGains');
display(gainFile);
% Save gains that are currently set for a group
gains = group.getGains();
gainFile = HebiUtils.saveGains(gains, 'MyGains');
display(gainFile);