HybridRobotics / CBF-CLF-Helper

Matlab Interface for Control Barrier Function (CBF) and Control Lyapunov Function (CLF) based control methods.
257 stars 64 forks source link

Too many input arguments? #6

Closed shuangsw closed 2 years ago

shuangsw commented 3 years ago

When I run the 2DDI case, MATLAB says" Error using DoubleIntegrator2D \ too many input arguments".

ChoiJangho commented 3 years ago

Hi, can you share which line of code produces the error? On my machine, I don't have the same error message.

shuangsw commented 3 years ago

The class definition code produces the error. This error also appears for the InvertedPendulum and DubinsCar case on my machine. It runs well after I added the function “obj” in method block of class definition. Thank you for your code.

ChoiJangho commented 3 years ago

Hi @shuangsw , can you please share the entire error messages with me before your fix? Also, can you point me to the part where you made the modification? Thanks a lot!

shuangsw commented 3 years ago

Yes, sure. But I am not sure whether it appears for the reason of different MATLAB version. I am using the old version 2017. One example of the error message: Error using DubinsCar Too many input arguments. Error in run_cbf_clf_simulation_dubins_car (line 24) dubins = DubinsCar(params);

What I add in method block in DubinsCar: function obj = DubinsCar(params) obj = obj@CtrlAffineSys(params);
end

Oghentega commented 2 years ago

When I run the ACC case, MATLAB says; "Undefined function or variable 'ACC'.

Error in run_cbf_clf_simulation_acc (line 33) accSys = ACC(params); "

Please, see the attached screenshot for details of the error message. PS: It gave me a similar error also for the other case. Am using MATLAB R2019a.

SharedScreenshot

Thanks.

tinytinywell commented 2 years ago

When I run the ACC case, MATLAB says; "Undefined function or variable 'ACC'.

Error in run_cbf_clf_simulation_acc (line 33) accSys = ACC(params); "

Please, see the attached screenshot for details of the error message. PS: It gave me a similar error also for the other case. Am using MATLAB R2019a.

SharedScreenshot

Thanks.

Hello, I have this problem too, have you figured out why this error occurs?

ChoiJangho commented 2 years ago

@tinytinywell Please add the main directory of the library and all the subdirectories to the Matlab path before running the script. You can do this by typing: addpath(genpath("YOURROOTPATHNAME")) in the matlab command window where your root path name is something like C:/Username/cbf_clf_helper. Please let me know if this fixed the error.

tinytinywell commented 2 years ago

@tinytinywell Please add the main directory of the library and all the subdirectories to the Matlab path before running the script. You can do this by typing: addpath(genpath("YOURROOTPATHNAME")) in the matlab command window where your root path name is something like C:/Username/cbf_clf_helper. Please let me know if this fixed the error.

It works, thank you very much!!