Giter VIP home page Giter VIP logo

qpoases's People

Contributors

francesco-romano avatar gabrielenava avatar giulero avatar jeljaik avatar traversaro avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qpoases's Issues

Possible bug in qpOASES when using equality constraints

It seems there is a bug inside the qpOASES algorithm when performing a constrained optimization with equality constraints. In particular, consider the following optimization problem:

 min |u|^2

   s.t. Au = 0

where u is a [29 * 1] vector and A is a [6 * 29] matrix with rank 6. In theory, this problem is well posed and the solution is u = 0.

However, for some valid constraint matrices A qpOASES cannot find a solution, and returns the following error:

ERROR:  Division by zero
->ERROR:  Abnormal termination due to TQ factorisation
  ->ERROR:  Determination of step direction failed
    ->ERROR:  Abnormal termination due to TQ factorisation
      ->ERROR:  Initialisation failed! QP could not be solved!

Attached to this script there is a matlab code with an example. The constraint matrix is stored in a .mat file (attached to the issue, too) and is of the form:

A = [   0         0         0    1.0000   -0.0000    0.0000         0         0         0     0         0         0         0         0         0         0         0   -0.0000     1.0000    0.0003   -0.0000    0.0000    1.0000         0         0         0         0     0    0
        0         0         0   -0.0000    1.0000    0.0000         0         0         0     0         0         0         0         0         0         0         0   -1.0000    -0.0000    0.0001   -1.0000    1.0000   -0.0000         0         0         0         0     0    0
        0         0         0    0.0000    0.0000    1.0000         0         0         0     0         0         0         0         0         0         0         0    0.0001    -0.0003    1.0000    0.0001   -0.0001   -0.0000         0         0         0         0     0    0
        0         0         0    1.0000   -0.0000    0.0000         0         0         0     0         0         0         0         0         0         0         0         0          0         0         0         0         0         0         0         0         0     0    0
        0         0         0   -0.0000    1.0000    0.0000         0         0         0     0         0         0         0         0         0         0         0         0          0         0         0         0         0         0         0         0         0     0    0
        0         0         0    0.0000    0.0000    1.0000         0         0         0     0         0         0         0         0         0         0         0         0          0         0         0         0         0         0         0         0         0     0    0 ]

The matrix is full rank, as it is possible to see by looking at the singular values after SVD decomposition:

    sigma = [ 2.0743
              1.8478
              1.6180
              0.8350
              0.7654
              0.6180 ]

Also, relaxing the problem with inequality constraints of the form:


min |u|^2

s.t. -eps < Au < eps
       eps >0

did not solve the issue. As an additional information, note that in case the problem is unfeasible the error from qpOASES is different.

testQPOASES.zip

Submit changes upstream?

@francesco-romano I guess you are not planning to add cmake support for building other bindings, so I guess we can go on and submit our modification upstream (better rpath support and matlab bindings compiled in cmake) so we can drop this fork.

`Gateway function is missing` error using qpOASES and Matlab 2019a

I've encountered this problem calling qpOASES in Matlab2019a (Ubuntu 18.04).

The error message was:
Invalid MEX-file '~/robotology-superbuild/build/install/mex/qpOASES.mexa64': Gateway function is missing

@traversaro solved the problem commenting these lines:

set_target_properties(${${prefix}_NAME}
  PROPERTIES
    CXX_VISIBILITY_PRESET "hidden"
    C_VISIBILITY_PRESET "hidden"
    VISIBILITY_INLINES_HIDDEN "hidden"
)

in robotology-superbuild/external/qpOASES/cmake/FindMatlab.cmake

Migrate project to use FetchContent and custom CMake files

As the probability of the improvements in the CMake being merged upstream is really low, I think it would improve maintainability to strictly separate the raw files coming from the qpOASES tarball, and our own CMake files. In this way, updating to a new qpOASES should be simpler. One possibility is event to fetch the source code during the configuration phase using CMake's FetchContent module.
I think this projects would be a good example:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.