Open dhruvthanki opened 3 years ago
Hi @dhruvthanki, thanks for the issue. Just to understand, what does your program print? The Solver object does not print anything and it is supposed to do nothing until you set the problem and call the solve method.
So if I just compile and run the above code, should it print the following in the terminal or not?
Hello1
Hello2
So if I just compile and run the above code, should it print the following in the terminal or not?
Hello1 Hello2
I think so! Does it get stuck before?
If I run it without instantiating the solver in the main, I get the first output. If I run it with the instantiation, I get the second output:
Ok, that seems to be crashing then.
I wonder if that is because you are linking also osqpstatic
. OsqpEigen is already linking osqp. Can you try to not link to osqpStatic
?
If that is not the case, can you try to launch the tests of OsqpEigen
?
I build the MPCExample and launched the MPCExample.exe. No changes to the CmakeLists.txt that was in the example dir. No Error while building, no error while running. The display output option is turned on.
solver.settings()->setVerbosity(true);
Can you try to avoid linking the osqp::osqpstatic
target? As @S-Dafarra mentioned, OsqpEigen::OsqpEigen
already links the shared target osqp::osqp
, and mixing the two can create strange behaviors.
If also the example crashes, I think that OsqpEigen
did not compile correctly. Can you list the commands you used to compile osqp
and OsqpEigen
, as suggested in https://github.com/robotology/osqp-eigen/issues/77#issuecomment-826065428?
Probably it would be better to start with some clean builds.
Also, make sure you don't have any other osqp
installations on your system. Some projects, like acados
, are used to ship a version of osqp
that is not compatible with OsqpEigen
(see https://github.com/robotology/osqp-eigen/issues/81 for example).
This is how I build the wrapper: (I am using windows btw)
This is my CmakeLists.txt file:
I am able to compile and run the "osqp" example problems from their website. I am able to include the OsqpEigen.h in my project. When I just instantiate the solver using the wrapper, I am able to build and run the .exe but no output that I was expecting is generated. Just builds and runs with zero errors and nothing happens.