![]() |
A description of an MLCP (mixed linear complementarity problem, or mixed LCP) system to be solved. More...
#include <SurgSim/Math/MlcpProblem.h>
Public Types | |
typedef Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > | Matrix |
typedef Eigen::Matrix< double, Eigen::Dynamic, 1 > | Vector |
Public Member Functions | |
virtual | ~MlcpProblem () |
Destructor. More... | |
size_t | getSize () const |
Gets the size of the system. More... | |
bool | isConsistent () const |
Checks if the sizes of various elements of the system are consistent with each other. More... | |
virtual void | setZero (size_t numDof, size_t numConstraintDof, size_t numConstraints) |
Resize an MlcpProblem and set to zero. More... | |
Static Public Member Functions | |
static MlcpProblem | Zero (size_t numDof, size_t numConstraintDof, size_t numConstraints) |
Initialize an MlcpProblem with zero values. More... | |
Public Attributes | |
Matrix | A |
Matrix \(\mathbf{A}\) used to describe the mixed LCP problem. More... | |
Vector | b |
Vector \(b\) used to describe the mixed LCP problem. More... | |
Vector | mu |
A vector of friction coefficients used to describe the mixed LCP problem. More... | |
std::vector< MlcpConstraintType > | constraintTypes |
A vector of constraint types used to describe the mixed LCP problem. More... | |
A description of an MLCP (mixed linear complementarity problem, or mixed LCP) system to be solved.
A traditional (not mixed!) LCP problem is expressed as \(\mathbf{A}x + b = c\), where \(x\) is the vector of variables of interest to be determined, \(c\) is the vector of slack variables (transforming a system of inequalities into a system of equalities), and \(x\) and \(c\) are subject to the inequality conditions \(x_i \ge 0\), \(c_i \ge 0\), and \(x \perp c\) (i.e., \(x \cdot c = 0\)). Thus for each row \(i\), either
Solving the problem produces the vector \(x\), from which \(c\) can also be computed if needed.
A mixed LCP problem is defined in the same way, except that for a certain subset of indices, the conditions are restricted further to require \(c_i\) to be zero, \(\mathbf{A}_{i,*}\cdot x+b_i = 0\). These are referred to as bilateral constraints, as opposed to the unilateral constraints in the LCP problem.
Friction is integrated directly into the problem, using the general approach described e.g. in:
Duriez, Christian; Dubois, F.; Kheddar, A.; Andriot, C., "Realistic haptic rendering of interacting
deformable objects in virtual environments," IEEE Transactions on Visualization and Computer Graphics, vol.12, no.1, pp.36,47, Jan.-Feb. 2006.
typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> SurgSim::Math::MlcpProblem::Matrix |
typedef Eigen::Matrix<double, Eigen::Dynamic, 1> SurgSim::Math::MlcpProblem::Vector |
|
virtual |
Destructor.
|
inline |
Gets the size of the system.
|
inline |
Checks if the sizes of various elements of the system are consistent with each other.
|
virtual |
Resize an MlcpProblem and set to zero.
numDof | the total degrees of freedom. |
numConstraintDof | the total constrained degrees of freedom. |
numConstraints | the number of constraints. |
Reimplemented in SurgSim::Physics::MlcpPhysicsProblem.
|
static |
Initialize an MlcpProblem with zero values.
numDof | the total degrees of freedom for the MlcpProblem to be constructed. |
numConstraintDof | the total constrained degrees of freedom for the MlcpProblem to be constructed. |
numConstraints | the number of constraints for the MlcpProblem to be constructed. |
Matrix SurgSim::Math::MlcpProblem::A |
Matrix \(\mathbf{A}\) used to describe the mixed LCP problem.
Vector SurgSim::Math::MlcpProblem::b |
Vector \(b\) used to describe the mixed LCP problem.
std::vector<MlcpConstraintType> SurgSim::Math::MlcpProblem::constraintTypes |
A vector of constraint types used to describe the mixed LCP problem.
Vector SurgSim::Math::MlcpProblem::mu |
A vector of friction coefficients used to describe the mixed LCP problem.