DART  6.6.2
dart::constraint::WeldJointConstraint Class Reference

WeldJointConstraint represents weld joint constraint between a body and the world or between two bodies. More...

#include <WeldJointConstraint.hpp>

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

Public Member Functions

 WeldJointConstraint (dynamics::BodyNode *_body)
 Constructor that takes one body. More...
 
 WeldJointConstraint (dynamics::BodyNode *_body1, dynamics::BodyNode *_body2)
 Constructor that takes two bodies. More...
 
void setRelativeTransform (const Eigen::Isometry3d &_tf)
 Set the relative transform that this WeldJointConstraint will enforce. More...
 
const Eigen::Isometry3d & getRelativeTransform () const
 Get the relative transform that this WeldJointConstraint will enforce. More...
 
virtual ~WeldJointConstraint ()
 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...
 
std::size_t getDimension () const
 Return dimesion of this constranit. More...
 

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 *_vel, 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...
 
bool isActive () const override
 Return true if this constraint is active. More...
 
dynamics::SkeletonPtr getRootSkeleton () const override
 
void uniteSkeletons () override
 

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

Private Attributes

Eigen::Isometry3d mRelativeTransform
 
Eigen::Vector6d mViolation
 
const Eigen::Matrix6d mJacobian1
 
Eigen::Matrix6d mJacobian2
 
double mOldX [6]
 
std::size_t mAppliedImpulseIndex
 Index of applied impulse. More...
 

Detailed Description

WeldJointConstraint represents weld joint constraint between a body and the world or between two bodies.

Constructor & Destructor Documentation

◆ WeldJointConstraint() [1/2]

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

Constructor that takes one body.

◆ WeldJointConstraint() [2/2]

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

Constructor that takes two bodies.

◆ ~WeldJointConstraint()

dart::constraint::WeldJointConstraint::~WeldJointConstraint ( )
virtual

Destructor.

Member Function Documentation

◆ applyImpulse()

void dart::constraint::WeldJointConstraint::applyImpulse ( double *  _lambda)
overrideprotectedvirtual

Apply computed constraint impulse to constrained skeletons.

Implements dart::constraint::ConstraintBase.

◆ applyUnitImpulse()

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

Excite the constraint.

Implements dart::constraint::ConstraintBase.

◆ getBodyNode1()

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

Get the first BodyNode that this constraint is associated with.

◆ getBodyNode2()

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

Get the second BodyNode that this constraint is associated with.

◆ getConstraintForceMixing()

double dart::constraint::JointConstraint::getConstraintForceMixing ( )
staticinherited

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 ( )
staticinherited

Get global error reduction parameter.

◆ getErrorReductionParameter()

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

Get global error reduction parameter.

◆ getInformation()

void dart::constraint::WeldJointConstraint::getInformation ( ConstraintInfo _info)
overrideprotectedvirtual

Fill LCP variables.

Implements dart::constraint::ConstraintBase.

◆ getMaxErrorReductionVelocity()

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

Get global error reduction parameter.

◆ getRelativeTransform()

const Eigen::Isometry3d & dart::constraint::WeldJointConstraint::getRelativeTransform ( ) const

Get the relative transform that this WeldJointConstraint will enforce.

◆ getRootSkeleton() [1/2]

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

◆ getRootSkeleton() [2/2]

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

◆ getVelocityChange()

void dart::constraint::WeldJointConstraint::getVelocityChange ( double *  _vel,
bool  _withCfm 
)
overrideprotectedvirtual

Get velocity change due to the uint impulse.

Implements dart::constraint::ConstraintBase.

◆ isActive()

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

Return true if this constraint is active.

Implements dart::constraint::ConstraintBase.

◆ setConstraintForceMixing()

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

Set global constraint force mixing parameter.

◆ setErrorAllowance()

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

Set global error reduction parameter.

◆ setErrorReductionParameter()

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

Set global error reduction parameter.

◆ setMaxErrorReductionVelocity()

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

Set global error reduction parameter.

◆ setRelativeTransform()

void dart::constraint::WeldJointConstraint::setRelativeTransform ( const Eigen::Isometry3d &  _tf)

Set the relative transform that this WeldJointConstraint will enforce.

◆ unexcite()

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

Unexcite the constraint.

Implements dart::constraint::ConstraintBase.

◆ uniteSkeletons()

void dart::constraint::WeldJointConstraint::uniteSkeletons ( )
overrideprotectedvirtual

Reimplemented from dart::constraint::ConstraintBase.

◆ update()

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

Update constraint using updated Skeleton's states.

Implements dart::constraint::ConstraintBase.

Member Data Documentation

◆ mAppliedImpulseIndex

std::size_t dart::constraint::WeldJointConstraint::mAppliedImpulseIndex
private

Index of applied impulse.

◆ mBodyNode1

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

First body node.

◆ mBodyNode2

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

Second body node.

◆ mConstraintForceMixing

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

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
staticprotectedinherited

Global constraint error allowance.

◆ mErrorReductionParameter

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

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

The default is 0.01.

◆ mJacobian1

const Eigen::Matrix6d dart::constraint::WeldJointConstraint::mJacobian1
private

◆ mJacobian2

Eigen::Matrix6d dart::constraint::WeldJointConstraint::mJacobian2
private

◆ mMaxErrorReductionVelocity

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

Maximum error reduction velocity.

◆ mOldX

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

◆ mRelativeTransform

Eigen::Isometry3d dart::constraint::WeldJointConstraint::mRelativeTransform
private

◆ mViolation

Eigen::Vector6d dart::constraint::WeldJointConstraint::mViolation
private