2020-02-17 18:21:20 +01:00
|
|
|
function [] = initializeController(args)
|
|
|
|
|
|
|
|
arguments
|
2020-04-02 15:29:38 +02:00
|
|
|
args.type char {mustBeMember(args.type,{'open-loop', 'iff', 'dvf', 'hac-dvf', 'ref-track-L', 'ref-track-iff-L', 'cascade-hac-lac', 'hac-iff', 'stabilizing'})} = 'open-loop'
|
2020-02-17 18:21:20 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
controller = struct();
|
|
|
|
|
|
|
|
switch args.type
|
|
|
|
case 'open-loop'
|
|
|
|
controller.type = 1;
|
2020-04-15 10:56:18 +02:00
|
|
|
controller.name = 'Open-Loop';
|
2020-02-17 18:21:20 +01:00
|
|
|
case 'dvf'
|
|
|
|
controller.type = 2;
|
2020-04-15 10:56:18 +02:00
|
|
|
controller.name = 'Decentralized Direct Velocity Feedback';
|
2020-02-17 18:21:20 +01:00
|
|
|
case 'iff'
|
|
|
|
controller.type = 3;
|
2020-04-15 10:56:18 +02:00
|
|
|
controller.name = 'Decentralized Integral Force Feedback';
|
2020-03-13 17:40:22 +01:00
|
|
|
case 'hac-dvf'
|
|
|
|
controller.type = 4;
|
2020-04-15 10:56:18 +02:00
|
|
|
controller.name = 'HAC-DVF';
|
2020-03-23 09:56:01 +01:00
|
|
|
case 'ref-track-L'
|
|
|
|
controller.type = 5;
|
2020-04-15 10:56:18 +02:00
|
|
|
controller.name = 'Reference Tracking in the frame of the legs';
|
2020-03-23 09:56:01 +01:00
|
|
|
case 'ref-track-iff-L'
|
|
|
|
controller.type = 6;
|
2020-04-15 10:56:18 +02:00
|
|
|
controller.name = 'Reference Tracking in the frame of the legs + IFF';
|
2020-03-23 09:56:01 +01:00
|
|
|
case 'cascade-hac-lac'
|
|
|
|
controller.type = 7;
|
2020-04-15 10:56:18 +02:00
|
|
|
controller.name = 'Cascade Control + HAC-LAC';
|
2020-03-25 19:23:22 +01:00
|
|
|
case 'hac-iff'
|
|
|
|
controller.type = 8;
|
2020-04-15 10:56:18 +02:00
|
|
|
controller.name = 'HAC-IFF';
|
2020-04-02 15:29:38 +02:00
|
|
|
case 'stabilizing'
|
|
|
|
controller.type = 9;
|
2020-04-15 10:56:18 +02:00
|
|
|
controller.name = 'Stabilizing Controller';
|
2020-02-17 18:21:20 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
save('./mat/controller.mat', 'controller');
|