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

Add easily available QP solver backend #22

Open
rtkg opened this issue Dec 17, 2016 · 5 comments
Open

Add easily available QP solver backend #22

rtkg opened this issue Dec 17, 2016 · 5 comments
Assignees

Comments

@rtkg
Copy link
Collaborator

rtkg commented Dec 17, 2016

To ease sharing the code, it might be nice to integrate an easily available (either directly in ROS or via debian) QP solver as default without the need to go through the hoops of acquiring a Gurobi license. Then, there could be a launch file parameter to switch between solvers if users have, e.g., Gurobi set-up.

Possibilities could be:

  • qpOASES
  • CGAL
  • IPOPT (actually a full-blown non-linear programming solver)
@neckutrek
Copy link
Collaborator

neckutrek commented Dec 17, 2016 via email

@rtkg
Copy link
Collaborator Author

rtkg commented Dec 17, 2016

Yes, another option. However then a user would need to compile the code herself, which might not be so nice with having a ROS release in mind where the user would just get the binaries.

@ksatyaki ksatyaki self-assigned this Aug 24, 2017
@ksatyaki
Copy link
Collaborator

ksatyaki commented Aug 26, 2017

Hello guys,

I have started work on using qpOASES as the QP solver.
I have:

  • made a copy of the GurobiSolver class. Renamed stuff appropriately.
  • changed some structs inside the copied class to suit qpOASES port.

Looking at example1.cpp from qpOASES, it seems to me that an approach similar to the final assignment of the Robot Control course should work. Since I am not familiar with gurobi, I want a little bit of help from @rtkg or @neckutrek . Hopefully you should be able to answer this very quickly.

I am not sure how gurobi fixes the slack variables. Please take a look at the fairly simple user manual for qpOASES. I want to know if my understanding is correct. (All symbols are the same as in page 19 of the qpOASES manual).

  • For geq tasks, we need to set lbA to the rhs constant and set ubA to +INF.
  • For leq tasks, we need to set ubA to the rhs constant and set lbA to -INF.
  • Matrix H is always square with dim = (no of joints + no of dims in current stage).
  • Matrices H and A will have to be constructed with x = Augmented w-q_dot vector in mind.

So if we are solving the second stage and if first stage had 2 tasks and a second stage has 3 tasks,

A =| J(2 x 1) 0(2 x 3) |
. . .| J(3 x 1) I(3 x 3) |

J is task jacobian
0 is a zero matrix and I is the identity matrix.

Does it look right?
I am guessing that this is what is done in Gurobi too, but gurobi itself takes care of some of the details as I only see Gurobi Linear Expressions in use.

If this is correct then there is very little work to finish to have a qpOASES solver back-end in place. HiQP can then be released !

Thanks
Chittaranjan

EDIT: A version that compiles and successfully executes the joint_configuration task has been uploaded. Needs further debugging and extensive testing though. Let me know what you think.

@ksatyaki
Copy link
Collaborator

And by the way, I've opened devel-qpoases for this purpose.

@neckutrek
Copy link
Collaborator

neckutrek commented Aug 28, 2017 via email

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

No branches or pull requests

3 participants