Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tlc file error occurred while generating the code #53

Open
sinnoha opened this issue Dec 8, 2023 · 1 comment
Open

tlc file error occurred while generating the code #53

sinnoha opened this issue Dec 8, 2023 · 1 comment

Comments

@sinnoha
Copy link

sinnoha commented Dec 8, 2023

Hello,
I created a new Simulink model following the steps of osqp/osqp#113 (comment) and the simulation worked fine,

image

but when I generated the code, I got the following error

Error:Error: File: C:\Program Files\MATLAB\R2023a\rtw\c\tlc\lib\blkiolib.tlc Line: 2429 Column: 13
The == and != operators can only be used to compare values of the same type

here is the model file and detail error message :
err_msg.txt
osqp_demo.zip

Can anyone give me some help or advice? Thanks!

BTW, I can generate the code for the example model quadcopter_example_codegen

@sinnoha
Copy link
Author

sinnoha commented Dec 12, 2023

In shorts, I solved the problem with the following modifications. The problem comes from an out of the range error,

tlc_repair

I'm not sure if this is a bug or not, I'll add more information after verifying the generated code in detail. (and learn more about OSQP to figure out the meaning of x, y, prim_inf_cert, dual_inf_cert)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant