Constraint::Weld Class Reference

#include <Constraint.h>

Inheritance diagram for Constraint::Weld:

Constraint PIMPLHandle

List of all members.


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.

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)


Constructor & Destructor Documentation

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.

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& 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 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& 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& getDefaultFrameOnBody1 (  )  const

Retrieve the default transform for the frame on body 1.

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& getDefaultFrameOnBody2 (  )  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 Transform& getFrameOnBody1 ( const State  )  const

const Transform& getFrameOnBody2 ( const State  )  const

Vec6 getPositionErrors ( const State  )  const

Vec6 getVelocityErrors ( const State  )  const

Vec6 getAccelerationErrors ( const State  )  const

Vec6 getMultipliers ( const State  )  const

const SpatialVec& getWeldReactionOnBody1 ( const State  )  const

const SpatialVec& getWeldReactionOnBody2 ( const State  )  const

SimTK_INSERT_DERIVED_HANDLE_DECLARATIONS ( Weld  ,
WeldImpl  ,
Constraint   
)


The documentation for this class was generated from the following file:

Generated on Fri Sep 26 07:44:31 2008 for SimTKcore by  doxygen 1.5.6