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

Shrink trust region if convex solver fails #256

Merged

Conversation

mpowelson
Copy link
Contributor

I'm not sure if this is a good idea or not. I'm testing it out, and it seems promising. However, I'm putting this here so others can test it out.

@Levi-Armstrong
Copy link
Contributor

This looks reasonable. I have been seeing more QP solver failures since we switched to OSQP so I will test. Also if this works I think the default trust region may be to large.

@mpowelson
Copy link
Contributor Author

For my problem it seems like this works about half the time. About half the time of it fails once it will fail a bunch of times in a row. They other half it will fail once or twice but then succeed with the smaller trust region.

I'm curious what other things solvers like snopt do to mitigate this. Maybe we could relax constraints, solve, and then reapply them? I'd really rather not put too much more effort into this solver though. If we do anything major is rather do it in trajopt_sqp.

@Levi-Armstrong
Copy link
Contributor

Levi-Armstrong commented Apr 15, 2021

It may be worth trying where we start out with everything as a cost for a few iteration and then witch them to constraints. I believe this what you are referring to by relax the constraints?

I'd really rather not put too much more effort into this solver though. If we do anything major is rather do it in trajopt_sqp.

I agree, do we have a list of what is left to do before making the jump?

@Levi-Armstrong
Copy link
Contributor

@gavanderhoorn You recent asked this question in the annual meeting. Do you have thoughts on the subject?

@mpowelson
Copy link
Contributor Author

For me, the limitation is time to update my code. I think trajopt_ifopt is probably useable as is. We do have #183 where we are keeping a list. I think #193 is probably the main thing you would miss.

@mpowelson
Copy link
Contributor Author

I've also pondered seeing if we should put trajopt_sqp in its own repo and push back an interface to it to ifopt like they have for ipopt and snopt. The free SQP optimizer might be useful to people outside of trajopt, and we might get input from actual optimization experts.

@mpowelson mpowelson marked this pull request as ready for review April 19, 2021 16:56
@mpowelson
Copy link
Contributor Author

Removing the wip since I am using this, and it seems to work fine. I can keep using it for a week or so and see if anything pops up if you want, or we can merge it.

Copy link
Contributor

@Levi-Armstrong Levi-Armstrong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you have been using it without issues then I am good with you merging it.

@mpowelson mpowelson merged commit 9502162 into tesseract-robotics:master Apr 20, 2021
@mpowelson mpowelson deleted the feature/convex_solver_recover branch May 14, 2021 21:38
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.

2 participants