-
Notifications
You must be signed in to change notification settings - Fork 108
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 trajopt_ifopt and trajopt_sqp #116
Add trajopt_ifopt and trajopt_sqp #116
Conversation
@Levi-Armstrong Could you take a quick look at this? I've got joint position variables and joint position constraint. Mostly I'd like to make sure I'm not doing something blatantly wrong, have the cmake set up correctly, have tests set up correctly, etc. |
4e3c781
to
f9af683
Compare
Adds the trajopt IFOPT package. Includes joint position and velocity constraints as well as the squared error cost. Includes 2 small examples of usage with IPOPT
f9af683
to
5b1b28d
Compare
@Levi-Armstrong I think this is probably all of the costs/cnts I will do for now. I'll transition to working on the solver interface now. |
b2441fd
to
165cf5a
Compare
165cf5a
to
051694b
Compare
If set, the state is pulled from the environment rather than from the frozen state solver fix clang
I added these methods to make them easier to call without an IFOPT problem. The joint terms didn't seem to make a lot of sense because they operate on multiple ifopt variables.
The old method solved a QP to get a feasible point, but that could sometimes change the starting point from the one passed in.
Adds a flag to the SQP optimizer and the OSQP interface. If both are true, then it prints all SQP Results, writes the model to a file in a human readable format, and prints the optimizer matrices to the terminal.
These are necessary since the callbacks are divided up now and not associated with the cost terms themselves. To replicate trajopt_sco behavior add a clear plotter callback, then the cost term callbacks, and finally the wait for input.
@Levi-Armstrong You don't have any problems with the new code in this PR being Apache 2 do you? I was going to add the notices. |
Nope. That is the preferred license. |
@Levi-Armstrong I think this is ready for you to review. Disclaimers
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have reviewed half of the files. In addition to the provided comments it looks like the tests withing trajopt_ifopt is missing license information.
trajopt_ifopt/include/trajopt_ifopt/constraints/cartesian_position_constraint.h
Outdated
Show resolved
Hide resolved
trajopt_ifopt/include/trajopt_ifopt/constraints/inverse_kinematics_constraint.h
Show resolved
Hide resolved
trajopt_ifopt/include/trajopt_ifopt/constraints/inverse_kinematics_constraint.h
Show resolved
Hide resolved
trajopt_ifopt/include/trajopt_ifopt/constraints/joint_velocity_constraint.h
Outdated
Show resolved
Hide resolved
trajopt_optimizers/trajopt_sqp/include/trajopt_sqp/trust_region_sqp_solver.h
Show resolved
Hide resolved
trajopt_optimizers/trajopt_sqp/test/cart_position_optimization_unit.cpp
Outdated
Show resolved
Hide resolved
trajopt_optimizers/trajopt_sqp/test/joint_position_optimization_unit.cpp
Show resolved
Hide resolved
@Levi-Armstrong This is ready for another look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes.
trajopt_ifopt/include/trajopt_ifopt/constraints/cartesian_position_constraint.h
Outdated
Show resolved
Hide resolved
trajopt_ifopt/include/trajopt_ifopt/constraints/cartesian_position_constraint.h
Outdated
Show resolved
Hide resolved
trajopt_ifopt/include/trajopt_ifopt/constraints/inverse_kinematics_constraint.h
Outdated
Show resolved
Hide resolved
trajopt_optimizers/trajopt_sqp/test/joint_position_optimization_unit.cpp
Show resolved
Hide resolved
trajopt_optimizers/trajopt_sqp/test/joint_velocity_optimization_unit.cpp
Show resolved
Hide resolved
@Levi-Armstrong Addressed the new round of comments |
Sorry. Forgot to run clang-format. Now it is ready. |
This includes cleaning up the OSQPEigenSolver interface and a lot of style changes.
Squashed the last 3 commits now that you have looked at it. |
I will merge once CI passes. |
We will have to add ifopt to any downstream packages' rosinstalls. |
This PR will add costs and constraints using IFOPT as a generic solver interface. This will allow the usage of solvers such as IPOPT, SNOPT, Pagmo, and others.
Costs/Constraints
Currently Supported Constraints :
Currently Supported Costs (converts any constraint into a cost)
Solvers
Additionally, the SQP solver has been rewritten. Currently it provides the SQP routine with interfaces to these QP solvers
Therefore the solvers that will work in this new framework are
Breaking Changes