Simbody
|
Six constraint equations. More...
#include <Constraint.h>
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. | |
Weld & | setAxisDisplayLength (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. | |
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. | |
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. | |
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) |
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.
SimTK::Constraint::Weld::Weld | ( | MobilizedBody & | body1, |
MobilizedBody & | body2 | ||
) |
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.
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.
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.
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 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 | |||
) |