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

Refactor ConstraintSolver: decouple LCP solver from ConstraintSolver #1099

Merged
merged 7 commits into from
Aug 24, 2018

Conversation

jslee02
Copy link
Member

@jslee02 jslee02 commented Aug 12, 2018

This PR refactors the current constraint solver, ConstraintSolver, without changing the functionalities. Currently, ConstraintSolver is strongly tied with the (boxed) LCP solver, which leads to that it's not extensible to other non-LCP based methods.

Summary of Changes

  • Remove the LCP solver dependency from ConstraintSolver
  • Create BoxedLcpSolver, the interface class only for solving boxed LCP problems
  • Create Dantzig/PgsBoxedLcpSolver, implementations of BoxedLcpSolver
  • Create BoxedLcpConstraintSolver, an implementation of ConstraintSolver that requires a LCP solver. This class is the mostly close class to the previous ConstraintSolver
  • Deprecate DantzigConstraintSolver and PgsConstraintSolver in favor of BoxedLcpConstraintSolver + Dantzig/PgsBoxedLcpSolver
  • Add a "box stacking" example (will be improved further in the future PRs)

As a note, this is prework for implementation of sequential impulse method of Bullet and hopefully more constraint solvers.


Before creating a pull request

  • Document new methods and classes
  • Format new code files using clang-format

Before merging a pull request

  • Set version target by selecting a milestone on the right side
  • Summarize this change in CHANGELOG.md
  • Add unit test(s) for this change

@jslee02 jslee02 added this to the DART 6.7.0 milestone Aug 12, 2018
@jslee02 jslee02 requested a review from mxgrey August 12, 2018 20:55
@codecov
Copy link

codecov bot commented Aug 13, 2018

Codecov Report

Merging #1099 into release-6.7 will decrease coverage by 0.27%.
The diff coverage is 59.58%.

@@               Coverage Diff               @@
##           release-6.7    #1099      +/-   ##
===============================================
- Coverage        56.61%   56.33%   -0.28%     
===============================================
  Files              320      327       +7     
  Lines            24539    24811     +272     
===============================================
+ Hits             13893    13978      +85     
- Misses           10646    10833     +187
Impacted Files Coverage Δ
dart/math/Helpers.hpp 89.13% <ø> (ø) ⬆️
dart/constraint/ConstrainedGroup.hpp 100% <ø> (ø) ⬆️
dart/constraint/DantzigLCPSolver.cpp 0% <ø> (-59.1%) ⬇️
dart/constraint/DantzigBoxedLcpSolver.hpp 100% <100%> (ø)
dart/constraint/PgsBoxedLcpSolver.hpp 100% <100%> (ø)
dart/constraint/BoxedLcpConstraintSolver.hpp 100% <100%> (ø)
dart/constraint/BoxedLcpSolver.hpp 100% <100%> (ø)
dart/constraint/DantzigBoxedLcpSolver.cpp 22.22% <22.22%> (ø)
dart/constraint/ConstraintSolver.cpp 65.19% <50.87%> (-0.6%) ⬇️
dart/constraint/BoxedLcpConstraintSolver.cpp 56.64% <56.64%> (ø)
... and 15 more

@jslee02 jslee02 merged commit 545f3ad into release-6.7 Aug 24, 2018
@jslee02 jslee02 deleted the enhance/constraint_solver_refactor branch August 24, 2018 05:34
@scpeters
Copy link
Collaborator

cross-referencing an issue with kinematic loops in gazebo after this was released in 6.7:

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