here is Yifan, first of all great thanks to all the development of such
a magnificent work!
I am currently working on a MPC-Control project which allows the
controller to track a reference trajectory. For the purpose of tracking
i have written some C functions to read and use the Trajectory data,
besides i have also modified some original source file to to make this work.
The Program runs in C (main.c file) pretty well, for the next step I
would like to build a Simulink model in Matlab, for which it is
necessary to install Grampc in matlab as said in the Manual. My question
is, since I have changed some source and head file and also added some
new one, can I still simply run the MAKE command in matlab? I've tried
it several times but it didn't work well, the error report is:
basically, you should still be able to use the Matlab/Simulink-interface of GRAMPC. However, depending on your modifications to the C-code of GRAMPC you also have to modify some parts of the mex-interface. From your error messages it appears that you have changed the interface of grampc_init, which then requires that you also change the function calls of grampc_init in all of the mex-files. If possible, I would suggest to keep the changes to the function definitions of GRAMPC as small as possible to minimize the necessary work for adapting the Matlab interface. From my experience, most custom usecases can be realized with some effort via the userparam field.
Best regards,
Andreas Völz
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
here is Yifan, first of all great thanks to all the development of such
a magnificent work!
I am currently working on a MPC-Control project which allows the
controller to track a reference trajectory. For the purpose of tracking
i have written some C functions to read and use the Trajectory data,
besides i have also modified some original source file to to make this work.
The Program runs in C (main.c file) pretty well, for the next step I
would like to build a Simulink model in Matlab, for which it is
necessary to install Grampc in matlab as said in the Manual. My question
is, since I have changed some source and head file and also added some
new one, can I still simply run the MAKE command in matlab? I've tried
it several times but it didn't work well, the error report is:
Thanks a lot in advance.
Best regards,
Yifan Zhang
Dear Yifan Zhang,
basically, you should still be able to use the Matlab/Simulink-interface of GRAMPC. However, depending on your modifications to the C-code of GRAMPC you also have to modify some parts of the mex-interface. From your error messages it appears that you have changed the interface of grampc_init, which then requires that you also change the function calls of grampc_init in all of the mex-files. If possible, I would suggest to keep the changes to the function definitions of GRAMPC as small as possible to minimize the necessary work for adapting the Matlab interface. From my experience, most custom usecases can be realized with some effort via the userparam field.
Best regards,
Andreas Völz