-
Notifications
You must be signed in to change notification settings - Fork 105
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
Handle solver failures like TrajOpt does #369
Merged
Levi-Armstrong
merged 8 commits into
tesseract-robotics:master
from
rjoomen:maxsolverfailures
Dec 6, 2023
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
3e0fe76
- Added max_qp_solver_failures parameter and the logic of TrajOpt to …
rjoomen 6881f5b
Re-add setVariables
rjoomen 78d4c57
Update Trajopt debug output to match TrajoptIfopt (for comparison)
rjoomen 4a16157
Change boundaries from OSQP_INFTY to INFINITY to match Trajopt
rjoomen d81bb48
Output fixup
rjoomen 7f40295
Output fixup
rjoomen 2ee35aa
Match output of Trajopt
rjoomen 128eb37
Revert "Change boundaries from OSQP_INFTY to INFINITY to match Trajopt"
rjoomen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This just needs to be added back.
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.
Why here exactly? Wouldn't adding it to solveQPProblem() upon failure (in the
else
block) be more logical?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.
Done
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 don't think that would work since it would need to be set before convexify is called in stepSQPSolver. I think we might be able to move into that method but I would want to do a lot of testing to make sure everything aligns with the legacy version before making a change like this.
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.
Isn't this equivalent? In the previous version solveQPProblem() is called, and if qp_solver->solve() failed and hence solveQPProblem() failed setVariables is called from withing runTrustRegionLoop(). Now I moved this line to solveQPProblem(), still to be called if qp_solver->solve() failed. It's just clearer now, as solveQPProblem() either sets the variables to new_var_vals and back to best_var_vals if succeeded and immediately to best_var_vals if failed. See line 386 in my PR.
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 know the numerical ik has difference on Jammy because on one interaction it returns iteration limit instead of approximate solution but focal produces identical results. I am currently running focal so let me know if you want me to compare since I think you are running jammy.
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.
Aha, I'm running in that issue exactly! But I've also access to focal (I'm using WSL), so I'll run it there tomorrow.
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.
From what I could tell both hit the iteration limit but because of slight numerical differences focal picks approximate solution and jammy pick iteration limit.
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.
Mmm, I'm seeing other differences on Focal. And Focal and Jammy do not match. Would you mind taking a 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.
I will take a look