Simbody
3.4 (development)
|
This is a subclass of MobilizedBody::Custom which uses a set of Function objects to define the behavior of the MobilizedBody. More...
#include <MobilizedBody_FunctionBased.h>
Public Member Functions | |
FunctionBased () | |
Default constructor provides an empty handle that can be assigned to reference any MobilizedBody::FunctionBased. | |
FunctionBased (MobilizedBody &parent, const Body &bodyInfo, int nmobilities, const Array_< const Function * > &functions, const Array_< Array_< int > > &coordIndices, Direction direction=Forward) | |
Create a FunctionBased MobilizedBody. | |
FunctionBased (MobilizedBody &parent, const Body &bodyInfo, int nmobilities, const std::vector< const Function * > &functions, const std::vector< std::vector< int > > &coordIndices, Direction direction=Forward) | |
For compatibility with std::vector. | |
FunctionBased (MobilizedBody &parent, const Transform &X_PF, const Body &bodyInfo, const Transform &X_BM, int nmobilities, const Array_< const Function * > &functions, const Array_< Array_< int > > &coordIndices, Direction direction=Forward) | |
Create a FunctionBased MobilizedBody. | |
FunctionBased (MobilizedBody &parent, const Transform &X_PF, const Body &bodyInfo, const Transform &X_BM, int nmobilities, const std::vector< const Function * > &functions, const std::vector< std::vector< int > > &coordIndices, Direction direction=Forward) | |
For compatibility with std::vector. | |
FunctionBased (MobilizedBody &parent, const Body &bodyInfo, int nmobilities, const Array_< const Function * > &functions, const Array_< Array_< int > > &coordIndices, const Array_< Vec3 > &axes, Direction direction=Forward) | |
Create a FunctionBased MobilizedBody. | |
FunctionBased (MobilizedBody &parent, const Body &bodyInfo, int nmobilities, const std::vector< const Function * > &functions, const std::vector< std::vector< int > > &coordIndices, const std::vector< Vec3 > &axes, Direction direction=Forward) | |
For compatibility with std::vector. | |
FunctionBased (MobilizedBody &parent, const Transform &X_PF, const Body &bodyInfo, const Transform &X_BM, int nmobilities, const Array_< const Function * > &functions, const Array_< Array_< int > > &coordIndices, const Array_< Vec3 > &axes, Direction direction=Forward) | |
Create a FunctionBased MobilizedBody. | |
FunctionBased (MobilizedBody &parent, const Transform &X_PF, const Body &bodyInfo, const Transform &X_BM, int nmobilities, const std::vector< const Function * > &functions, const std::vector< std::vector< int > > &coordIndices, const std::vector< Vec3 > &axes, Direction direction=Forward) | |
For compatibility with std::vector. |
This is a subclass of MobilizedBody::Custom which uses a set of Function objects to define the behavior of the MobilizedBody.
When you create it, you specify the number of generalized coordinates, and six Function objects which calculate the spatial rotations and translations based on those coordinates. It assumes there is a one to one correspondence between generalized coordinates and generalized speeds, so qdot == u.
Each of the Function objects must take some subset of the generalized coordinates as inputs, and produce a single number as its output. It also must support derivatives up to second order. Taken together, the six functions define a SpatialVec giving the body's mobilizer transform.
SimTK::MobilizedBody::FunctionBased::FunctionBased | ( | ) | [inline] |
Default constructor provides an empty handle that can be assigned to reference any MobilizedBody::FunctionBased.
SimTK::MobilizedBody::FunctionBased::FunctionBased | ( | MobilizedBody & | parent, |
const Body & | bodyInfo, | ||
int | nmobilities, | ||
const Array_< const Function * > & | functions, | ||
const Array_< Array_< int > > & | coordIndices, | ||
Direction | direction = Forward |
||
) |
Create a FunctionBased MobilizedBody.
parent | the MobilizedBody's parent body |
bodyInfo | describes this MobilizedBody's physical properties |
nmobilities | the number of generalized coordinates belonging to this MobilizedBody |
functions | the Functions describing how the body moves based on its generalized coordinates. This must be of length 6. The elements correspond to, in order, x rotation, y rotation, z rotation, x translation, y translation, and z translation. The MobilizedBody takes over ownership of the functions, and automatically deletes them when the MobilizedBody is deleted. |
coordIndices | the indices of the generalized coordinates that are inputs to each function. For example, if coordIndices[2] = {0, 1}, that means that functions[2] takes two input arguments, and q[0] and q[1] respectively should be passed as those arguments. |
direction | whether you want the coordinates defined as though parent & child were swapped |
SimTK::MobilizedBody::FunctionBased::FunctionBased | ( | MobilizedBody & | parent, |
const Body & | bodyInfo, | ||
int | nmobilities, | ||
const std::vector< const Function * > & | functions, | ||
const std::vector< std::vector< int > > & | coordIndices, | ||
Direction | direction = Forward |
||
) | [inline] |
For compatibility with std::vector.
SimTK::MobilizedBody::FunctionBased::FunctionBased | ( | MobilizedBody & | parent, |
const Transform & | X_PF, | ||
const Body & | bodyInfo, | ||
const Transform & | X_BM, | ||
int | nmobilities, | ||
const Array_< const Function * > & | functions, | ||
const Array_< Array_< int > > & | coordIndices, | ||
Direction | direction = Forward |
||
) |
Create a FunctionBased MobilizedBody.
parent | the MobilizedBody's parent body |
X_PF | the default inboard frame |
bodyInfo | describes this MobilizedBody's physical properties |
X_BM | the default outboard frame |
nmobilities | the number of generalized coordinates belonging to this MobilizedBody |
functions | the Functions describing how the body moves based on its generalized coordinates. This must be of length 6. The elements correspond to, in order, x rotation, y rotation, z rotation, x translation, y translation, and z translation. The MobilizedBody takes over ownership of the functions, and automatically deletes them when the MobilizedBody is deleted. |
coordIndices | the indices of the generalized coordinates that are inputs to each function. For example, if coordIndices[2] = {0, 1}, that means that functions[2] takes two input arguments, and q[0] and q[1] respectively should be passed as those arguments. |
direction | whether you want the coordinates defined as though parent & child were swapped |
SimTK::MobilizedBody::FunctionBased::FunctionBased | ( | MobilizedBody & | parent, |
const Transform & | X_PF, | ||
const Body & | bodyInfo, | ||
const Transform & | X_BM, | ||
int | nmobilities, | ||
const std::vector< const Function * > & | functions, | ||
const std::vector< std::vector< int > > & | coordIndices, | ||
Direction | direction = Forward |
||
) | [inline] |
For compatibility with std::vector.
SimTK::MobilizedBody::FunctionBased::FunctionBased | ( | MobilizedBody & | parent, |
const Body & | bodyInfo, | ||
int | nmobilities, | ||
const Array_< const Function * > & | functions, | ||
const Array_< Array_< int > > & | coordIndices, | ||
const Array_< Vec3 > & | axes, | ||
Direction | direction = Forward |
||
) |
Create a FunctionBased MobilizedBody.
parent | the MobilizedBody's parent body |
bodyInfo | describes this MobilizedBody's physical properties |
nmobilities | the number of generalized coordinates belonging to this MobilizedBody |
functions | the Functions describing how the body moves based on its generalized coordinates. This must be of length 6. The elements correspond to, in order, x rotation, y rotation, z rotation, x translation, y translation, and z translation. The MobilizedBody takes over ownership of the functions, and automatically deletes them when the MobilizedBody is deleted. |
coordIndices | the indices of the generalized coordinates that are inputs to each function. For example, if coordIndices[2] = {0, 1}, that means that functions[2] takes two input arguments, and q[0] and q[1] respectively should be passed as those arguments. |
axes | the axes directions (as Vec3's) for each spatial coordinate, which each function describes, and is therefore length 6. First 3 and last 3 axes must be linearly independent, otherwise there will be redundant speeds for the same motion. |
direction | whether you want the coordinates defined as though parent & child were swapped |
SimTK::MobilizedBody::FunctionBased::FunctionBased | ( | MobilizedBody & | parent, |
const Body & | bodyInfo, | ||
int | nmobilities, | ||
const std::vector< const Function * > & | functions, | ||
const std::vector< std::vector< int > > & | coordIndices, | ||
const std::vector< Vec3 > & | axes, | ||
Direction | direction = Forward |
||
) | [inline] |
For compatibility with std::vector.
SimTK::MobilizedBody::FunctionBased::FunctionBased | ( | MobilizedBody & | parent, |
const Transform & | X_PF, | ||
const Body & | bodyInfo, | ||
const Transform & | X_BM, | ||
int | nmobilities, | ||
const Array_< const Function * > & | functions, | ||
const Array_< Array_< int > > & | coordIndices, | ||
const Array_< Vec3 > & | axes, | ||
Direction | direction = Forward |
||
) |
Create a FunctionBased MobilizedBody.
parent | the MobilizedBody's parent body |
X_PF | the default inboard frame |
bodyInfo | describes this MobilizedBody's physical properties |
X_BM | the default outboard frame |
nmobilities | the number of generalized coordinates belonging to this MobilizedBody |
functions | the Functions describing how the body moves based on its generalized coordinates. This must be of length 6. The elements correspond to, in order, x rotation, y rotation, z rotation, x translation, y translation, and z translation. The MobilizedBody takes over ownership of the functions, and automatically deletes them when the MobilizedBody is deleted. |
coordIndices | the indices of the generalized coordinates that are inputs to each function. For example, if coordIndices[2] = {0, 1}, that means that functions[2] takes two input arguments, and q[0] and q[1] respectively should be passed as those arguments. |
axes | the axes directions (as Vec3's) for each spatial coordinate, which each function describes, and is therefore length 6. First 3 and last 3 axes must be linearly independent, otherwise there will be redundant speeds for the same motion. |
direction | whether you want the coordinates defined as though parent & child were swapped |
SimTK::MobilizedBody::FunctionBased::FunctionBased | ( | MobilizedBody & | parent, |
const Transform & | X_PF, | ||
const Body & | bodyInfo, | ||
const Transform & | X_BM, | ||
int | nmobilities, | ||
const std::vector< const Function * > & | functions, | ||
const std::vector< std::vector< int > > & | coordIndices, | ||
const std::vector< Vec3 > & | axes, | ||
Direction | direction = Forward |
||
) | [inline] |
For compatibility with std::vector.