DART 6.12.2
Loading...
Searching...
No Matches
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::DynamicJointConstraint dart::constraint::ConstraintBase

Public Member Functions

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

Static Public Member Functions

static const std::string & getStaticType ()
 Returns constraint type for this class.
 
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 Member Functions

void update () override
 Update constraint using updated Skeleton's states.
 
void getInformation (ConstraintInfo *_lcp) override
 Fill LCP variables.
 
void applyUnitImpulse (std::size_t _index) override
 Apply unit impulse to constraint space.
 
void getVelocityChange (double *_vel, bool _withCfm) override
 Get velocity change due to the uint impulse.
 
void excite () override
 Excite the constraint.
 
void unexcite () override
 Unexcite the constraint.
 
void applyImpulse (double *_lambda) override
 Apply computed constraint impulse to constrained skeletons.
 
bool isActive () const override
 Return true if this constraint is active.
 
dynamics::SkeletonPtr getRootSkeleton () const override
 
void uniteSkeletons () override
 

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

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.
 

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::DynamicJointConstraint::getBodyNode1 ( ) const
inherited

Get the first BodyNode that this constraint is associated with.

◆ getBodyNode2()

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

Get the second BodyNode that this constraint is associated with.

◆ getConstraintForceMixing()

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

Get global error reduction parameter.

◆ getErrorReductionParameter()

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

◆ getStaticType()

const std::string & dart::constraint::WeldJointConstraint::getStaticType ( )
static

Returns constraint type for this class.

◆ getType()

const std::string & dart::constraint::WeldJointConstraint::getType ( ) const
overridevirtual

Returns a string representing the constraint type.

Reimplemented from dart::constraint::ConstraintBase.

◆ 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::DynamicJointConstraint::setConstraintForceMixing ( double  cfm)
staticinherited

Set global constraint force mixing parameter.

◆ setErrorAllowance()

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

Set global error reduction parameter.

◆ setErrorReductionParameter()

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

Set global error reduction parameter.

◆ setMaxErrorReductionVelocity()

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

First body node.

◆ mBodyNode2

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

Second body node.

◆ mConstraintForceMixing

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

Global constraint error allowance.

◆ mErrorReductionParameter

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