DART  6.7.3
dart::constraint::ServoMotorConstraint Class Reference

Servo motor constraint. More...

#include <ServoMotorConstraint.hpp>

Inheritance diagram for dart::constraint::ServoMotorConstraint:
dart::constraint::ConstraintBase

Public Member Functions

 ServoMotorConstraint (dynamics::Joint *joint)
 Constructor. More...
 
virtual ~ServoMotorConstraint ()
 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 mNegativeVelocityError [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

Servo motor constraint.

Constructor & Destructor Documentation

◆ ServoMotorConstraint()

dart::constraint::ServoMotorConstraint::ServoMotorConstraint ( dynamics::Joint joint)
explicit

Constructor.

◆ ~ServoMotorConstraint()

dart::constraint::ServoMotorConstraint::~ServoMotorConstraint ( )
virtual

Destructor.

Member Function Documentation

◆ applyImpulse()

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

Apply computed constraint impulse to constrained skeletons.

Implements dart::constraint::ConstraintBase.

◆ applyUnitImpulse()

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

Excite the constraint.

Implements dart::constraint::ConstraintBase.

◆ getConstraintForceMixing()

double dart::constraint::ServoMotorConstraint::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::ServoMotorConstraint::getInformation ( ConstraintInfo info)
overrideprotectedvirtual

Fill LCP variables.

Implements dart::constraint::ConstraintBase.

◆ getRootSkeleton() [1/2]

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

◆ getRootSkeleton() [2/2]

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

◆ getVelocityChange()

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

Get velocity change due to the uint impulse.

Implements dart::constraint::ConstraintBase.

◆ isActive()

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

Return true if this constraint is active.

Implements dart::constraint::ConstraintBase.

◆ setConstraintForceMixing()

void dart::constraint::ServoMotorConstraint::setConstraintForceMixing ( double  cfm)
static

Set global constraint force mixing parameter.

◆ unexcite()

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

Unexcite the constraint.

Implements dart::constraint::ConstraintBase.

◆ uniteSkeletons()

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

◆ update()

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

◆ mAppliedImpulseIndex

std::size_t dart::constraint::ServoMotorConstraint::mAppliedImpulseIndex
private

Index of applied impulse.

◆ mBodyNode

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

◆ mConstraintForceMixing

double dart::constraint::ServoMotorConstraint::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::ServoMotorConstraint::mJoint
private

◆ mLifeTime

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

◆ mLowerBound

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

◆ mNegativeVelocityError

double dart::constraint::ServoMotorConstraint::mNegativeVelocityError[6]
private

◆ mOldX

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

◆ mUpperBound

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