dart
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
dart::dynamics::ContactConstraint Class Reference

ContactConstraint represents a contact constraint between two bodies. More...

#include <ContactConstraint.hpp>

Inheritance diagram for dart::dynamics::ContactConstraint:
Inheritance graph
[legend]
Collaboration diagram for dart::dynamics::ContactConstraint:
Collaboration graph
[legend]

Public Member Functions

 ContactConstraint (collision::Contact &contact, double timeStep)
 Constructor.
 
 ~ContactConstraint () override=default
 Destructor.
 
const std::string & getType () const override
 Returns a string representing the constraint type.
 
void setFrictionDirection (const Eigen::Vector3d &dir)
 Set first frictional direction.
 
const Eigen::Vector3d & getFrictionDirection1 () const
 Get first frictional direction.
 
- Public Member Functions inherited from dart::dynamics::ConstraintBase
std::size_t getDimension () const
 Return dimesion of this constranit.
 
virtual ~ConstraintBase ()
 Destructor.
 

Static Public Member Functions

static const std::string & getStaticType ()
 Returns constraint type for this class.
 
static void setErrorAllowance (double allowance)
 Set global error reduction parameter.
 
static double getErrorAllowance ()
 Get global error reduction parameter.
 
static void setErrorReductionParameter (double erp)
 Set global error reduction parameter.
 
static double getErrorReductionParameter ()
 Get global error reduction parameter.
 
static void setMaxErrorReductionVelocity (double erv)
 Set global error reduction parameter.
 
static double getMaxErrorReductionVelocity ()
 Get global error reduction parameter.
 
static void setConstraintForceMixing (double cfm)
 Set global constraint force mixing parameter.
 
static double getConstraintForceMixing ()
 Get global constraint force mixing parameter.
 
- Static Public Member Functions inherited from dart::dynamics::ConstraintBase
static dynamics::SkeletonPtr compressPath (dynamics::SkeletonPtr skeleton)
 
static dynamics::SkeletonPtr getRootSkeleton (dynamics::SkeletonPtr skeleton)
 

Protected Member Functions

void update () override
 Update constraint using updated Skeleton's states.
 
void getInformation (ConstraintInfo *info) override
 Fill LCP variables.
 
void applyUnitImpulse (std::size_t index) override
 Apply unit impulse to constraint space.
 
void getVelocityChange (double *vel, bool withCfm) override
 Get velocity change due to the uint impulse.
 
void excite () override
 Excite the constraint.
 
void unexcite () override
 Unexcite the constraint.
 
void applyImpulse (double *lambda) override
 Apply computed constraint impulse to constrained skeletons.
 
dynamics::SkeletonPtr getRootSkeleton () const override
 
void uniteSkeletons () override
 
bool isActive () const override
 Return true if this constraint is active.
 
- Protected Member Functions inherited from dart::dynamics::ConstraintBase
 ConstraintBase ()
 Default contructor.
 

Static Protected Member Functions

static double computeFrictionCoefficient (const dynamics::ShapeNode *shapeNode)
 
static double computePrimaryFrictionCoefficient (const dynamics::ShapeNode *shapeNode)
 
static double computeSecondaryFrictionCoefficient (const dynamics::ShapeNode *shapeNode)
 
static double computePrimarySlipCompliance (const dynamics::ShapeNode *shapeNode)
 
static double computeSecondarySlipCompliance (const dynamics::ShapeNode *shapeNode)
 
static Eigen::Vector3d computeWorldFirstFrictionDir (const dynamics::ShapeNode *shapenode)
 
static double computeRestitutionCoefficient (const dynamics::ShapeNode *shapeNode)
 

Friends

class ConstraintSolver
 
class ConstrainedGroup
 

Additional Inherited Members

- Protected Attributes inherited from dart::dynamics::ConstraintBase
std::size_t mDim
 Dimension of constraint.
 

Detailed Description

ContactConstraint represents a contact constraint between two bodies.


The documentation for this class was generated from the following files: