Skip to content

Commit

Permalink
Bicop EMPC fix for UNO
Browse files Browse the repository at this point in the history
  • Loading branch information
NemcekMartin committed May 28, 2024
1 parent 417a8f8 commit 46faef5
Show file tree
Hide file tree
Showing 8 changed files with 2,821 additions and 2,629 deletions.
2 changes: 1 addition & 1 deletion examples/BicopShield/BicopShield_EMPC/BicopShield_EMPC.ino
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
a predetermined reference trajectory. Upload the code to your board
and open the Serial Plotter tool in Arduino IDE.
Tested on an UNO(max prediction horizon 3).
Tested on an UNO(max prediction horizon 1).
This code is part of the AutomationShield hardware and software
ecosystem. Visit http://www.automationshield.com for more
Expand Down
1,356 changes: 43 additions & 1,313 deletions examples/BicopShield/BicopShield_EMPC/ectrl.h

Large diffs are not rendered by default.

1,366 changes: 1,366 additions & 0 deletions examples/BicopShield/BicopShield_EMPC/ectrl_due.h

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
xhat = zeros(2,1); % States estimated by Kalman filter
yhat = zeros(1,1); % Outputs estimated by Kalman filter
Y = zeros(1,1);
kalmanrychlost=zeros(1,length(measuredOutput));
%kalmanrychlost=zeros(1,length(measuredOutput));
disp('Simulating...')
for k=1:length(t)-1
Rr(k)=R(i); % Original reference, just for logging
Expand Down Expand Up @@ -168,7 +168,7 @@
%% export controller files for usage in arduino example and Python
if exportempc
ectrl.exportToC('ectrl','cmpc') % Export to C
empcToC(ectrl,'AVR'); % Export to code, for ARM MCU use 'generic', for AVR use 'AVR'
empcToC(ectrl,'generic'); % Export to code, for ARM MCU use 'generic', for AVR use 'AVR'
% empcToPython(ectrl); % Export to code suitable for Python
end

Expand Down
Binary file not shown.
1,356 changes: 43 additions & 1,313 deletions matlab/examples/BicopShield/BicopShield_EMPC/ectrl.h

Large diffs are not rendered by default.

1,366 changes: 1,366 additions & 0 deletions matlab/examples/BicopShield/BicopShield_EMPC/ectrl_due.h

Large diffs are not rendered by default.

Binary file not shown.

0 comments on commit 46faef5

Please sign in to comment.