DART  6.7.3
dart::constraint::JointCoulombFrictionConstraint Class Reference

Joint Coulomb friction constraint. More...

#include <JointCoulombFrictionConstraint.hpp>

Inheritance diagram for dart::constraint::JointCoulombFrictionConstraint:
dart::constraint::ConstraintBase

Public Member Functions

 JointCoulombFrictionConstraint (dynamics::Joint *_joint)
 Constructor. More...
 
virtual ~JointCoulombFrictionConstraint ()
 Destructor. More...
 
std::size_t getDimension () const
 Return dimesion of this constranit. More...
 
virtual void uniteSkeletons ()
 

Static Public Member Functions

static void setConstraintForceMixing (double _cfm)
 Set global constraint force mixing parameter. More...
 
static double getConstraintForceMixing ()
 Get global constraint force mixing parameter. More...
 
static dynamics::SkeletonPtr getRootSkeleton (dynamics::SkeletonPtr skeleton)
 
static dynamics::SkeletonPtr compressPath (dynamics::SkeletonPtr skeleton)
 

Protected Member Functions

void update () override
 Update constraint using updated Skeleton's states. More...
 
void getInformation (ConstraintInfo *_lcp) override
 Fill LCP variables. More...
 
void applyUnitImpulse (std::size_t _index) override
 Apply unit impulse to constraint space. More...
 
void getVelocityChange (double *_delVel, bool _withCfm) override
 Get velocity change due to the uint impulse. More...
 
void excite () override
 Excite the constraint. More...
 
void unexcite () override
 Unexcite the constraint. More...
 
void applyImpulse (double *_lambda) override
 Apply computed constraint impulse to constrained skeletons. More...
 
dynamics::SkeletonPtr getRootSkeleton () const override
 
bool isActive () const override
 Return true if this constraint is active. More...
 

Protected Attributes

std::size_t mDim
 Dimension of constraint. More...
 

Private Attributes

dynamics::JointmJoint
 
dynamics::BodyNodemBodyNode
 
std::size_t mAppliedImpulseIndex
 Index of applied impulse. More...
 
std::size_t mLifeTime [6]
 
bool mActive [6]
 
double mNegativeVel [6]
 
double mOldX [6]
 
double mUpperBound [6]
 
double mLowerBound [6]
 

Static Private Attributes

static double mConstraintForceMixing = 1e-9
 Global constraint force mixing parameter in the range of [1e-9, 1]. More...
 

Friends

class ConstraintSolver
 
class ConstrainedGroup
 

Detailed Description

Joint Coulomb friction constraint.

Constructor & Destructor Documentation

◆ JointCoulombFrictionConstraint()

dart::constraint::JointCoulombFrictionConstraint::JointCoulombFrictionConstraint ( dynamics::Joint _joint)
explicit

Constructor.

◆ ~JointCoulombFrictionConstraint()

dart::constraint::JointCoulombFrictionConstraint::~JointCoulombFrictionConstraint ( )
virtual

Destructor.

Member Function Documentation

◆ applyImpulse()

void dart::constraint::JointCoulombFrictionConstraint::applyImpulse ( double *  lambda)
overrideprotectedvirtual

Apply computed constraint impulse to constrained skeletons.

Implements dart::constraint::ConstraintBase.

◆ applyUnitImpulse()

void dart::constraint::JointCoulombFrictionConstraint::applyUnitImpulse ( std::size_t  index)
overrideprotectedvirtual

Apply unit impulse to constraint space.

Implements dart::constraint::ConstraintBase.

◆ compressPath()

dynamics::SkeletonPtr dart::constraint::ConstraintBase::compressPath ( dynamics::SkeletonPtr  skeleton)
staticinherited

◆ excite()

void dart::constraint::JointCoulombFrictionConstraint::excite ( )
overrideprotectedvirtual

Excite the constraint.

Implements dart::constraint::ConstraintBase.

◆ getConstraintForceMixing()

double dart::constraint::JointCoulombFrictionConstraint::getConstraintForceMixing ( )
static

Get global constraint force mixing parameter.

◆ getDimension()

std::size_t dart::constraint::ConstraintBase::getDimension ( ) const
inherited

Return dimesion of this constranit.

◆ getInformation()

void dart::constraint::JointCoulombFrictionConstraint::getInformation ( ConstraintInfo info)
overrideprotectedvirtual

Fill LCP variables.

Implements dart::constraint::ConstraintBase.

◆ getRootSkeleton() [1/2]

dynamics::SkeletonPtr dart::constraint::JointCoulombFrictionConstraint::getRootSkeleton ( ) const
overrideprotectedvirtual

◆ getRootSkeleton() [2/2]

dynamics::SkeletonPtr dart::constraint::ConstraintBase::getRootSkeleton ( dynamics::SkeletonPtr  skeleton)
staticinherited

◆ getVelocityChange()

void dart::constraint::JointCoulombFrictionConstraint::getVelocityChange ( double *  vel,
bool  withCfm 
)
overrideprotectedvirtual

Get velocity change due to the uint impulse.

Implements dart::constraint::ConstraintBase.

◆ isActive()

bool dart::constraint::JointCoulombFrictionConstraint::isActive ( ) const
overrideprotectedvirtual

Return true if this constraint is active.

Implements dart::constraint::ConstraintBase.

◆ setConstraintForceMixing()

void dart::constraint::JointCoulombFrictionConstraint::setConstraintForceMixing ( double  _cfm)
static

Set global constraint force mixing parameter.

◆ unexcite()

void dart::constraint::JointCoulombFrictionConstraint::unexcite ( )
overrideprotectedvirtual

Unexcite the constraint.

Implements dart::constraint::ConstraintBase.

◆ uniteSkeletons()

void dart::constraint::ConstraintBase::uniteSkeletons ( )
virtualinherited

◆ update()

void dart::constraint::JointCoulombFrictionConstraint::update ( )
overrideprotectedvirtual

Update constraint using updated Skeleton's states.

Implements dart::constraint::ConstraintBase.

Friends And Related Function Documentation

◆ ConstrainedGroup

friend class ConstrainedGroup
friend

◆ ConstraintSolver

friend class ConstraintSolver
friend

Member Data Documentation

◆ mActive

bool dart::constraint::JointCoulombFrictionConstraint::mActive[6]
private

◆ mAppliedImpulseIndex

std::size_t dart::constraint::JointCoulombFrictionConstraint::mAppliedImpulseIndex
private

Index of applied impulse.

◆ mBodyNode

dynamics::BodyNode* dart::constraint::JointCoulombFrictionConstraint::mBodyNode
private

◆ mConstraintForceMixing

double dart::constraint::JointCoulombFrictionConstraint::mConstraintForceMixing = 1e-9
staticprivate

Global constraint force mixing parameter in the range of [1e-9, 1].

The default is 1e-5

See also
http://www.ode.org/ode-latest-userguide.html#sec_3_8_0

◆ mDim

std::size_t dart::constraint::ConstraintBase::mDim
protectedinherited

Dimension of constraint.

◆ mJoint

dynamics::Joint* dart::constraint::JointCoulombFrictionConstraint::mJoint
private

◆ mLifeTime

std::size_t dart::constraint::JointCoulombFrictionConstraint::mLifeTime[6]
private

◆ mLowerBound

double dart::constraint::JointCoulombFrictionConstraint::mLowerBound[6]
private

◆ mNegativeVel

double dart::constraint::JointCoulombFrictionConstraint::mNegativeVel[6]
private

◆ mOldX

double dart::constraint::JointCoulombFrictionConstraint::mOldX[6]
private

◆ mUpperBound

double dart::constraint::JointCoulombFrictionConstraint::mUpperBound[6]
private