Simbody
3.7

These utility functions are used for manipulation of spatial quantities that are contained in SpatialVec or SpatialMat objects. More...
Typedefs  
typedef Vec< 2, Vec3 >  SimTK::SpatialVec 
Spatial vectors are used for (rotation,translation) quantities and consist of a pair of Vec3 objects, arranged as a 2vector of 3vectors. More...  
typedef Row< 2, Row3 >  SimTK::SpatialRow 
This is the type of a transposed SpatialVec; it does not usually appear explicitly in user programs. More...  
typedef Mat< 2, 2, Mat33 >  SimTK::SpatialMat 
Spatial matrices are used to hold 6x6 matrices that are best viewed as 2x2 matrices of 3x3 matrices; most commonly for spatial and articulated body inertias and spatial shift matrices. More...  
Functions  
SpatialVec  SimTK::findRelativeVelocity (const Transform &X_FA, const SpatialVec &V_FA, const Transform &X_FB, const SpatialVec &V_FB) 
Find the relative spatial velocity between two frames A and B whose individual spatial velocities are known with respect to a third frame F, with the result returned in A. More...  
SpatialVec  SimTK::findRelativeVelocityInF (const Vec3 &p_AB_F, const SpatialVec &V_FA, const SpatialVec &V_FB) 
Find the relative spatial velocity between two frames A and B whose individual spatial velocities are known in a third frame F, but leave the result in F. More...  
SpatialVec  SimTK::findRelativeAcceleration (const Transform &X_FA, const SpatialVec &V_FA, const SpatialVec &A_FA, const Transform &X_FB, const SpatialVec &V_FB, const SpatialVec &A_FB) 
Find the relative spatial acceleration between two frames A and B whose individual spatial accelerations are known with respect to a third frame F, with the result returned in A. More...  
SpatialVec  SimTK::findRelativeAccelerationInF (const Vec3 &p_AB_F, const SpatialVec &V_FA, const SpatialVec &A_FA, const SpatialVec &V_FB, const SpatialVec &A_FB) 
Find the relative spatial acceleration between two frames A and B whose individual spatial acceleration are known in a third frame F, but leave the result in F. More...  
SpatialVec  SimTK::reverseRelativeVelocity (const Transform &X_AB, const SpatialVec &V_AB) 
Given the relative velocity of frame B in frame A, reverse that to give the relative velocity of frame A in B. More...  
SpatialVec  SimTK::reverseRelativeVelocityInA (const Transform &X_AB, const SpatialVec &V_AB) 
Given the relative velocity of frame B in frame A, reverse that to give the relative velocity of frame A in B, but leave the result expressed in frame A. More...  
SpatialVec  SimTK::shiftVelocityBy (const SpatialVec &V_AB, const Vec3 &r_A) 
Shift a relative spatial velocity measured at some point to that same relative spatial quantity but measured at a new point given by an offset from the old one. More...  
SpatialVec  SimTK::shiftVelocityFromTo (const SpatialVec &V_A_BP, const Vec3 &fromP_A, const Vec3 &toQ_A) 
Shift a relative spatial velocity measured at some point P to that same relative spatial quantity but measured at a new point Q given the points P and Q. More...  
SpatialVec  SimTK::shiftForceBy (const SpatialVec &F_AP, const Vec3 &r_A) 
Shift a spatial force applied at some point of a body to that same spatial force applied at a new point given by an offset from the old one. More...  
SpatialVec  SimTK::shiftForceFromTo (const SpatialVec &F_AP, const Vec3 &fromP_A, const Vec3 &toQ_A) 
Shift a spatial force applied at some point P of a body to that same spatial force applied at a new point Q, given P and Q. More...  
SpatialVec  SimTK::shiftAccelerationBy (const SpatialVec &A_AB, const Vec3 &w_AB, const Vec3 &r_A) 
Shift a relative spatial acceleration measured at some point to that same relative spatial quantity but measured at a new point given by an offset from the old one. More...  
SpatialVec  SimTK::shiftAccelerationFromTo (const SpatialVec &A_A_BP, const Vec3 &w_AB, const Vec3 &fromP_A, const Vec3 &toQ_A) 
Shift a relative spatial acceleration measured at some point P to that same relative spatial quantity but measured at a new point Q given the points P and Q. More...  
These utility functions are used for manipulation of spatial quantities that are contained in SpatialVec or SpatialMat objects.
These are intended for expert use and are mostly used in the implemention of friendlier methods such as those in MobilizedBody that are used to obtain various spatial quantities.
Spatial vectors are used for combined (rotational,translational) quantities. These include
spatial velocity = (angularVelocity,linearVelocity) spatial acceleration = (angularAcceleration,linearAcceleration) spatial force = (moment,force)
Spatial configuration (pose) has to be handled differently though since orientation is not a vector quantity. We use the Transform class for this concept, which includes an orientation matrix and a translation vector.
typedef Vec< 2, Vec3 > SimTK::SpatialVec 
Spatial vectors are used for (rotation,translation) quantities and consist of a pair of Vec3 objects, arranged as a 2vector of 3vectors.
SpatialVec[0] is the rotational component; [1] is translational.
Quantities represented this way include
Spatial configuration has to be handled differently though since orientation is not a vector quantity. (We use Transform for this concept which includes a Rotation matrix and a translation Vec3.)
typedef Row< 2, Row3 > SimTK::SpatialRow 
This is the type of a transposed SpatialVec; it does not usually appear explicitly in user programs.
This is the type of a transposed SpatialVec.
typedef Mat< 2, 2, Mat33 > SimTK::SpatialMat 
Spatial matrices are used to hold 6x6 matrices that are best viewed as 2x2 matrices of 3x3 matrices; most commonly for spatial and articulated body inertias and spatial shift matrices.
This is used for primarily for spatial mass properties.
They also arise commonly as intermediates in computations involving SpatialVec objects.

inline 
Find the relative spatial velocity between two frames A and B whose individual spatial velocities are known with respect to a third frame F, with the result returned in A.
[in]  X_FA  The pose of frame A measured and expressed in frame F. 
[in]  V_FA  The spatial velocity of frame A measured and expressed in frame F. 
[in]  X_FB  The pose of frame B measured and expressed in frame F. 
[in]  V_FB  The spatial velocity of frame B measured and expressed in frame F. 
Given the spatial velocity V_FA of frame A in a reference frame F, and the spatial velocity V_FB of frame B in F, and transforms giving the poses of frames A and B in F, calculate the relative velocity V_AB of frame B in frame A, measured and expressed in A. Typical usage:
Cost is 51 flops.

inline 
Find the relative spatial velocity between two frames A and B whose individual spatial velocities are known in a third frame F, but leave the result in F.
[in]  p_AB_F  The vector from the A frame origin OA to the B frame origin OB, but expressed in frame F. 
[in]  V_FA  The spatial velocity of frame A measured and expressed in frame F. 
[in]  V_FB  The spatial velocity of frame B measured and expressed in frame F. 
Typically the relative velocity of B in A would be returned in A; most users will want to use findRelativeVelocity() instead which returns the result in A. Use of this method saves the substantial cost of reexpressing the result, so is useful in the rare case that you don't want the final result in A. Example:
Cost is 18 flops.

inline 
Find the relative spatial acceleration between two frames A and B whose individual spatial accelerations are known with respect to a third frame F, with the result returned in A.
[in]  X_FA  The pose of frame A measured and expressed in frame F. 
[in]  V_FA  The spatial velocity of frame A measured and expressed in frame F. 
[in]  A_FA  The spatial acceleration of frame A measured and expressed in frame F. 
[in]  X_FB  The pose of frame B measured and expressed in frame F. 
[in]  V_FB  The spatial velocity of frame B measured and expressed in frame F. 
[in]  A_FB  The spatial acceleration of frame B measured and expressed in frame F. 
Given the spatial acceleration A_FA of frame A in a reference frame F, and the spatial acceleration A_FB of frame B in F, and corresonding pose and velocity information, calculate the relative acceleration A_AB of frame B in frame A, measured and expressed in A. Typical usage:
Cost is 105 flops.

inline 
Find the relative spatial acceleration between two frames A and B whose individual spatial acceleration are known in a third frame F, but leave the result in F.
[in]  p_AB_F  The vector from the A frame origin OA to the B frame origin OB, but expressed in frame F. 
[in]  V_FA  The spatial velocity of frame A measured and expressed in frame F. 
[in]  A_FA  The spatial acceleration of frame A measured and expressed in frame F. 
[in]  V_FB  The spatial velocity of frame B measured and expressed in frame F. 
[in]  A_FB  The spatial acceleration of frame B measured and expressed in frame F. 
Typically the relative acceleration of B in A would be returned in A; most users will want to use findRelativeAcceleration() instead which returns the result in A. Use of this method saves the substantial cost of reexpressing the result, so is useful in the rare case that you don't want the final result in A. Example:
Cost is 72 flops.

inline 
Given the relative velocity of frame B in frame A, reverse that to give the relative velocity of frame A in B.
[in]  X_AB  The pose of frame B in frame A, measured and expressed in A. 
[in]  V_AB  The relative spatial velocity of frame B in frame A, measured and expressed in frame A. 
The input is expressed in the A frame; the result will be expressed in the B frame instead. If you prefer that the result remain in the A frame you should call reverseRelativeVelocityInA() instead to avoid the extra cost of changing frames. Example:
Cost is 51 flops.

inline 
Given the relative velocity of frame B in frame A, reverse that to give the relative velocity of frame A in B, but leave the result expressed in frame A.
[in]  X_AB  The pose of frame B in frame A, measured and expressed in A. 
[in]  V_AB  The relative spatial velocity of frame B in frame A, measured and expressed in frame A. 
The input V_AB is expressed in the A frame; you will almost always want the output V_BA expressed in the B frame which is what the function reverseRelativeVelocity() does. However, if you're going to want it in some other frame ultimately you may prefer to avoid the substantial cost of reexpressing it in B now, in which case this routine is useful.
See reverseRelativeVelocity() for more information about what this does. Example:
Cost is 21 flops.

inline 
Shift a relative spatial velocity measured at some point to that same relative spatial quantity but measured at a new point given by an offset from the old one.
[in]  V_AB  The relative spatial velocity of frame B in frame A, measured and expressed in frame A. 
[in]  r_A  The vector offset, expressed in frame A, by which to change the point at which the translational component of the relative spatial velocity is measured. 
Given the spatial velocity V_AB of frame B in A, measured at a point coincident with B's origin Bo, change it to the spatial velocity V_A_BQ representing the same relationship but with the velocity measured at a new point Q=Bo+r for some position vector r. All vectors are measured and expressed in frame A, including the vector r. Example:
Cost is 12 flops.

inline 
Shift a relative spatial velocity measured at some point P to that same relative spatial quantity but measured at a new point Q given the points P and Q.
[in]  V_A_BP  The relative spatial velocity of frame B in frame A, measured and expressed in frame A, with the linear component measured at a point P. 
[in]  fromP_A  The "from" point P at which the input linear velocity was measured, given as a vector from A's origin OA to the point P, expressed in A. 
[in]  toQ_A  The "to" point Q at which we want to remeasure the linear velocity, given as a vector from A's origin OA to the point Q, expressed in A. 
Given the spatial velocity V_A_BP of frame B in A, measured at a point P, change it to the spatial velocity V_A_BQ representing the same relationship but with the velocity measured at a new point Q. Example:
Cost is 15 flops.

inline 
Shift a spatial force applied at some point of a body to that same spatial force applied at a new point given by an offset from the old one.
[in]  F_AP  A spatial force (moment and linear force), expressed in the A frame, whose translational component is applied at a point P. 
[in]  r_A  The vector offset, expressed in frame A, by which to change the point at which the translational component of the input force is to be applied. 
Given the spatial force F_AP including a pure moment m and a force vector f applied at a point P, return the equivalent force F_AQ representing the same physical quantity but as though the force were applied at a point Q=P+r for some position vector r. All vectors are expressed in frame A. Example:
Cost is 12 flops.

inline 
Shift a spatial force applied at some point P of a body to that same spatial force applied at a new point Q, given P and Q.
[in]  F_AP  A spatial force (moment and linear force), expressed in the A frame, whose translational component is applied at a point P. 
[in]  fromP_A  The "from" point P at which the input force is applied, given as a vector from A's origin OA to the point P, expressed in A. 
[in]  toQ_A  The "to" point Q to which we want to move the force application point, given as a vector from A's origin OA to the point Q, expressed in A. 
Given the spatial force F_AP including a pure moment m and a force vector f applied at a point P, return the equivalent force F_AQ representing the same physical quantity but as though the force were applied at a new point Q. All vectors are expressed in frame A and points are measured from A's origin OA. Example:
Cost is 15 flops.

inline 
Shift a relative spatial acceleration measured at some point to that same relative spatial quantity but measured at a new point given by an offset from the old one.
[in]  A_AB  The relative spatial acceleration of frame B in frame A, measured and expressed in frame A. 
[in]  w_AB  The relative angular velocity of frame B in frame A, expressed in frame A. 
[in]  r_A  The vector offset, expressed in frame A, by which to change the point at which the translational component of the relative spatial acceleration is measured. 
Given the spatial acceleration A_AB and angular velocity w_AB of frame B in A, measured at a point coincident with B's origin Bo, change it to the spatial acceleration A_A_BQ representing the same relationship but with the acceleration measured at a new point Q=Bo+r for some position vector r. All vectors are measured and expressed in frame A, including the vector r. Example:
Cost is 33 flops.

inline 
Shift a relative spatial acceleration measured at some point P to that same relative spatial quantity but measured at a new point Q given the points P and Q.
[in]  A_A_BP  The relative spatial acceleration of frame B in frame A, measured and expressed in frame A, with the linear component measured at a point P. 
[in]  w_AB  The relative angular velocity of frame B in frame A, expressed in frame A. 
[in]  fromP_A  The "from" point P at which the input linear acceleration was measured, given as a vector from A's origin Ao to the point P, expressed in A. 
[in]  toQ_A  The "to" point Q at which we want to remeasure the linear acceleration, given as a vector from A's origin Ao to the point Q, expressed in A. 
Given the spatial acceleration A_A_BP of frame B in A, measured at a point P, change it to the spatial acceleration A_A_BQ representing the same relationship but with the acceleration measured at a new point Q. Example:
Cost is 36 flops.