DART
6.7.3
|
#include <BoxedLcpConstraintSolver.hpp>
Public Member Functions | |
BoxedLcpConstraintSolver (double timeStep, BoxedLcpSolverPtr boxedLcpSolver=nullptr) | |
Constructor. More... | |
void | setBoxedLcpSolver (BoxedLcpSolverPtr lcpSolver) |
Sets boxed LCP (BLCP) solver. More... | |
ConstBoxedLcpSolverPtr | getBoxedLcpSolver () const |
Returns boxed LCP (BLCP) solver. More... | |
void | addSkeleton (const dynamics::SkeletonPtr &skeleton) |
Add single skeleton. More... | |
void | addSkeletons (const std::vector< dynamics::SkeletonPtr > &skeletons) |
Add mutiple skeletons. More... | |
const std::vector< dynamics::SkeletonPtr > & | getSkeletons () const |
Returns all the skeletons added to this ConstraintSolver. More... | |
void | removeSkeleton (const dynamics::SkeletonPtr &skeleton) |
Remove single skeleton. More... | |
void | removeSkeletons (const std::vector< dynamics::SkeletonPtr > &skeletons) |
Remove multiple skeletons. More... | |
void | removeAllSkeletons () |
Remove all skeletons in this constraint solver. More... | |
void | addConstraint (const ConstraintBasePtr &constraint) |
Add a constraint. More... | |
void | removeConstraint (const ConstraintBasePtr &constraint) |
Remove a constraint. More... | |
void | removeAllConstraints () |
Remove all constraints. More... | |
void | clearLastCollisionResult () |
Clears the last collision result. More... | |
void | setTimeStep (double _timeStep) |
Set time step. More... | |
double | getTimeStep () const |
Get time step. More... | |
void | setCollisionDetector (collision::CollisionDetector *collisionDetector) |
Set collision detector. More... | |
void | setCollisionDetector (const std::shared_ptr< collision::CollisionDetector > &collisionDetector) |
Set collision detector. More... | |
collision::CollisionDetectorPtr | getCollisionDetector () |
Get collision detector. More... | |
collision::ConstCollisionDetectorPtr | getCollisionDetector () const |
Get (const) collision detector. More... | |
collision::CollisionGroupPtr | getCollisionGroup () |
Return collision group of collision objects that are added to this ConstraintSolver. More... | |
collision::ConstCollisionGroupPtr | getCollisionGroup () const |
Return (const) collision group of collision objects that are added to this ConstraintSolver. More... | |
collision::CollisionOption & | getCollisionOption () |
Returns collision option that is used for collision checkings in this ConstraintSolver to generate contact constraints. More... | |
const collision::CollisionOption & | getCollisionOption () const |
Returns collision option that is used for collision checkings in this ConstraintSolver to generate contact constraints. More... | |
collision::CollisionResult & | getLastCollisionResult () |
Return the last collision checking result. More... | |
const collision::CollisionResult & | getLastCollisionResult () const |
Return the last collision checking result. More... | |
void | setLCPSolver (std::unique_ptr< LCPSolver > lcpSolver) |
Set LCP solver. More... | |
LCPSolver * | getLCPSolver () const |
Get LCP solver. More... | |
void | solve () |
Solve constraint impulses and apply them to the skeletons. More... | |
Protected Types | |
using | CollisionDetector = collision::CollisionDetector |
Protected Member Functions | |
void | solveConstrainedGroup (ConstrainedGroup &group) override |
bool | containSkeleton (const dynamics::ConstSkeletonPtr &skeleton) const |
Check if the skeleton is contained in this solver. More... | |
bool | checkAndAddSkeleton (const dynamics::SkeletonPtr &skeleton) |
Add skeleton if the constraint is not contained in this solver. More... | |
bool | containConstraint (const ConstConstraintBasePtr &constraint) const |
Check if the constraint is contained in this solver. More... | |
bool | checkAndAddConstraint (const ConstraintBasePtr &constraint) |
Add constraint if the constraint is not contained in this solver. More... | |
void | updateConstraints () |
Update constraints. More... | |
void | buildConstrainedGroups () |
Build constrained groupsContact. More... | |
void | solveConstrainedGroups () |
Solve constrained groups. More... | |
bool | isSoftContact (const collision::Contact &contact) const |
Return true if at least one of colliding body is soft body. More... | |
Protected Attributes | |
BoxedLcpSolverPtr | mBoxedLcpSolver |
Boxed LCP solver. More... | |
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > | mA |
Cache data for boxed LCP formulation. More... | |
Eigen::VectorXd | mX |
Cache data for boxed LCP formulation. More... | |
Eigen::VectorXd | mB |
Cache data for boxed LCP formulation. More... | |
Eigen::VectorXd | mW |
Cache data for boxed LCP formulation. More... | |
Eigen::VectorXd | mLo |
Cache data for boxed LCP formulation. More... | |
Eigen::VectorXd | mHi |
Cache data for boxed LCP formulation. More... | |
Eigen::VectorXi | mFIndex |
Cache data for boxed LCP formulation. More... | |
Eigen::VectorXi | mOffset |
Cache data for boxed LCP formulation. More... | |
collision::CollisionDetectorPtr | mCollisionDetector |
Collision detector. More... | |
collision::CollisionGroupPtr | mCollisionGroup |
Collision group. More... | |
collision::CollisionOption | mCollisionOption |
Collision detection option. More... | |
collision::CollisionResult | mCollisionResult |
Last collision checking result. More... | |
double | mTimeStep |
Time step. More... | |
std::vector< dynamics::SkeletonPtr > | mSkeletons |
Skeleton list. More... | |
std::vector< ContactConstraintPtr > | mContactConstraints |
Contact constraints those are automatically created. More... | |
std::vector< SoftContactConstraintPtr > | mSoftContactConstraints |
Soft contact constraints those are automatically created. More... | |
std::vector< JointLimitConstraintPtr > | mJointLimitConstraints |
Joint limit constraints those are automatically created. More... | |
std::vector< ServoMotorConstraintPtr > | mServoMotorConstraints |
Servo motor constraints those are automatically created. More... | |
std::vector< MimicMotorConstraintPtr > | mMimicMotorConstraints |
Mimic motor constraints those are automatically created. More... | |
std::vector< JointCoulombFrictionConstraintPtr > | mJointCoulombFrictionConstraints |
Joint Coulomb friction constraints those are automatically created. More... | |
std::vector< ConstraintBasePtr > | mManualConstraints |
Constraints that manually added. More... | |
std::vector< ConstraintBasePtr > | mActiveConstraints |
Active constraints. More... | |
std::vector< ConstrainedGroup > | mConstrainedGroups |
Constraint group list. More... | |
Private Member Functions | |
bool | isSymmetric (std::size_t n, double *A) |
Return true if the matrix is symmetric. More... | |
bool | isSymmetric (std::size_t n, double *A, std::size_t begin, std::size_t end) |
Return true if the diagonla block of matrix is symmetric. More... | |
void | print (std::size_t n, double *A, double *x, double *lo, double *hi, double *b, double *w, int *findex) |
Print debug information. More... | |
|
protectedinherited |
dart::constraint::BoxedLcpConstraintSolver::BoxedLcpConstraintSolver | ( | double | timeStep, |
BoxedLcpSolverPtr | boxedLcpSolver = nullptr |
||
) |
Constructor.
|
inherited |
Add a constraint.
|
inherited |
Add single skeleton.
|
inherited |
Add mutiple skeletons.
|
protectedinherited |
Build constrained groupsContact.
|
protectedinherited |
Add constraint if the constraint is not contained in this solver.
|
protectedinherited |
Add skeleton if the constraint is not contained in this solver.
|
inherited |
Clears the last collision result.
|
protectedinherited |
Check if the constraint is contained in this solver.
|
protectedinherited |
Check if the skeleton is contained in this solver.
ConstBoxedLcpSolverPtr dart::constraint::BoxedLcpConstraintSolver::getBoxedLcpSolver | ( | ) | const |
Returns boxed LCP (BLCP) solver.
|
inherited |
Get collision detector.
|
inherited |
Get (const) collision detector.
|
inherited |
Return collision group of collision objects that are added to this ConstraintSolver.
|
inherited |
Return (const) collision group of collision objects that are added to this ConstraintSolver.
|
inherited |
Returns collision option that is used for collision checkings in this ConstraintSolver to generate contact constraints.
|
inherited |
Returns collision option that is used for collision checkings in this ConstraintSolver to generate contact constraints.
|
inherited |
Return the last collision checking result.
|
inherited |
Return the last collision checking result.
|
inherited |
Get LCP solver.
|
inherited |
Returns all the skeletons added to this ConstraintSolver.
|
inherited |
Get time step.
|
protectedinherited |
Return true if at least one of colliding body is soft body.
|
private |
Return true if the matrix is symmetric.
|
private |
Return true if the diagonla block of matrix is symmetric.
|
private |
Print debug information.
|
inherited |
Remove all constraints.
|
inherited |
Remove all skeletons in this constraint solver.
|
inherited |
Remove a constraint.
|
inherited |
Remove single skeleton.
|
inherited |
Remove multiple skeletons.
void dart::constraint::BoxedLcpConstraintSolver::setBoxedLcpSolver | ( | BoxedLcpSolverPtr | lcpSolver | ) |
Sets boxed LCP (BLCP) solver.
|
inherited |
Set collision detector.
This function acquires ownership of the CollisionDetector passed as an argument. This method is deprecated in favor of the overload that accepts a std::shared_ptr.
|
inherited |
Set collision detector.
|
inherited |
Set LCP solver.
|
inherited |
Set time step.
|
inherited |
Solve constraint impulses and apply them to the skeletons.
|
overrideprotectedvirtual |
Implements dart::constraint::ConstraintSolver.
|
protectedinherited |
Solve constrained groups.
|
protectedinherited |
Update constraints.
|
protected |
Cache data for boxed LCP formulation.
|
protectedinherited |
Active constraints.
|
protected |
Cache data for boxed LCP formulation.
|
protected |
Boxed LCP solver.
|
protectedinherited |
Collision detector.
|
protectedinherited |
Collision group.
|
protectedinherited |
Collision detection option.
|
protectedinherited |
Last collision checking result.
|
protectedinherited |
Constraint group list.
|
protectedinherited |
Contact constraints those are automatically created.
|
protected |
Cache data for boxed LCP formulation.
|
protected |
Cache data for boxed LCP formulation.
|
protectedinherited |
Joint Coulomb friction constraints those are automatically created.
|
protectedinherited |
Joint limit constraints those are automatically created.
|
protected |
Cache data for boxed LCP formulation.
|
protectedinherited |
Constraints that manually added.
|
protectedinherited |
Mimic motor constraints those are automatically created.
|
protected |
Cache data for boxed LCP formulation.
|
protectedinherited |
Servo motor constraints those are automatically created.
|
protectedinherited |
Skeleton list.
|
protectedinherited |
Soft contact constraints those are automatically created.
|
protectedinherited |
Time step.
|
protected |
Cache data for boxed LCP formulation.
|
protected |
Cache data for boxed LCP formulation.