Simbody
Public Member Functions

SimTK::Constraint::Weld Class Reference

Six constraint equations. More...

#include <Constraint.h>

Inheritance diagram for SimTK::Constraint::Weld:

List of all members.

Public Member Functions

 Weld (MobilizedBody &body1, MobilizedBody &body2)
 Make the body frame of one body coincident with the body frame of the other body.
 Weld (MobilizedBody &body1, const Transform &frame1, MobilizedBody &body2, const Transform &frame2)
 Make a particular frame attached to one body coincident with a particular frame attached to the other body.
WeldsetAxisDisplayLength (Real r)
 This is used only for visualization.
Real getAxisDisplayLength () const
 Report the length being used for display of the frames being connected by this Weld.
WeldsetDefaultFrameOnBody1 (const Transform &)
 Explicitly set the default value for the frame on body1 which is to be made coincident with a frame on body2.
const TransformgetDefaultFrameOnBody1 () const
 Retrieve the default transform for the frame on body 1.
WeldsetDefaultFrameOnBody2 (const Transform &)
 Explicitly set the default value for the frame on body2 which is to be made coincident with a frame on body1.
const TransformgetDefaultFrameOnBody2 () const
 Retrieve the default transform for the frame on body 2.
MobilizedBodyIndex getBody1MobilizedBodyIndex () const
 Report the MobilizedBodyIndex of body 1 for this Weld constraint.
MobilizedBodyIndex getBody2MobilizedBodyIndex () const
 Report the MobilizedBodyIndex of body 2 for this Weld constraint.
const TransformgetFrameOnBody1 (const State &) const
const TransformgetFrameOnBody2 (const State &) const
Vec6 getPositionErrors (const State &) const
Vec6 getVelocityErrors (const State &) const
Vec6 getAccelerationErrors (const State &) const
Vec6 getMultipliers (const State &) const
const SpatialVecgetWeldReactionOnBody1 (const State &) const
const SpatialVecgetWeldReactionOnBody2 (const State &) const
 SimTK_INSERT_DERIVED_HANDLE_DECLARATIONS (Weld, WeldImpl, Constraint)

Detailed Description

Six constraint equations.

This constraint enforces coincidence between a frame on one body and a frame on another body. This is a combination of a ConstantOrientation constraint and a Ball constraint. The first three equations correspond to the perpendicularity constraints associated with the orientation constraint, the last three equations are the coincident point conditions.

The constraint is enforced by an internal (non-working) force applied at the spatial location of the frame origin on body 2, on material points of each body that are coincident with that spatial location. Note that this is somewhat asymmetric when the Weld is not properly assembled -- it acts as though the contact occurs at the origin of the frame on body 2, *not* at the origin of the frame on body 1. The orientation constraints on the other hand are symmetric, they are three "constant angle" constraints enforcing perpendicularity between body2's x,y,z axes with body1's y,z,x axes respectively, via an internal (non-working) torque vector applied equal and opposite on each body.

TODO: Although the frame origins can be brought together by the Ball constraint, the perpendicularity conditions can be satisfied with antiparallel axes in addition to the parallel ones we want. Therefore the assembly conditions must include additional (redundant) constraints requiring parallel axes.


Constructor & Destructor Documentation

Make the body frame of one body coincident with the body frame of the other body.

SimTK::Constraint::Weld::Weld ( MobilizedBody body1,
const Transform frame1,
MobilizedBody body2,
const Transform frame2 
)

Make a particular frame attached to one body coincident with a particular frame attached to the other body.

The frames are specified by giving the transform X_BF which expresses the position and orientation of frame F relative to the body frame B.


Member Function Documentation

Weld& SimTK::Constraint::Weld::setAxisDisplayLength ( Real  r)

This is used only for visualization.

Set r <= 0 to disable default frame drawing. Default axis length is r=1. This is a topology-stage variable, not changeable later.

Real SimTK::Constraint::Weld::getAxisDisplayLength ( ) const

Report the length being used for display of the frames being connected by this Weld.

If this returns 0 then no geometry is being generated for the frames.

Weld& SimTK::Constraint::Weld::setDefaultFrameOnBody1 ( const Transform )

Explicitly set the default value for the frame on body1 which is to be made coincident with a frame on body2.

Note that this is topology-stage value so requires non-const access to the Constraint.

const Transform& SimTK::Constraint::Weld::getDefaultFrameOnBody1 ( ) const

Retrieve the default transform for the frame on body 1.

Weld& SimTK::Constraint::Weld::setDefaultFrameOnBody2 ( const Transform )

Explicitly set the default value for the frame on body2 which is to be made coincident with a frame on body1.

Note that this is topology-stage value so requires non-const access to the Constraint.

const Transform& SimTK::Constraint::Weld::getDefaultFrameOnBody2 ( ) const

Retrieve the default transform for the frame on body 2.

MobilizedBodyIndex SimTK::Constraint::Weld::getBody1MobilizedBodyIndex ( ) const

Report the MobilizedBodyIndex of body 1 for this Weld constraint.

MobilizedBodyIndex SimTK::Constraint::Weld::getBody2MobilizedBodyIndex ( ) const

Report the MobilizedBodyIndex of body 2 for this Weld constraint.

const Transform& SimTK::Constraint::Weld::getFrameOnBody1 ( const State ) const
const Transform& SimTK::Constraint::Weld::getFrameOnBody2 ( const State ) const
Vec6 SimTK::Constraint::Weld::getPositionErrors ( const State ) const
Vec6 SimTK::Constraint::Weld::getVelocityErrors ( const State ) const
Vec6 SimTK::Constraint::Weld::getAccelerationErrors ( const State ) const
Vec6 SimTK::Constraint::Weld::getMultipliers ( const State ) const
const SpatialVec& SimTK::Constraint::Weld::getWeldReactionOnBody1 ( const State ) const
const SpatialVec& SimTK::Constraint::Weld::getWeldReactionOnBody2 ( const State ) const
SimTK::Constraint::Weld::SimTK_INSERT_DERIVED_HANDLE_DECLARATIONS ( Weld  ,
WeldImpl  ,
Constraint   
)

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines