DART 6.12.2
Loading...
Searching...
No Matches
dart::constraint::DynamicJointConstraint Class Referenceabstract

Base class for joint constraints that are being created or destructed during simulation. More...

#include <DynamicJointConstraint.hpp>

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

Public Member Functions

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

Static Public Member Functions

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 dynamics::SkeletonPtr getRootSkeleton (dynamics::SkeletonPtr skeleton)
 
static dynamics::SkeletonPtr compressPath (dynamics::SkeletonPtr skeleton)
 

Protected Attributes

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

Static Protected Attributes

static double mErrorAllowance = 0.0
 Global constraint error allowance.
 
static double mErrorReductionParameter = 0.01
 Global constraint error redection parameter in the range of [0, 1].
 
static double mMaxErrorReductionVelocity = 1e+1
 Maximum error reduction velocity.
 
static double mConstraintForceMixing = 1e-9
 Global constraint force mixing parameter in the range of [1e-9, 1].
 

Detailed Description

Base class for joint constraints that are being created or destructed during simulation.

Constructor & Destructor Documentation

◆ DynamicJointConstraint() [1/2]

dart::constraint::DynamicJointConstraint::DynamicJointConstraint ( dynamics::BodyNode body)
explicit

Contructor.

◆ DynamicJointConstraint() [2/2]

dart::constraint::DynamicJointConstraint::DynamicJointConstraint ( dynamics::BodyNode body1,
dynamics::BodyNode body2 
)

Contructor.

◆ ~DynamicJointConstraint()

dart::constraint::DynamicJointConstraint::~DynamicJointConstraint ( )
override

Destructor.

Member Function Documentation

◆ applyImpulse()

◆ applyUnitImpulse()

◆ compressPath()

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

◆ excite()

◆ getBodyNode1()

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

Get the first BodyNode that this constraint is associated with.

◆ getBodyNode2()

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

Get the second BodyNode that this constraint is associated with.

◆ getConstraintForceMixing()

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

Get global error reduction parameter.

◆ getErrorReductionParameter()

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

Get global error reduction parameter.

◆ getInformation()

◆ getMaxErrorReductionVelocity()

double dart::constraint::DynamicJointConstraint::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::DynamicJointConstraint::setConstraintForceMixing ( double  cfm)
static

Set global constraint force mixing parameter.

◆ setErrorAllowance()

void dart::constraint::DynamicJointConstraint::setErrorAllowance ( double  allowance)
static

Set global error reduction parameter.

◆ setErrorReductionParameter()

void dart::constraint::DynamicJointConstraint::setErrorReductionParameter ( double  erp)
static

Set global error reduction parameter.

◆ setMaxErrorReductionVelocity()

void dart::constraint::DynamicJointConstraint::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::DynamicJointConstraint::mBodyNode1
protected

First body node.

◆ mBodyNode2

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

Second body node.

◆ mConstraintForceMixing

double dart::constraint::DynamicJointConstraint::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::DynamicJointConstraint::mErrorAllowance = 0.0
staticprotected

Global constraint error allowance.

◆ mErrorReductionParameter

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

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

The default is 0.01.

◆ mMaxErrorReductionVelocity

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

Maximum error reduction velocity.