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

Make the code compatible with OSQP v1.0.0 #131

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

gergondet
Copy link
Contributor

This PR updates osqp-eigen to be compatible with OSQP v1.0.0 (currently in beta). I have kept the API of osqp-eigen (almost) identical

The following things are known to not work (and afaik cannot be done with OSQP v1.0.0)

  • bool OsqpEigen::Solver::getPrimalVariable(Eigen::Matrix<T, n, 1> &dualVariable) and bool OsqpEigen::Solver::getDualVariable(Eigen::Matrix<T, m, 1> &dualVariable) return the solution held in the solution rather than the values in the workspace (which are not accessible anymore)
  • bool OsqpEigen::Solver::clearSolverVariables() is a no-op since workspace is opaque now

Otherwise I can at least confirm the unit tests pass but I haven't tried much more.

@traversaro
Copy link
Member

Thanks a lot @gergondet ! fyi @GiulioRomualdi @S-Dafarra

@traversaro
Copy link
Member

Sorry for the unrelated CI failure, it should be fixed by #133 .

- Use trailing return type to disambiguate use of namespace for OSQPData
- Fix typo in pre 1.0.0 code
@gergondet
Copy link
Contributor Author

Thanks @traversaro

I have rebased on the lastest master and it all seems green now (the latest Windows failure is a network hiccup I guess)

The Codacity warnings are wrong, the members are used since the structure replaces the OSQPData structure from the old API

@GiulioRomualdi
Copy link
Member

Thank you @gergondet! Your work is much appreciated, and we're grateful for the time and effort you put into it! I want to apologize for the long delay in reviewing and merging your PR.

@GiulioRomualdi GiulioRomualdi merged commit 957f92e into robotology:master Aug 1, 2023
11 of 13 checks passed
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

Successfully merging this pull request may close these issues.

None yet

3 participants