DART  6.7.3
dart::constraint::JointLimitConstraint Class Reference

JointLimitConstraint handles joint position or velocity limits. More...

#include <JointLimitConstraint.hpp>

Inheritance diagram for dart::constraint::JointLimitConstraint:
dart::constraint::ConstraintBase

Public Member Functions

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

Static Public Member Functions

static void setErrorAllowance (double _allowance)
 Set global error reduction parameter. More...
 
static double getErrorAllowance ()
 Get global error reduction parameter. More...
 
static void setErrorReductionParameter (double _erp)
 Set global error reduction parameter. More...
 
static double getErrorReductionParameter ()
 Get global error reduction parameter. More...
 
static void setMaxErrorReductionVelocity (double _erv)
 Set global error reduction parameter. More...
 
static double getMaxErrorReductionVelocity ()
 Get global error reduction parameter. More...
 
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 mViolation [6]
 
double mNegativeVel [6]
 
double mOldX [6]
 
double mUpperBound [6]
 
double mLowerBound [6]
 

Static Private Attributes

static double mErrorAllowance = 0.0
 Global constraint error allowance. More...
 
static double mErrorReductionParameter = 0.01
 Global constraint error redection parameter in the range of [0, 1]. More...
 
static double mMaxErrorReductionVelocity = 1e+1
 Maximum error reduction velocity. More...
 
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

JointLimitConstraint handles joint position or velocity limits.

Constructor & Destructor Documentation

◆ JointLimitConstraint()

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

Constructor.

◆ ~JointLimitConstraint()

dart::constraint::JointLimitConstraint::~JointLimitConstraint ( )
virtual

Destructor.

Member Function Documentation

◆ applyImpulse()

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

Apply computed constraint impulse to constrained skeletons.

Implements dart::constraint::ConstraintBase.

◆ applyUnitImpulse()

void dart::constraint::JointLimitConstraint::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::JointLimitConstraint::excite ( )
overrideprotectedvirtual

Excite the constraint.

Implements dart::constraint::ConstraintBase.

◆ getConstraintForceMixing()

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

Get global constraint force mixing parameter.

◆ getDimension()

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

Return dimesion of this constranit.

◆ getErrorAllowance()

double dart::constraint::JointLimitConstraint::getErrorAllowance ( )
static

Get global error reduction parameter.

◆ getErrorReductionParameter()

double dart::constraint::JointLimitConstraint::getErrorReductionParameter ( )
static

Get global error reduction parameter.

◆ getInformation()

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

Fill LCP variables.

Implements dart::constraint::ConstraintBase.

◆ getMaxErrorReductionVelocity()

double dart::constraint::JointLimitConstraint::getMaxErrorReductionVelocity ( )
static

Get global error reduction parameter.

◆ getRootSkeleton() [1/2]

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

◆ getRootSkeleton() [2/2]

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

◆ getVelocityChange()

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

Get velocity change due to the uint impulse.

Implements dart::constraint::ConstraintBase.

◆ isActive()

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

Return true if this constraint is active.

Implements dart::constraint::ConstraintBase.

◆ setConstraintForceMixing()

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

Set global constraint force mixing parameter.

◆ setErrorAllowance()

void dart::constraint::JointLimitConstraint::setErrorAllowance ( double  _allowance)
static

Set global error reduction parameter.

◆ setErrorReductionParameter()

void dart::constraint::JointLimitConstraint::setErrorReductionParameter ( double  _erp)
static

Set global error reduction parameter.

◆ setMaxErrorReductionVelocity()

void dart::constraint::JointLimitConstraint::setMaxErrorReductionVelocity ( double  _erv)
static

Set global error reduction parameter.

◆ unexcite()

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

Unexcite the constraint.

Implements dart::constraint::ConstraintBase.

◆ uniteSkeletons()

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

◆ update()

void dart::constraint::JointLimitConstraint::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::JointLimitConstraint::mActive[6]
private

◆ mAppliedImpulseIndex

std::size_t dart::constraint::JointLimitConstraint::mAppliedImpulseIndex
private

Index of applied impulse.

◆ mBodyNode

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

◆ mConstraintForceMixing

double dart::constraint::JointLimitConstraint::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.

◆ mErrorAllowance

double dart::constraint::JointLimitConstraint::mErrorAllowance = 0.0
staticprivate

Global constraint error allowance.

◆ mErrorReductionParameter

double dart::constraint::JointLimitConstraint::mErrorReductionParameter = 0.01
staticprivate

Global constraint error redection parameter in the range of [0, 1].

The default is 0.01.

◆ mJoint

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

◆ mLifeTime

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

◆ mLowerBound

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

◆ mMaxErrorReductionVelocity

double dart::constraint::JointLimitConstraint::mMaxErrorReductionVelocity = 1e+1
staticprivate

Maximum error reduction velocity.

◆ mNegativeVel

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

◆ mOldX

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

◆ mUpperBound

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

◆ mViolation

double dart::constraint::JointLimitConstraint::mViolation[6]
private