Simbody
3.6

Six mobilities – arbitrary relative motion modeled as xyz translation followed by an xyz bodyfixed Euler angle sequence, though with a singularity when the middle angle is +/ 90 degrees. More...
Public Member Functions  
Bushing ()  
Construct an empty handle that can be assigned to reference any MobilizedBody::Bushing. More...  
Bushing (MobilizedBody &parent, const Transform &X_PF, const Body &bodyInfo, const Transform &X_BM, Direction=Forward)  
Create a Bushing mobilizer between an existing parent (inboard) body P and a new child (outboard) body B created by copying the given bodyInfo into a privatelyowned Body within the constructed MobilizedBody object. More...  
Bushing (MobilizedBody &parent, const Body &bodyInfo, Direction=Forward)  
Abbreviated constructor you can use if the mobilizer frames are coincident with the parent and child body frames. More...  
Bushing &  setDefaultInboardFrame (const Transform &X_PF) 
Change the default inboard ("fixed") frame F on the parent body of this mobilizer. More...  
Bushing &  setDefaultOutboardFrame (const Transform &X_BM) 
Change the default outboard ("moving") frame M on this mobilized body (that is, on this mobilizer's child body). More...  
Bushing &  setDefaultTransform (const Transform &X_FM) 
Override the default pose for this mobilizer. More...  
Transform  getDefaultTransform () const 
Return the default pose for this mobilizer as a Transform. More...  
Bushing &  addBodyDecoration (const Transform &X_BD, const DecorativeGeometry &g) 
Add DecorativeGeometry to the privatelyowned Body contained in this MobilizedBody, positioned relative to the body's frame. More...  
Bushing &  addOutboardDecoration (const Transform &X_MD, const DecorativeGeometry &g) 
Add DecorativeGeometry to the privatelyowned Body contained in this MobilizedBody, positioned relative to the mobilizer's M frame on that body. More...  
Bushing &  addInboardDecoration (const Transform &X_FD, const DecorativeGeometry &g) 
Add DecorativeGeometry to the parent (inboard) body of this mobilizer, positioned relative to the mobilizer's F frame on the parent body. More...  
const Vec6 &  getDefaultQ () const 
Obtain the default value for the generalized coordinates q that has been set for this mobilizer. More...  
Bushing &  setDefaultQ (const Vec6 &q) 
Set the default value for the generalized coordinates q for this mobilizer. More...  
const Vec6 &  getQ (const State &state) const 
Obtain the current value for this mobilizer's generalized coordinates q from the given State, which must be realized through Stage::Model (these are state variables). More...  
const Vec6 &  getQDot (const State &state) const 
Obtain the current value for this mobilizer's generalized coordinate time derivatives qdot from the given State, which must be realized through Stage::Velocity. More...  
const Vec6 &  getQDotDot (const State &state) const 
Obtain the current value for this mobilizer's generalized coordinate second time derivatives qdotdot from the given State, which must be realized through Stage::Acceleration. More...  
const Vec6 &  getU (const State &state) const 
Obtain the current value for this mobilizer's generalized speeds u from the given State, which must be realized through Stage::Model (these are state variables). More...  
const Vec6 &  getUDot (const State &state) const 
Obtain the current value for this mobilizer's generalized accelerations udot (=d/dt u) from the given State, which must be realized through Stage::Acceleration. More...  
void  setQ (State &state, const Vec6 &q) const 
Set new values for this mobilizer's generalized coordinates q in the given state. More...  
void  setU (State &state, const Vec6 &u) const 
Set new values for this mobilizer's generalized speeds u in the given state. More...  
Advanced/Obscure  
Most users won't use these methods.  
const Vec6 &  getMyPartQ (const State &state, const Vector &qlike) const 
Given a vector in the System's generalized coordinate basis, extract the six q's belonging to this mobilizer. More...  
const Vec6 &  getMyPartU (const State &state, const Vector &ulike) const 
Given a vector in the System's generalized speed basis, extract the six u's belonging to this mobilizer. More...  
Vec6 &  updMyPartQ (const State &state, Vector &qlike) const 
Given a writable vector in the System's generalized coordinate basis, extract a writable reference to the six q's in that vector that belong to this mobilizer. More...  
Vec6 &  updMyPartU (const State &state, Vector &ulike) const 
Given a writable vector in the System's generalized speed basis, extract a writable reference to the six u's in that vector that belong to this mobilizer. More...  
Public Member Functions inherited from SimTK::MobilizedBody  
MobilizedBody ()  
The default constructor provides an empty MobilizedBody handle that can be assigned to reference any type of MobilizedBody. More...  
MobilizedBody (MobilizedBodyImpl *r)  
Internal use only. More...  
void  lock (State &state, Motion::Level level=Motion::Position) const 
Lock this mobilizer's position or velocity at its current value, or lock the acceleration to zero, depending on the level parameter. More...  
void  lockAt (State &state, Real value, Motion::Level level=Motion::Position) const 
Lock this mobilizer's q, u, or udot to the given scalar value , depending on level . More...  
void  lockAt (State &state, const Vector &value, Motion::Level level=Motion::Position) const 
Lock this mobilizer's q, u, or udot to the given Vector value , depending on level . More...  
template<int N>  
void  lockAt (State &state, const Vec< N > &value, Motion::Level level=Motion::Position) const 
Lock this mobilizer's q, u, or udot to the given Vec<N> value , depending on the level . More...  
void  unlock (State &state) const 
Unlock this mobilizer, returning it to its normal behavior which may be free motion or may be controlled by a Motion object. More...  
bool  isLocked (const State &state) const 
Check whether this mobilizer is currently locked in the given state . More...  
Motion::Level  getLockLevel (const State &state) const 
Returns the lock level if the mobilizer is locked in the given state , otherwise Motion::NoLevel. More...  
Vector  getLockValueAsVector (const State &state) const 
Return the q, u, or udot value at which this mobilizer is locked, depending on the lock level, as a Vector of the appropriate length. More...  
MobilizedBody &  lockByDefault (Motion::Level level=Motion::Position) 
Change whether this mobilizer is initially locked. More...  
bool  isLockedByDefault () const 
Check whether this mobilizer is to be locked in the default state. More...  
Motion::Level  getLockByDefaultLevel () const 
Returns the level at which the mobilizer is locked by default, if it is locked by default, otherwise Motion::NoLevel. More...  
const Transform &  getBodyTransform (const State &state) const 
Extract from the state cache the alreadycalculated spatial configuration X_GB of body B's body frame, measured with respect to the Ground frame and expressed in the Ground frame. More...  
const Rotation &  getBodyRotation (const State &state) const 
Extract from the state cache the alreadycalculated spatial orientation R_GB of body B's body frame x, y, and z axes expressed in the Ground frame, as the Rotation matrix R_GB. More...  
const Vec3 &  getBodyOriginLocation (const State &state) const 
Extract from the state cache the alreadycalculated spatial location of body B's body frame origin Bo, measured from the Ground origin Go and expressed in the Ground frame, as the position vector p_GB (== p_GoBo). More...  
const Transform &  getMobilizerTransform (const State &state) const 
At stage Position or higher, return the crossmobilizer transform X_FM, the body's inboard mobilizer frame M measured and expressed in the parent body's corresponding outboard frame F. More...  
const SpatialVec &  getBodyVelocity (const State &state) const 
Extract from the state cache the alreadycalculated spatial velocity V_GB of this body's reference frame B, measured with respect to the Ground frame and expressed in the Ground frame. More...  
const Vec3 &  getBodyAngularVelocity (const State &state) const 
Extract from the state cache the alreadycalculated inertial angular velocity vector w_GB of this body B, measured with respect to the Ground frame and expressed in the Ground frame. More...  
const Vec3 &  getBodyOriginVelocity (const State &state) const 
Extract from the state cache the alreadycalculated inertial linear velocity vector v_GB (more explicitly, v_GBo) of this body B's origin point Bo, measured with respect to the Ground frame and expressed in the Ground frame. More...  
const SpatialVec &  getMobilizerVelocity (const State &state) const 
At stage Velocity or higher, return the crossmobilizer velocity V_FM, the relative velocity of this body's "moving" mobilizer frame M in the parent body's corresponding "fixed" frame F, measured and expressed in F. More...  
const SpatialVec &  getBodyAcceleration (const State &state) const 
Extract from the state cache the alreadycalculated spatial acceleration A_GB of this body's reference frame B, measured with respect to the Ground frame and expressed in the Ground frame. More...  
const Vec3 &  getBodyAngularAcceleration (const State &state) const 
Extract from the state cache the alreadycalculated inertial angular acceleration vector b_GB of this body B, measured with respect to the Ground frame and expressed in the Ground frame. More...  
const Vec3 &  getBodyOriginAcceleration (const State &state) const 
Extract from the state cache the alreadycalculated inertial linear acceleration vector a_GB (more explicitly, a_GBo) of this body B's origin point Bo, measured with respect to the Ground frame and expressed in the Ground frame. More...  
const SpatialVec &  getMobilizerAcceleration (const State &state) const 
TODO: Not implemented yet – any volunteers? At stage Acceleration, return the crossmobilizer acceleration A_FM, the relative acceleration of body B's "moving" mobilizer frame M in the parent body's corresponding "fixed" frame F, measured and expressed in F. More...  
const MassProperties &  getBodyMassProperties (const State &state) const 
Return a reference to this body's mass properties in the State cache. More...  
const SpatialInertia &  getBodySpatialInertiaInGround (const State &state) const 
Return a reference to the alreadycalculated SpatialInertia of this body, taken about the body's origin (not its mass center), and expressed in the Ground frame. More...  
Real  getBodyMass (const State &state) const 
Return the mass of this body. More...  
const Vec3 &  getBodyMassCenterStation (const State &state) const 
Return this body's center of mass station (i.e., the vector fixed in the body, going from body origin to body mass center, expressed in the body frame.) The State must have been realized to Stage::Instance or higher. More...  
const UnitInertia &  getBodyUnitInertiaAboutBodyOrigin (const State &state) const 
Return a reference to this body's unit inertia matrix in the State cache, taken about the body origin and expressed in the body frame. More...  
const Transform &  getInboardFrame (const State &state) const 
Return a reference to this mobilizer's frame F fixed on the parent body P, as the fixed Transform from P's body frame to the frame F fixed to P. More...  
const Transform &  getOutboardFrame (const State &state) const 
Return a reference to this MobilizedBody's mobilizer frame M, as the fixed Transform from this body B's frame to the frame M fixed on B. More...  
void  setInboardFrame (State &state, const Transform &X_PF) const 
TODO: not implemented yet. More...  
void  setOutboardFrame (State &state, const Transform &X_BM) const 
TODO: not implemented yet. More...  
int  getNumQ (const State &state) const 
Return the number of generalized coordinates q currently in use by this mobilizer. More...  
int  getNumU (const State &state) const 
Return the number of generalized speeds u currently in use by this mobilizer. More...  
QIndex  getFirstQIndex (const State &state) const 
Return the global QIndex of the first q for this mobilizer; all the q's range from getFirstQIndex() to QIndex(getFirstQIndex()+getNumQ()1). More...  
UIndex  getFirstUIndex (const State &state) const 
Return the global UIndex of the first u for this mobilizer; all the u's range from getFirstUIndex() to UIndex(getFirstUIndex()+getNumU()1). More...  
Motion::Method  getQMotionMethod (const State &state) const 
Determine how generalized coordinate q values are being determined. More...  
Motion::Method  getUMotionMethod (const State &state) const 
Determine how generalized speed u values are being determined. More...  
Motion::Method  getUDotMotionMethod (const State &state) const 
Determine how generalized acceleration udot values are being determined. More...  
Real  getOneQ (const State &state, int which) const 
Return one of the generalized coordinates q from this mobilizer's partition of the matter subsystem's full q vector in the State. More...  
Real  getOneU (const State &state, int which) const 
Return one of the generalized speeds u from this mobilizer's partition of the matter subsystem's full u vector in the State. More...  
Vector  getQAsVector (const State &state) const 
Return as a Vector of length getNumQ() all the generalized coordinates q currently in use by this mobilizer, from this mobilizer's partion in the matter subsystem's full q vector in the State. More...  
Vector  getUAsVector (const State &state) const 
Return as a Vector of length getNumU() all the generalized speeds u currently in use by this mobilizer, from this mobilizer's partion in the matter subsystem's full u vector in the State. More...  
Real  getOneQDot (const State &state, int which) const 
Return one of the generalized coordinate derivatives qdot from this mobilizer's partition of the matter subsystem's full qdot vector in the State cache. More...  
Vector  getQDotAsVector (const State &state) const 
Return as a Vector of length getNumQ() all the generalized coordinate derivatives qdot currently in use by this mobilizer, from this mobilizer's partition in the matter subsystem's full qdot vector in the State cache. More...  
Real  getOneUDot (const State &state, int which) const 
Return one of the generalized accelerations udot from this mobilizer's partition of the matter subsystem's full udot vector in the State cache. More...  
Real  getOneQDotDot (const State &state, int which) const 
Return one of the generalized coordinate second derivatives qdotdot from this mobilizer's partition of the matter subsystem's full qdotdot vector in the State cache. More...  
Vector  getUDotAsVector (const State &state) const 
Return as a Vector of length getNumU() all the generalized accelerations udot currently in use by this mobilizer, from this mobilizer's partion in the matter subsystem's full udot vector in the State cache. More...  
Vector  getQDotDotAsVector (const State &state) const 
Return as a Vector of length getNumQ() all the generalized coordinate second derivatives qdotdot currently in use by this mobilizer, from this mobilizer's partion in the matter subsystem's full qdotdot vector in the State cache. More...  
Vector  getTauAsVector (const State &state) const 
Return the generalized forces tau resulting from prescribed (known) acceleration, corresponding to each of this mobilizer's mobilities, as a Vector of length nu=getNumU(). More...  
Real  getOneTau (const State &state, MobilizerUIndex which) const 
Return one of the tau forces resulting from prescribed (known) acceleration, corresponding to one of this mobilizer's mobilities as selected here using the which parameter, numbered from zero to getNumU()1. More...  
void  setOneQ (State &state, int which, Real v) const 
Set one of the generalized coordinates q to value v , in this mobilizer's partition of the matter subsystem's full q vector in the State. More...  
void  setOneU (State &state, int which, Real v) const 
Set one of the generalized speeds u to value v , in this mobilizer's partition of the matter subsystem's full u vector in the State. More...  
void  setQFromVector (State &state, const Vector &v) const 
Set all of the generalized coordinates q to value v (a Vector of length getNumQ()), in this mobilizer's partition of the matter subsystem's full q vector in the State. More...  
void  setUFromVector (State &state, const Vector &v) const 
Set all of the generalized speeds u to value v (a Vector of length getNumU()), in this mobilizer's partition of the matter subsystem's full u vector in the State. More...  
void  setQToFitTransform (State &state, const Transform &X_FM) const 
Adjust this mobilizer's q's to best approximate the supplied Transform which requests a particular relative orientation and translation between the F "fixed" frame and M "moving" frame connected by this mobilizer. More...  
void  setQToFitRotation (State &state, const Rotation &R_FM) const 
Adjust this mobilizer's q's to best approximate the supplied Rotation matrix which requests a particular relative orientation between the "fixed" frame F and "moving" frame M connected by this mobilizer. More...  
void  setQToFitTranslation (State &state, const Vec3 &p_FM) const 
Adjust this mobilizer's q's to best approximate the supplied position vector which requests a particular offset between the origins of the F "fixed" frame and M "moving" frame connected by this mobilizer, with any q's (rotational or translational) being modified if doing so helps satisfy the request. More...  
void  setUToFitVelocity (State &state, const SpatialVec &V_FM) const 
Adjust this mobilizer's u's (generalized speeds) to best approximate the supplied spatial velocity V_FM which requests the relative angular and linear velocity between the "fixed" and "moving" frames connected by this mobilizer. More...  
void  setUToFitAngularVelocity (State &state, const Vec3 &w_FM) const 
Adjust this mobilizer's u's (generalized speeds) to best approximate the supplied angular velocity w_FM which requests a particular relative angular between the "fixed" and "moving" frames connected by this mobilizer. More...  
void  setUToFitLinearVelocity (State &state, const Vec3 &v_FM) const 
Adjust any of this mobilizer's u's (generalized speeds) to best approximate the supplied linear velocity v_FM which requests a particular velocity for the "moving" frame M origin in the "fixed" frame F on the parent where these are the frames connected by this mobilizer. More...  
SpatialVec  getHCol (const State &state, MobilizerUIndex ux) const 
Expert use only: obtain a column of the hinge matrix H corresponding to one of this mobilizer's mobilities (actually a column of H_PB_G; what Jain calls H* and Schwieters calls H^T). More...  
SpatialVec  getH_FMCol (const State &state, MobilizerUIndex ux) const 
Expert use only: obtain a column of the mobilizerlocal hinge matrix H_FM which maps generalized speeds u to crossmobilizer spatial velocity V_FM via V_FM=H_FM*u. More...  
Transform  findBodyTransformInAnotherBody (const State &state, const MobilizedBody &inBodyA) const 
Return X_AB, the spatial transform giving this body B's frame in body A's frame. More...  
Rotation  findBodyRotationInAnotherBody (const State &state, const MobilizedBody &inBodyA) const 
Return R_AB, the rotation matrix giving this body B's axes in body A's frame. More...  
Vec3  findBodyOriginLocationInAnotherBody (const State &state, const MobilizedBody &toBodyA) const 
Return the station on another body A (that is, a point measured and expressed in A) that is currently coincident in space with the origin Bo of this body B. More...  
SpatialVec  findBodyVelocityInAnotherBody (const State &state, const MobilizedBody &inBodyA) const 
Return the angular and linear velocity of body B's frame in body A's frame, expressed in body A, and arranged as a SpatialVec. More...  
Vec3  findBodyAngularVelocityInAnotherBody (const State &state, const MobilizedBody &inBodyA) const 
Return the angular velocity w_AB of body B's frame in body A's frame, expressed in body A. More...  
Vec3  findBodyOriginVelocityInAnotherBody (const State &state, const MobilizedBody &inBodyA) const 
Return the velocity of body B's origin point in body A's frame, expressed in body A. More...  
SpatialVec  findBodyAccelerationInAnotherBody (const State &state, const MobilizedBody &inBodyA) const 
Return the angular and linear acceleration of body B's frame in body A's frame, expressed in body A, and arranged as a SpatialVec. More...  
Vec3  findBodyAngularAccelerationInAnotherBody (const State &state, const MobilizedBody &inBodyA) const 
Return the angular acceleration of body B's frame in body A's frame, expressed in body A. More...  
Vec3  findBodyOriginAccelerationInAnotherBody (const State &state, const MobilizedBody &inBodyA) const 
Return the acceleration of body B's origin point in body A's frame, expressed in body A. More...  
SpatialVec  findMobilizerReactionOnBodyAtMInGround (const State &state) const 
Return the spatial reaction force (moment and force) applied by the mobilizer to body B at the location of the mobilizer frame M (fixed to body B, but not necessarily at the body frame origin), expressed in Ground. More...  
SpatialVec  findMobilizerReactionOnBodyAtOriginInGround (const State &state) const 
Return the spatial reaction force (moment and force) applied by the mobilizer to body B but shifted to the B frame origin, and expressed in Ground. More...  
SpatialVec  findMobilizerReactionOnParentAtFInGround (const State &state) const 
Return the spatial reaction force (moment and force) applied by the mobilizer to the parent (inboard) body P at the location of the inboard "fixed" mobilizer frame F (fixed to body P, but not necessarily at the P frame origin), expressed in Ground. More...  
SpatialVec  findMobilizerReactionOnParentAtOriginInGround (const State &state) const 
Return the spatial reaction force (moment and force) applied by the mobilizer to the parent (inboard) body P at the location of the P frame origin, and expressed in Ground. More...  
Vec3  findStationLocationInGround (const State &state, const Vec3 &stationOnB) const 
Return the Cartesian (ground) location that is currently coincident with a station (point) S fixed on body B. More...  
Vec3  findStationLocationInAnotherBody (const State &state, const Vec3 &stationOnB, const MobilizedBody &toBodyA) const 
Given a station S on this body B, return the location on another body A which is at the same location in space. More...  
Vec3  findStationVelocityInGround (const State &state, const Vec3 &stationOnB) const 
Given a station fixed on body B, return its inertial (Cartesian) velocity, that is, its velocity relative to the Ground frame, expressed in the Ground frame. More...  
Vec3  findStationVelocityInAnotherBody (const State &state, const Vec3 &stationOnBodyB, const MobilizedBody &inBodyA) const 
Return the velocity of a station S fixed on body B, in body A's frame, expressed in body A. More...  
Vec3  findStationAccelerationInGround (const State &state, const Vec3 &stationOnB) const 
Given a station fixed on body B, return its inertial (Cartesian) acceleration, that is, its acceleration relative to the ground frame, expressed in the ground frame. More...  
Vec3  findStationAccelerationInAnotherBody (const State &state, const Vec3 &stationOnBodyB, const MobilizedBody &inBodyA) const 
Return the acceleration of a station S fixed on body B, in another body A's frame, expressed in body A. More...  
void  findStationLocationAndVelocityInGround (const State &state, const Vec3 &locationOnB, Vec3 &locationOnGround, Vec3 &velocityInGround) const 
It is cheaper to calculate a station's ground location and velocity together than to do them separately. More...  
void  findStationLocationVelocityAndAccelerationInGround (const State &state, const Vec3 &locationOnB, Vec3 &locationOnGround, Vec3 &velocityInGround, Vec3 &accelerationInGround) const 
It is cheaper to calculate a station's ground location, velocity, and acceleration together than to do them separately. More...  
Vec3  findMassCenterLocationInGround (const State &state) const 
Return the Cartesian (ground) location of this body B's mass center. More...  
Vec3  findMassCenterLocationInAnotherBody (const State &state, const MobilizedBody &toBodyA) const 
Return the point of another body A that is currently coincident in space with the mass center CB of this body B. More...  
Vec3  findStationAtGroundPoint (const State &state, const Vec3 &locationInG) const 
Return the station (point) S of this body B that is coincident with the given Ground location. More...  
Vec3  findStationAtAnotherBodyStation (const State &state, const MobilizedBody &fromBodyA, const Vec3 &stationOnA) const 
Return the station (point) on this body B that is coincident with the given station on another body A. More...  
Vec3  findStationAtAnotherBodyOrigin (const State &state, const MobilizedBody &fromBodyA) const 
Return the station S of this body that is currently coincident in space with the origin Ao of another body A. More...  
Vec3  findStationAtAnotherBodyMassCenter (const State &state, const MobilizedBody &fromBodyA) const 
Return the station S of this body that is currently coincident in space with the mass center Ac of another body A. More...  
Transform  findFrameTransformInGround (const State &state, const Transform &frameOnB) const 
Return the current Groundframe pose (position and orientation) of a frame F that is fixed to body B. More...  
SpatialVec  findFrameVelocityInGround (const State &state, const Transform &frameOnB) const 
Return the current Groundframe spatial velocity V_GF (that is, angular and linear velocity) of a frame F that is fixed to body B. More...  
SpatialVec  findFrameAccelerationInGround (const State &state, const Transform &frameOnB) const 
Return the current Groundframe spatial acceleration A_GF (that is, angular and linear acceleration) of a frame F that is fixed to body B. More...  
Vec3  expressVectorInGroundFrame (const State &state, const Vec3 &vectorInB) const 
Reexpress a vector expressed in this body B's frame into the same vector in G, by applying only a rotation. More...  
Vec3  expressGroundVectorInBodyFrame (const State &state, const Vec3 &vectorInG) const 
Reexpress a vector expressed in Ground into the same vector expressed in this body B, by applying only rotation. More...  
Vec3  expressVectorInAnotherBodyFrame (const State &state, const Vec3 &vectorInB, const MobilizedBody &inBodyA) const 
Reexpress a vector expressed in this body B into the same vector expressed in body A, by applying only a rotation. More...  
MassProperties  expressMassPropertiesInGroundFrame (const State &state) const 
Reexpress this body B's mass properties in Ground by applying only a rotation, not a shift of reference point. More...  
MassProperties  expressMassPropertiesInAnotherBodyFrame (const State &state, const MobilizedBody &inBodyA) const 
Reexpress this body B's mass properties in another body A's frame by applying only a rotation, not a shift of reference point. More...  
SpatialMat  calcBodySpatialInertiaMatrixInGround (const State &state) const 
Return the mass properties of body B, measured from and about the B origin Bo, but expressed in Ground and then returned as a Spatial Inertia Matrix. More...  
Inertia  calcBodyCentralInertia (const State &state, MobilizedBodyIndex objectBodyB) const 
Return the central inertia for body B, that is, the inertia taken about body B's mass center Bc, and expressed in B. More...  
Inertia  calcBodyInertiaAboutAnotherBodyStation (const State &state, const MobilizedBody &inBodyA, const Vec3 &aboutLocationOnBodyA) const 
Return the inertia of this body B, taken about an arbitrary point PA of body A, and expressed in body A. More...  
SpatialVec  calcBodyMomentumAboutBodyOriginInGround (const State &state) 
Calculate body B's momentum (angular, linear) measured and expressed in Ground, but taken about the body origin Bo. More...  
SpatialVec  calcBodyMomentumAboutBodyMassCenterInGround (const State &state) const 
Calculate body B's momentum (angular, linear) measured and expressed in Ground, but taken about the body mass center Bc. More...  
Real  calcStationToStationDistance (const State &state, const Vec3 &locationOnBodyB, const MobilizedBody &bodyA, const Vec3 &locationOnBodyA) const 
Calculate the distance from a station PB on body B to a station PA on body A. More...  
Real  calcStationToStationDistanceTimeDerivative (const State &state, const Vec3 &locationOnBodyB, const MobilizedBody &bodyA, const Vec3 &locationOnBodyA) const 
Calculate the time rate of change of distance from a fixed point PB on body B to a fixed point PA on body A. More...  
Real  calcStationToStationDistance2ndTimeDerivative (const State &state, const Vec3 &locationOnBodyB, const MobilizedBody &bodyA, const Vec3 &locationOnBodyA) const 
Calculate the second time derivative of distance from a fixed point PB on body B to a fixed point PA on body A. More...  
Vec3  calcBodyMovingPointVelocityInBody (const State &state, const Vec3 &locationOnBodyB, const Vec3 &velocityOnBodyB, const MobilizedBody &inBodyA) const 
TODO: not implemented yet – any volunteers? Return the velocity of a point P moving on body B, in body A's frame, expressed in body A. More...  
Vec3  calcBodyMovingPointAccelerationInBody (const State &state, const Vec3 &locationOnBodyB, const Vec3 &velocityOnBodyB, const Vec3 &accelerationOnBodyB, const MobilizedBody &inBodyA) const 
TODO: not implemented yet – any volunteers? Return the velocity of a point P moving (and possibly accelerating) on body B, in body A's frame, expressed in body A. More...  
Real  calcMovingPointToPointDistanceTimeDerivative (const State &state, const Vec3 &locationOnBodyB, const Vec3 &velocityOnBodyB, const MobilizedBody &bodyA, const Vec3 &locationOnBodyA, const Vec3 &velocityOnBodyA) const 
TODO: not implemented yet – any volunteers? Calculate the time rate of change of distance from a moving point PB on body B to a moving point PA on body A. More...  
Real  calcMovingPointToPointDistance2ndTimeDerivative (const State &state, const Vec3 &locationOnBodyB, const Vec3 &velocityOnBodyB, const Vec3 &accelerationOnBodyB, const MobilizedBody &bodyA, const Vec3 &locationOnBodyA, const Vec3 &velocityOnBodyA, const Vec3 &accelerationOnBodyA) const 
TODO: not implemented yet – any volunteers? Calculate the second time derivative of distance from a moving point PB on body B to a moving point PA on body A. More...  
const Body &  getBody () const 
Return a const reference to the Body contained within this MobilizedBody. More...  
Body &  updBody () 
Return a writable reference to the Body contained within this MobilizedBody. More...  
MobilizedBody &  setBody (const Body &) 
Replace the Body contained within this MobilizedBody with a new one. More...  
int  addBodyDecoration (const Transform &X_BD, const DecorativeGeometry &geometry) 
Convenience method to add DecorativeGeometry specified relative to the new (outboard) body's reference frame B. More...  
int  addBodyDecoration (const DecorativeGeometry &geometry) 
Convenience method for use when the geometry is supplied in the body frame. More...  
int  addOutboardDecoration (const Transform &X_MD, const DecorativeGeometry &geometry) 
Add decorative geometry specified relative to the outboard mobilizer frame M attached to body B, and associated with the mobilizer rather than the body. More...  
int  getNumOutboardDecorations () const 
Return the count of decorations added with addOutboardDecoration(). More...  
const DecorativeGeometry &  getOutboardDecoration (int i) const 
Return a const reference to the i'th outboard decoration. More...  
DecorativeGeometry &  updOutboardDecoration (int i) 
Return a writable reference to the i'th outboard decoration. More...  
int  addInboardDecoration (const Transform &X_FD, const DecorativeGeometry &geometry) 
Add decorative geometry specified relative to the inboard mobilizer frame F attached to the parent body P, and associated with the mobilizer rather than the body. More...  
int  getNumInboardDecorations () const 
Return the count of decorations added with addInboardDecoration(). More...  
const DecorativeGeometry &  getInboardDecoration (int i) const 
Return a const reference to the i'th inboard decoration. More...  
DecorativeGeometry &  updInboardDecoration (int i) 
Return a writable reference to the i'th inboard decoration. More...  
MobilizedBody &  setDefaultMassProperties (const MassProperties &m) 
If the contained Body can have its mass properties set to the supplied value m its mass properties are changed, otherwise the method fails. More...  
const MassProperties &  getDefaultMassProperties () const 
Return the mass properties of the Body stored within this MobilizedBody. More...  
void  adoptMotion (Motion &ownerHandle) 
Provide a unique Motion object for this MobilizedBody. More...  
void  clearMotion () 
If there is a Motion object associated with this MobilizedBody it is removed; otherwise, nothing happens. More...  
bool  hasMotion () const 
Check whether this MobilizedBody has an associated Motion object. More...  
const Motion &  getMotion () const 
If there is a Motion object associated with this MobilizedBody, this returns a const reference to it. More...  
MobilizedBody &  setDefaultInboardFrame (const Transform &X_PF) 
Change this mobilizer's frame F on the parent body P. More...  
MobilizedBody &  setDefaultOutboardFrame (const Transform &X_BM) 
Change this mobilizer's frame M fixed on this (the outboard) body B. More...  
const Transform &  getDefaultInboardFrame () const 
Return a reference to this mobilizer's default for the frame F fixed on the parent (inboard) body P, as the fixed Transform from P's body frame to the frame F fixed to P. More...  
const Transform &  getDefaultOutboardFrame () const 
Return a reference to this MobilizedBody's default for mobilizer frame M, as the fixed Transform from this body B's frame to the frame M fixed on B. More...  
operator MobilizedBodyIndex () const  
This is an implicit conversion from MobilizedBody to MobilizedBodyIndex when needed. More...  
MobilizedBodyIndex  getMobilizedBodyIndex () const 
Return the MobilizedBodyIndex of this MobilizedBody within the owning SimbodyMatterSubsystem. More...  
const MobilizedBody &  getParentMobilizedBody () const 
Return a reference to the MobilizedBody serving as the parent body of the current MobilizedBody. More...  
const MobilizedBody &  getBaseMobilizedBody () const 
Return a reference to this MobilizedBody's oldest ancestor other than Ground, or return Ground if this MobilizedBody is Ground. More...  
const SimbodyMatterSubsystem &  getMatterSubsystem () const 
Obtain a reference to the SimbodyMatterSubsystem which contains this MobilizedBody. More...  
SimbodyMatterSubsystem &  updMatterSubsystem () 
Obtain a writable reference to the SimbodyMatterSubsystem which contains this MobilizedBody. More...  
bool  isInSubsystem () const 
Determine whether the current MobilizedBody object is owned by a matter subsystem. More...  
bool  isInSameSubsystem (const MobilizedBody &mobod) const 
Determine whether a given MobilizedBody mobod is in the same matter subsystem as the current body. More...  
bool  isSameMobilizedBody (const MobilizedBody &mobod) const 
Determine whether a given MobilizedBody mobod is the same MobilizedBody as this one. More...  
bool  isGround () const 
Determine whether this MobilizedBody is Ground, meaning that it is actually body 0 of some matter subsytem, not just that its body type is Ground. More...  
int  getLevelInMultibodyTree () const 
Return this mobilized body's level in the tree of bodies, starting with Ground at 0, mobilized bodies directly connected to Ground at 1, mobilized bodies directly connected to those at 2, etc. More...  
MobilizedBody &  cloneForNewParent (MobilizedBody &parent) const 
Create a new MobilizedBody which is identical to this one, except that it has a different parent (and consequently might belong to a different MultibodySystem). More...  
Real  getOneFromQPartition (const State &state, int which, const Vector &qlike) const 
This utility selects one of the q's (generalized coordinates) associated with this mobilizer from a supplied "qlike" Vector, meaning a Vector which is the same length as the Vector of q's for the containing matter subsystem. More...  
Real &  updOneFromQPartition (const State &state, int which, Vector &qlike) const 
This utility returns a writable reference to one of the q's (generalized coordinates) associated with this mobilizer from a supplied "qlike" Vector, meaning a Vector which is the same length as the Vector of q's for the containing matter subsystem. More...  
Real  getOneFromUPartition (const State &state, int which, const Vector &ulike) const 
This utility selects one of the u's (generalized speeds) associated with this mobilizer from a supplied "ulike" Vector, meaning a Vector which is the same length as the Vector of u's for the containing matter subsystem. More...  
Real &  updOneFromUPartition (const State &state, int which, Vector &ulike) const 
This utility returns a writable reference to one of the u's (generalized speeds) associated with this mobilizer from a supplied "ulike" Vector, meaning a Vector which is the same length as the Vector of u's for the containing matter subsystem. More...  
void  applyOneMobilityForce (const State &state, int which, Real f, Vector &mobilityForces) const 
This utility adds in the supplied generalized force f (a scalar) to the appropriate slot of the supplied mobilityForces Vector, which is a "ulike" Vector. More...  
void  convertQForceToUForce (const State &state, const Array_< Real, MobilizerQIndex > &fq, Array_< Real, MobilizerUIndex > &fu) const 
Given a generalized force in the qspace of this mobilizer, convert it to the equivalent generalized mobility force (uspace force). More...  
void  applyBodyForce (const State &state, const SpatialVec &spatialForceInG, Vector_< SpatialVec > &bodyForcesInG) const 
This utility adds in the supplied spatial force spatialForceInG (consisting of a torque vector, and a force vector to be applied at the current body's origin) to the appropriate slot of the supplied bodyForcesInG Vector. More...  
void  applyBodyTorque (const State &state, const Vec3 &torqueInG, Vector_< SpatialVec > &bodyForcesInG) const 
This utility adds in the supplied pure torque torqueInG to the appropriate slot of the supplied bodyForcesInG Vector. More...  
void  applyForceToBodyPoint (const State &state, const Vec3 &pointInB, const Vec3 &forceInG, Vector_< SpatialVec > &bodyForcesInG) const 
This utility adds in the supplied force forceInG applied at a point pointInB to the appropriate slot of the supplied bodyForcesInG Vector. More...  
Public Member Functions inherited from SimTK::PIMPLHandle< MobilizedBody, MobilizedBodyImpl, true >  
bool  isEmptyHandle () const 
Returns true if this handle is empty, that is, does not refer to any implementation object. More...  
bool  isOwnerHandle () const 
Returns true if this handle is the owner of the implementation object to which it refers. More...  
bool  isSameHandle (const MobilizedBody &other) const 
Determine whether the supplied handle is the same object as "this" PIMPLHandle. More...  
void  disown (MobilizedBody &newOwner) 
Give up ownership of the implementation to an empty handle. More...  
PIMPLHandle &  referenceAssign (const MobilizedBody &source) 
"Copy" assignment but with shallow (pointer) semantics. More...  
PIMPLHandle &  copyAssign (const MobilizedBody &source) 
This is real copy assignment, with ordinary C++ object ("value") semantics. More...  
void  clearHandle () 
Make this an empty handle, deleting the implementation object if this handle is the owner of it. More...  
const MobilizedBodyImpl &  getImpl () const 
Get a const reference to the implementation associated with this Handle. More...  
MobilizedBodyImpl &  updImpl () 
Get a writable reference to the implementation associated with this Handle. More...  
int  getImplHandleCount () const 
Return the number of handles the implementation believes are referencing it. More...  
Additional Inherited Members  
Public Types inherited from SimTK::MobilizedBody  
enum  Direction { Forward = 0, Reverse = 1 } 
Constructors can take an argument of this type to indicate that the mobilizer is being defined in the reverse direction, meaning from the outboard (child) body to the inboard (parent) body. More...  
typedef Pin  Torsion 
Synonym for Pin mobilizer. More...  
typedef Pin  Revolute 
Synonym for Pin mobilizer. More...  
typedef Slider  Prismatic 
Synonym for Slider mobilizer. More...  
typedef Translation  Cartesian 
Synonym for Translation mobilizer. More...  
typedef Translation  CartesianCoords 
Synonym for Translation mobilizer. More...  
typedef BendStretch  PolarCoords 
Synonym for BendStretch mobilizer. More...  
typedef Ball  Orientation 
Synonym for Ball mobilizer. More...  
typedef Ball  Spherical 
Synonym for Ball mobilizer. More...  
Public Types inherited from SimTK::PIMPLHandle< MobilizedBody, MobilizedBodyImpl, true >  
typedef PIMPLHandle< MobilizedBody, MobilizedBodyImpl, PTR >  HandleBase 
typedef HandleBase  ParentHandle 
Protected Member Functions inherited from SimTK::PIMPLHandle< MobilizedBody, MobilizedBodyImpl, true >  
PIMPLHandle ()  
The default constructor makes this an empty handle. More...  
PIMPLHandle (MobilizedBodyImpl *p)  
This provides consruction of a handle referencing an existing implementation object. More...  
PIMPLHandle (const PIMPLHandle &source)  
The copy constructor makes either a deep (value) or shallow (reference) copy of the supplied source PIMPL object, based on whether this is a "pointer
semantics" (PTR=true) or "object (value) semantics" (PTR=false, default) class. More...  
~PIMPLHandle ()  
Note that the destructor is nonvirtual. More...  
PIMPLHandle &  operator= (const PIMPLHandle &source) 
Copy assignment makes the current handle either a deep (value) or shallow (reference) copy of the supplied source PIMPL object, based on whether this is a "pointer sematics" (PTR=true) or "object (value) semantics" (PTR=false, default) class. More...  
void  setImpl (MobilizedBodyImpl *p) 
Set the implementation for this empty handle. More...  
bool  hasSameImplementation (const MobilizedBody &other) const 
Determine whether the supplied handle is a reference to the same implementation object as is referenced by "this" PIMPLHandle. More...  
Related Functions inherited from SimTK::MobilizedBody  
typedef MobilizedBody  Mobod 
Mobod is the approved abbreviation for MobilizedBody. Feel free to use it if you get tired of typing or seeing the full name. More...  
Six mobilities – arbitrary relative motion modeled as xyz translation followed by an xyz bodyfixed Euler angle sequence, though with a singularity when the middle angle is +/ 90 degrees.
Use MobilizedBody::Free for a similar sixdof joint that is free of singularities.
The six generalized coordinates q are defined q={qx,qy,qz,px,py,pz} where the first three coordinates are the rotation angles and the last three are the Cartesian translations. Note that we follow the usual Simbody convention of having the rotational coordinates precede the translational ones; that does not imply any particular order of operations. In fact, as a sequence this mobilizer should be thought of as first translating the M frame by a vector p_FM=[px,py,pz] (expressed in F), then reorienting M about its new origin location using the rotation angles. In the reference configuration where q=0, the F and M frames are aligned and their origins coincident (Mo=Fo). The convention used here exactly matches the convention used by the force element Force::LinearBushing which infers an identical set of coordinates to express the relative pose of its two connected frames (also called F and M).
The first three generalized coordinates q should be interpreted as a series of rotation angles in radians: q[0]=qx is a rotation about the Mx (=Fx) axis, then q[1]=qy is a rotation about the nowrotated My axis, and then q[2]=qz is a rotation about the now twicerotated Mz axis. These rotations do not affect the location of M's origin point Mo. The generalized speeds u for the Bushing mobilizer are just the time derivatives of the generalized coordinates, that is, u=qdot={qxdot,qydot,qzdot,vx,vy,vz}, where qxdot=d/dt qx, etc. and v_FM=[vx,vy,vz]=d/dt p_FM is the velocity of Mo measured and expressed in frame F. Note that this is different than the choice of generalized speeds used for MobilizedBody::Free, where the angular velocity vector w_FM is used as the three rotational generalized speeds instead of Euler angle derivatives. (Euler angle derivatives are not the same as angular velocity, except when q=0.)
While this mobilizer provides arbitrary orientation, the Euler angle derivatives are singular when q[1] (qy, the middle rotation) is near +/ Pi/2. That means you should not attempt to do any dynamics in that configuration; if you can't be sure the motion will remain away from that region, you should use a MobilizedBody::Free instead, which uses quaternions to ensure singularityfree rotation.
Here is another way to describe the meaning of a Bushing mobilizer: except for the ordering of the generalized coordinates, a Bushing between frames F on parent body P and frame M on child body B is exactly equivalent to a translation (Cartesian) mobilizer between F and a massless body B0, followed by a series of three pin joints using two massless intermediate bodies B1 and B2. The first pin joint rotates about the common B0x(=Fx) and B1x axes. The second rotates about the common B1y and B2y axes. The last one rotates about the common B2z and Mz axes. Other than performance (which is somewhat better if you use the Bushing since there are fewer bodies), the translation+pins+intermediate bodies system generates exactly the same mobility as the Bushing, but with coordinates q={px,py,pz,qx,qy,qz} (flipped from the Bushing coordinate ordering).

inline 
Construct an empty handle that can be assigned to reference any MobilizedBody::Bushing.
SimTK::MobilizedBody::Bushing::Bushing  (  MobilizedBody &  parent, 
const Transform &  X_PF,  
const Body &  bodyInfo,  
const Transform &  X_BM,  
Direction  = Forward 

) 
Create a Bushing mobilizer between an existing parent (inboard) body P and a new child (outboard) body B created by copying the given bodyInfo into a privatelyowned Body within the constructed MobilizedBody object.
Specify the mobilizer frames F fixed to parent P and M fixed to child B.
SimTK::MobilizedBody::Bushing::Bushing  (  MobilizedBody &  parent, 
const Body &  bodyInfo,  
Direction  = Forward 

) 
Abbreviated constructor you can use if the mobilizer frames are coincident with the parent and child body frames.
Change the default inboard ("fixed") frame F on the parent body of this mobilizer.
The supplied frame is given as a Transform from the parent body's frame P and replaces the F frame specified in the constructor. This is a topological change, meaning that you must call realizeTopology() again if you call this method.
Change the default outboard ("moving") frame M on this mobilized body (that is, on this mobilizer's child body).
The supplied frame is given as a Transform from the child body's frame B and replaces the M frame specified in the constructor. This is a topological change, meaning that you must call realizeTopology() again if you use this method.
Override the default pose for this mobilizer.
Normally the default is q=0, meaning that the F and M frames are aligned. Here you can provide a Transform giving the default pose of the mobilizer's M frame in the parent body's F frame. The given orientation will be converted to a body fixed xyz Euler sequence; the given position vector will be used directly. Those six values will be used to set the default values for the generalized coordinates q that will appear in a State that has just been created by a realizeTopology() call. This is a topological change, meaning that you must call realizeTopology() again if you use this method.

inline 
Return the default pose for this mobilizer as a Transform.
See setDefaultTransform() for more information.

inline 
Add DecorativeGeometry to the privatelyowned Body contained in this MobilizedBody, positioned relative to the body's frame.

inline 
Add DecorativeGeometry to the privatelyowned Body contained in this MobilizedBody, positioned relative to the mobilizer's M frame on that body.

inline 
Add DecorativeGeometry to the parent (inboard) body of this mobilizer, positioned relative to the mobilizer's F frame on the parent body.
const Vec6& SimTK::MobilizedBody::Bushing::getDefaultQ  (  )  const 
Obtain the default value for the generalized coordinates q that has been set for this mobilizer.
The value is returned as a Vec6 but note that the rotational part (first three elements) of the returned quantity is not a vector; it is a body fixed xyz Euler angle sequence in radians. The last three elements are a position vector p_FM. The default is q=0 unless overridden.
Set the default value for the generalized coordinates q for this mobilizer.
The value is given as a Vec6 but note that the supplied quantity is not a pair of vectors; it is a body fixed xyz Euler angle sequence in radians, followed by a position vector in the last three elements. The default is q=0 unless overridden.
Obtain the current value for this mobilizer's generalized coordinates q from the given State, which must be realized through Stage::Model (these are state variables).
Obtain the current value for this mobilizer's generalized coordinate time derivatives qdot from the given State, which must be realized through Stage::Velocity.
These are the three Euler angle time derivatives followed by the three measure numbers of the velocity vector v_FM giving the velocity of M's origin Mo taken in the F frame. For the Bushing mobilizer, qdot has the same numerical values as the generalized speeds u, but unlike u, qdot is not a state variable.
Obtain the current value for this mobilizer's generalized coordinate second time derivatives qdotdot from the given State, which must be realized through Stage::Acceleration.
These are Euler angle second time derivatives followed by the three measure numbers of the vector a_FM giving the acceleration of M's origin Mo taken in the F frame. For the Bushing mobilizer, qdotdot=udot.
Obtain the current value for this mobilizer's generalized speeds u from the given State, which must be realized through Stage::Model (these are state variables).
For the Bushing joint, these are the time derivatives of q, that is, u=qdot.
Obtain the current value for this mobilizer's generalized accelerations udot (=d/dt u) from the given State, which must be realized through Stage::Acceleration.
For the Bushing joint, these are the time derivatives of qdot, that is, udot=qdotdot.
Set new values for this mobilizer's generalized coordinates q in the given state.
This invalidates Stage::Position and above. The new value is given as a Vec6, but is interpreted as a body fixed xyz Euler angle sequence in radians, followed by the three measure numbers of the position vector p_FM giving the location of the M frame origin Mo measured from and expressed in the F frame.
Set new values for this mobilizer's generalized speeds u in the given state.
This invalidates Stage::Velocity and above. The new value is given as a Vec6, but is interpreted as the time derivatives of a body fixed xyz Euler angle sequence in radians/time (not an angular velocity!), followed by the three measure numbers of the velocity vector v_FM giving the velocity of the M frame origin Mo measured and expressed in the F frame. For the Bushing mobilizer, these are just the time derivatives of the generalized coordinates q, that is, u=qdot.
const Vec6& SimTK::MobilizedBody::Bushing::getMyPartQ  (  const State &  state, 
const Vector &  qlike  
)  const 
Given a vector in the System's generalized coordinate basis, extract the six q's belonging to this mobilizer.
const Vec6& SimTK::MobilizedBody::Bushing::getMyPartU  (  const State &  state, 
const Vector &  ulike  
)  const 
Given a vector in the System's generalized speed basis, extract the six u's belonging to this mobilizer.
Given a writable vector in the System's generalized coordinate basis, extract a writable reference to the six q's in that vector that belong to this mobilizer.
Given a writable vector in the System's generalized speed basis, extract a writable reference to the six u's in that vector that belong to this mobilizer.