make Lemke work with lower/upper bounds, using the BLCP to LCP conversion (using a dog-slow matrix inversion etc)

for this conversion, see also https://github.com/erwincoumans/num4lcp/blob/master/matlab/test_lcp_bounds.m and
appendix A1 in http://www.cs.duke.edu/~parr/nips10.pdf, thanks to Kenny Erleben and Evan Drumwright for the tips!
(friction is not coupled to normal forces yet)
This commit is contained in:
erwin.coumans@gmail.com
2013-10-30 00:02:13 +00:00
parent 13936eb9a5
commit 6ca948e22f
3 changed files with 163 additions and 16 deletions

View File

@@ -431,7 +431,7 @@ void btMLCPSolver::createMLCPFast(const btContactSolverInfo& infoGlobal)
// add cfm to the diagonal of m_A
for ( int i=0; i<m_A.rows(); ++i)
{
float cfm = 0.00001f;
float cfm = 0.000001f;
m_A.setElem(i,i,m_A(i,i)+ cfm / infoGlobal.m_timeStep);
}
}
@@ -558,7 +558,7 @@ void btMLCPSolver::createMLCP(const btContactSolverInfo& infoGlobal)
// add cfm to the diagonal of m_A
for ( int i=0; i<m_A.rows(); ++i)
{
float cfm = 0.0001f;
float cfm = 0.000001f;
m_A.setElem(i,i,m_A(i,i)+ cfm / infoGlobal.m_timeStep);
}
}