DART  6.10.1
dart::constraint::JointConstraint Class Referenceabstract

class JointConstraint More...

#include <JointConstraint.hpp>

Inheritance diagram for dart::constraint::JointConstraint:
dart::constraint::ConstraintBase dart::constraint::BallJointConstraint dart::constraint::WeldJointConstraint

Public Member Functions

 JointConstraint (dynamics::BodyNode *_body)
 Contructor. More...
 
 JointConstraint (dynamics::BodyNode *_body1, dynamics::BodyNode *_body2)
 Contructor. More...
 
virtual ~JointConstraint ()
 Destructor. More...
 
dynamics::BodyNodegetBodyNode1 () const
 Get the first BodyNode that this constraint is associated with. More...
 
dynamics::BodyNodegetBodyNode2 () const
 Get the second BodyNode that this constraint is associated with. More...
 
virtual const std::string & getType () const
 Returns a string representing the constraint type. More...
 
std::size_t getDimension () const
 Return dimesion of this constranit. More...
 
virtual void update ()=0
 Update constraint using updated Skeleton's states. More...
 
virtual void getInformation (ConstraintInfo *info)=0
 Fill LCP variables. More...
 
virtual void applyUnitImpulse (std::size_t index)=0
 Apply unit impulse to constraint space. More...
 
virtual void getVelocityChange (double *vel, bool withCfm)=0
 Get velocity change due to the uint impulse. More...
 
virtual void excite ()=0
 Excite the constraint. More...
 
virtual void unexcite ()=0
 Unexcite the constraint. More...
 
virtual void applyImpulse (double *lambda)=0
 Apply computed constraint impulse to constrained skeletons. More...
 
virtual bool isActive () const =0
 Return true if this constraint is active. More...
 
virtual dynamics::SkeletonPtr getRootSkeleton () const =0
 
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 Attributes

dynamics::BodyNodemBodyNode1
 First body node. More...
 
dynamics::BodyNodemBodyNode2
 Second body node. More...
 
std::size_t mDim
 Dimension of constraint. More...
 

Static Protected 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...
 

Detailed Description

Constructor & Destructor Documentation

◆ JointConstraint() [1/2]

dart::constraint::JointConstraint::JointConstraint ( dynamics::BodyNode _body)
explicit

Contructor.

◆ JointConstraint() [2/2]

dart::constraint::JointConstraint::JointConstraint ( dynamics::BodyNode _body1,
dynamics::BodyNode _body2 
)

Contructor.

◆ ~JointConstraint()

dart::constraint::JointConstraint::~JointConstraint ( )
virtual

Destructor.

Member Function Documentation

◆ applyImpulse()

◆ applyUnitImpulse()

◆ compressPath()

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

◆ excite()

◆ getBodyNode1()

dynamics::BodyNode * dart::constraint::JointConstraint::getBodyNode1 ( ) const

Get the first BodyNode that this constraint is associated with.

◆ getBodyNode2()

dynamics::BodyNode * dart::constraint::JointConstraint::getBodyNode2 ( ) const

Get the second BodyNode that this constraint is associated with.

◆ getConstraintForceMixing()

double dart::constraint::JointConstraint::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::JointConstraint::getErrorAllowance ( )
static

Get global error reduction parameter.

◆ getErrorReductionParameter()

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

Get global error reduction parameter.

◆ getInformation()

◆ getMaxErrorReductionVelocity()

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

Get global error reduction parameter.

◆ getRootSkeleton() [1/2]

◆ getRootSkeleton() [2/2]

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

◆ getType()

◆ getVelocityChange()

◆ isActive()

◆ setConstraintForceMixing()

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

Set global constraint force mixing parameter.

◆ setErrorAllowance()

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

Set global error reduction parameter.

◆ setErrorReductionParameter()

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

Set global error reduction parameter.

◆ setMaxErrorReductionVelocity()

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

Set global error reduction parameter.

◆ unexcite()

◆ uniteSkeletons()

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

◆ update()

Member Data Documentation

◆ mBodyNode1

dynamics::BodyNode* dart::constraint::JointConstraint::mBodyNode1
protected

First body node.

◆ mBodyNode2

dynamics::BodyNode* dart::constraint::JointConstraint::mBodyNode2
protected

Second body node.

◆ mConstraintForceMixing

double dart::constraint::JointConstraint::mConstraintForceMixing = 1e-9
staticprotected

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::JointConstraint::mErrorAllowance = 0.0
staticprotected

Global constraint error allowance.

◆ mErrorReductionParameter

double dart::constraint::JointConstraint::mErrorReductionParameter = 0.01
staticprotected

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

The default is 0.01.

◆ mMaxErrorReductionVelocity

double dart::constraint::JointConstraint::mMaxErrorReductionVelocity = 1e+1
staticprotected

Maximum error reduction velocity.