Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

rdMimic Class Reference

A wrapper class that implements many of the methods in rdModel by interfacing with SDFast. More...

#include <rdMimic.h>

Inheritance diagram for rdMimic:

rdModel List of all members.

Public Member Functions

 rdMimic ()
 Mimic model.

virtual ~rdMimic ()
 Destructor.

virtual void setGravity (double aGrav[3])
 Set the gravity.

virtual void getGravity (double rGrav[3]) const
 Get the gravity.

virtual void setConfiguration (const double aQ[], const double aU[])
 Set the configuration of the model.

virtual void setConfiguration (const double aY[])
 Set the configuration of the model.

virtual int getGroundID () const
 Get the body ID of the ground (or inertial) frame.

virtual double getMass (int aBody) const
 Get the mass of a body.

virtual int getInertiaBodyLocal (int aBody, double rI[3][3]) const
 Get the scalar inertia matrix of a body.

virtual int getInertiaBodyLocal (int aBody, double *rI) const
 Get the scalar inertia matrix of a body.

virtual void getSystemInertia (double *rM, double rCOM[3], double rI[3][3]) const
 Get the mass, center of mass, and inertia tensor of the whole model.

virtual void getSystemInertia (double *rM, double *rCOM, double *rI) const
 Get the mass, center of mass, and inertia tensor of the whole model.

virtual void getPosition (int aBody, const double aPoint[3], double rPos[3]) const
 Get the inertial position of a point on a body.

virtual void getVelocity (int aBody, const double aPoint[3], double rVel[3]) const
 Get the inertial velocity of a point on a body.

virtual void getAcceleration (int aBody, const double aPoint[3], double rAcc[3]) const
 Get the inertial acceleration of a point on a body.

virtual void getDirectionCosines (int aBody, double rDirCos[3][3]) const
 Get the body orientation with respect to the ground.

virtual void getDirectionCosines (int aBody, double *rDirCos) const
 Get the body orientation with respect to the ground.

virtual void getAngularVelocity (int aBody, double rAngVel[3]) const
 Get the inertial angular velocity of a body in the ground reference frame.

virtual void getAngularVelocityBodyLocal (int aBody, double rAngVel[3]) const
 Get the inertial angular velocity in the local body reference frame.

virtual void getAngularAcceleration (int aBody, double rAngAcc[3]) const
 Get the inertial angular acceleration of a body in the ground reference frame.

virtual void getAngularAccelerationBodyLocal (int aBody, double rAngAcc[3]) const
 Get the inertial angular acceleration in the local body reference frame.

virtual void applyForce (int aBody, const double aPoint[3], const double aForce[3])
 Apply a force expressed in the inertial frame to a point on a body.

virtual void applyForces (int aN, const int aBodies[], const double aPoints[][3], const double aForces[][3])
 Apply a set of forces expressed in the inertial frame to a set of bodies.

virtual void applyForces (int aN, const int aBodies[], const double *aPoints, const double *aForces)
 Apply forces expressed in the inertial frame to points bodies.

virtual void applyForceBodyLocal (int aBody, const double aPoint[3], const double aForce[3])
 Apply a force expressed in the body-local frame to a point on a body.

virtual void applyForcesBodyLocal (int aN, const int aBodies[], const double aPoints[][3], const double aForces[][3])
 Apply a set of forces to a set of bodies.

virtual void applyForcesBodyLocal (int aN, const int aBodies[], const double *aPoints, const double *aForces)
 Apply a set of forces to a set of bodies.

virtual void applyTorque (int aBody, const double aTorque[3])
 Apply a torque expressed in the inertial frame to a body.

virtual void applyTorques (int aN, const int aBodies[], const double aTorques[][3])
 Apply a set of torques expressed in the inertial frame to a set of bodies.

virtual void applyTorques (int aN, const int aBodies[], const double *aTorques)
 Apply a set of torques expressed in the inertial frame to a set of bodies.

virtual void applyTorqueBodyLocal (int aBody, const double aTorque[3])
 Apply a torque expressed in the body-local frame to a body.

virtual void applyTorquesBodyLocal (int aN, const int aBodies[], const double aTorques[][3])
 Apply a set of torques expressed in the body-local frame to a set of bodies.

virtual void applyTorquesBodyLocal (int aN, const int aBodies[], const double *aTorques)
 Apply a set of torques expressed in the body-local frame to a set of bodies.

virtual void applyGeneralizedForce (int aU, double aF)
 Apply a generalized force to a generalized coordinate.

virtual void applyGeneralizedForces (const double aF[])
 Apply generalized forces.

virtual void applyGeneralizedForces (int aN, const int aU[], const double aF[])
 Apply generalized forces.

virtual double getNetAppliedGeneralizedForce (int aU) const
 Get the net applied generalized force.

virtual void computeGeneralizedForces (double aDUDT[], double rF[]) const
 Compute the generalized forces necessary to achieve a set of specified accelerations.

virtual int computeAccelerations (double *dqdt, double *dudt)
 Compute the derivatives of the states.

virtual void formMassMatrix (double *rI)
 Form the system mass matrix.

virtual void formEulerTransform (int aBody, double *rE) const
 Form the transformation matrix E[3][3] that can be used to express the angular velocity of a body in terms of the time derivatives of the euler angles.

virtual void formJacobianTranslation (int aBody, const double aBodyPoint[3], double *rJ, int aRefBody=-1) const
 Form the full Jacobian matrix (J) for the translation of a point on a body.

virtual void formJacobianOrientation (int aBody, double *rJ0, int aRefBody=-1) const
 Form the full Jacobian matrix (J0) for the orientation of a body.

virtual void formJacobianEuler (int aBody, double *rJE, int aRefBody=-1) const
 Form the full Jacobian matrix (JE) for the orientation of a body expressed in terms of Euler angles.

virtual void transform (int aBody1, const double aVec1[3], int aBody2, double rVec2[3]) const
 Transform a vector from one frame to another.

virtual void convertQuaternionsToAngles (double *q, double *qang) const
 Convert quaterions to angles.

virtual void convertAnglesToQuaternions (double *qang, double *q) const
 Convert angles to quaterions.

virtual void convertRadiansToDegrees (double *aQRad, double *aQDeg) const
 Convert the rotational generalized coordinates or speeds from units of radians to units of degrees.

virtual void convertDegreesToRadians (double *aQDeg, double *aQRad) const
 Convert the rotational generalized coordinates or speeds from units of degrees to units of radiants.

virtual void convertAnglesToDirectionCosines (double aE1, double aE2, double aE3, double rDirCos[3][3]) const
 Convert angles to direction cosines.

virtual void convertAnglesToDirectionCosines (double aE1, double aE2, double aE3, double *rDirCos) const
 Convert angles to direction cosines.

virtual void convertDirectionCosinesToAngles (double aDirCos[3][3], double *rE1, double *rE2, double *rE3) const
 Convert direction cosines to angles.

virtual void convertDirectionCosinesToAngles (double *aDirCos, double *rE1, double *rE2, double *rE3) const
 Convert direction cosines to angles.

virtual void convertDirectionCosinesToQuaternions (double aDirCos[3][3], double *rQ1, double *rQ2, double *rQ3, double *rQ4) const
 Convert direction cosines to quaternions.

virtual void convertDirectionCosinesToQuaternions (double *aDirCos, double *rQ1, double *rQ2, double *rQ3, double *rQ4) const
 Convert direction cosines to quaternions.

virtual void convertQuaternionsToDirectionCosines (double aQ1, double aQ2, double aQ3, double aQ4, double rDirCos[3][3]) const
 Convert quaternions to direction cosines.

virtual void convertQuaternionsToDirectionCosines (double aQ1, double aQ2, double aQ3, double aQ4, double *rDirCos) const
 Convert quaternions to direction cosines.


Static Public Attributes

const int GROUND = 0
 Body number for ground.


Private Member Functions

void setNull ()
 Set NULL values for all member variables.

void constructSystemVariables ()
 Construct system variables.

void constructNames ()
 Construct the names of the model.


Detailed Description

A wrapper class that implements many of the methods in rdModel by interfacing with SDFast.

Author:
Frank C. Anderson, Brian A. Garner
Version:
1.0


Member Function Documentation

void rdMimic::applyForce int  aBody,
const double  aPoint[3],
const double  aForce[3]
[virtual]
 

Apply a force expressed in the inertial frame to a point on a body.

Parameters:
aBody Body ID.
aPoint Point on the body expressed in the body-local frame.
aForce Force applied to the body expressed in the inertial frame.

Implements rdModel.

void rdMimic::applyForceBodyLocal int  aBody,
const double  aPoint[3],
const double  aForce[3]
[virtual]
 

Apply a force expressed in the body-local frame to a point on a body.

Parameters:
aBody Body ID.
aPoint Point on the body expressed in the body-local frame.
aForce Force applied to the body expressed in the body-local frame.

Implements rdModel.

void rdMimic::applyForces int  aN,
const int  aBodies[],
const double *  aPoints,
const double *  aForces
[virtual]
 

Apply forces expressed in the inertial frame to points bodies.

Parameters:
aN Number of applied forces.
aBodes Array of body ID's.
aPoints Pointer to a sequence of points expressed in the body-local frame laid out as aPoints[aN][3].
aForces Pointer to a sequence of forces expressed in the inertial frame laid out as aForces[aN][3].

Implements rdModel.

void rdMimic::applyForces int  aN,
const int  aBodies[],
const double  aPoints[][3],
const double  aForces[][3]
[virtual]
 

Apply a set of forces expressed in the inertial frame to a set of bodies.

The body points, aPoint, should be expressed in the body-local frame. The forces, aForce, should be expressed in the inertial frame.

Parameters:
aN Number of applied forces.
aBodies Array of body ID's.
aPoints Pointer to a sequence of points expressed in the body-local frame laid out as aPoints[aN][3].
aForces Pointer to a sequence of forces expressed in the inertial frame laid out as aForces[aN][3].

Implements rdModel.

void rdMimic::applyForcesBodyLocal int  aN,
const int  aBodies[],
const double *  aPoints,
const double *  aForces
[virtual]
 

Apply a set of forces to a set of bodies.

Parameters:
aN Number of Forces.
aBody Array of Body ID's.
aPoint Array of points on the bodies expressed in the body-local frames.
aForce Array of forces applied to the body expressed in the body-local frames.

Implements rdModel.

void rdMimic::applyForcesBodyLocal int  aN,
const int  aBodies[],
const double  aPoints[][3],
const double  aForces[][3]
[virtual]
 

Apply a set of forces to a set of bodies.

Parameters:
aN Number of Forces.
aBody Array of Body ID's.
aPoint Array of points on the bodies expressed in the body-local frames.
aForce Array of forces applied to the body expressed in the body-local frames.

Implements rdModel.

void rdMimic::applyGeneralizedForce int  aU,
double  aF
[virtual]
 

Apply a generalized force to a generalized coordinate.

Note that depending on the axis type the generalized force can be a torque or a force.

Parameters:
aU Generalized coordinate.
aF Applied force.

Implements rdModel.

void rdMimic::applyGeneralizedForces int  aN,
const int  aU[],
const double  aF[]
[virtual]
 

Apply generalized forces.

The dimension of aF is assumed to be the number of generalized speeds.

Parameters:
aN Number of generalized forces.
aU Generalized coordinate.
aF Applied force.

Implements rdModel.

void rdMimic::applyGeneralizedForces const double  aF[]  )  [virtual]
 

Apply generalized forces.

The dimension of aF is assumed to be the number of generalized speeds.

Parameters:
aF Applied force.

Implements rdModel.

void rdMimic::applyTorque int  aBody,
const double  aTorque[3]
[virtual]
 

Apply a torque expressed in the inertial frame to a body.

Parameters:
aBody Body ID.
aTorque Torque expressed in the inertial frame.

Implements rdModel.

void rdMimic::applyTorqueBodyLocal int  aBody,
const double  aTorque[3]
[virtual]
 

Apply a torque expressed in the body-local frame to a body.

Parameters:
aBody Body ID.
aTorque Torque expressed in the body-local frame.

Implements rdModel.

void rdMimic::applyTorques int  aN,
const int  aBodies[],
const double *  aTorques
[virtual]
 

Apply a set of torques expressed in the inertial frame to a set of bodies.

Parameters:
aN Number of Torques.
aBody Array of Body ID's.
aTorques Array of torques applied to the body expressed the inertial frame.

Implements rdModel.

void rdMimic::applyTorques int  aN,
const int  aBodies[],
const double  aTorques[][3]
[virtual]
 

Apply a set of torques expressed in the inertial frame to a set of bodies.

Parameters:
aN Number of Torques.
aBody Array of Body ID's.
aTorques Array of torques applied to the body expressed the inertial frame.

Implements rdModel.

void rdMimic::applyTorquesBodyLocal int  aN,
const int  aBodies[],
const double *  aTorques
[virtual]
 

Apply a set of torques expressed in the body-local frame to a set of bodies.

Parameters:
aN Number of Torques.
aBody Array of Body ID's.
aTorques Array of torques applied to the body expressed the body-local frame.

Implements rdModel.

void rdMimic::applyTorquesBodyLocal int  aN,
const int  aBodies[],
const double  aTorques[][3]
[virtual]
 

Apply a set of torques expressed in the body-local frame to a set of bodies.

Parameters:
aN Number of Torques.
aBody Array of Body ID's.
aTorques Array of torques applied to the body expressed the body-local frame.

Implements rdModel.

int rdMimic::computeAccelerations double *  dqdt,
double *  dudt
[virtual]
 

Compute the derivatives of the states.

Parameters:
dqdt Derivatives of generalized coordinates.
dudt Derivatives of generalized speeds.

Implements rdModel.

void rdMimic::computeGeneralizedForces double  aDUDT[],
double  rF[]
const [virtual]
 

Compute the generalized forces necessary to achieve a set of specified accelerations.

If any forces have been applied to the model, the balance of generalized forces needed to achieve the desired accelerations is computed. Note that constraints are not taken into account by this method.

Parameters:
aDUDT Array of desired accelerations of the generalized coordinates- should be dimensioned to NU (see getNU()).
rF Array of generalized forces that will achieve aDUDT without enforcing any constraints- should be dimensioned to NU (see getNU()).

Implements rdModel.

void rdMimic::constructSystemVariables  )  [private]
 

Construct system variables.

The following numbers are initialized by making SD/Fast calls: _nb Number of bodies. _nj Number of joints. _nu Number of degrees of freedom. _nq Number of generalized coordinates (_nu + number of ball joints).

Memory allocations are performed for the following data members: _q _u

Returns:
-1 on an error, 0 otherwise.

void rdMimic::convertAnglesToDirectionCosines double  aE1,
double  aE2,
double  aE3,
double *  rDirCos
const [virtual]
 

Convert angles to direction cosines.

Parameters:
aE1 1st Euler angle.
aE2 2nd Euler angle.
aE3 3rd Euler angle.
rDirCos Vector of direction cosines.

Implements rdModel.

void rdMimic::convertAnglesToDirectionCosines double  aE1,
double  aE2,
double  aE3,
double  rDirCos[3][3]
const [virtual]
 

Convert angles to direction cosines.

Parameters:
aE1 1st Euler angle.
aE2 2nd Euler angle.
aE3 3rd Euler angle.
rDirCos Vector of direction cosines.

Implements rdModel.

void rdMimic::convertAnglesToQuaternions double *  qang,
double *  q
const [virtual]
 

Convert angles to quaterions.

Parameters:
aQAng Vector of angles in radians.
rQ Vector of equivalent quaternions.

Implements rdModel.

void rdMimic::convertDegreesToRadians double *  aQDeg,
double *  aQRad
const [virtual]
 

Convert the rotational generalized coordinates or speeds from units of degrees to units of radiants.

Parameters:
aQ Vector of angles in degrees.
rQAng Vector of equivalent angles.

Implements rdModel.

void rdMimic::convertDirectionCosinesToAngles double *  aDirCos,
double *  rE1,
double *  rE2,
double *  rE3
const [virtual]
 

Convert direction cosines to angles.

Parameters:
aDirCos Vector of direction cosines.
rE1 1st Euler angle.
rE2 2nd Euler angle.
rE3 3rd Euler angle.

Implements rdModel.

void rdMimic::convertDirectionCosinesToAngles double  aDirCos[3][3],
double *  rE1,
double *  rE2,
double *  rE3
const [virtual]
 

Convert direction cosines to angles.

Parameters:
aDirCos Vector of direction cosines.
rE1 1st Euler angle.
rE2 2nd Euler angle.
rE3 3rd Euler angle.

Implements rdModel.

void rdMimic::convertDirectionCosinesToQuaternions double *  aDirCos,
double *  rQ1,
double *  rQ2,
double *  rQ3,
double *  rQ4
const [virtual]
 

Convert direction cosines to quaternions.

Parameters:
aDirCos Vector of direction cosines.
rQ1 1st Quaternion.
rQ2 2nd Quaternion.
rQ3 3rd Quaternion.
rQ4 4th Quaternion.

Implements rdModel.

void rdMimic::convertDirectionCosinesToQuaternions double  aDirCos[3][3],
double *  rQ1,
double *  rQ2,
double *  rQ3,
double *  rQ4
const [virtual]
 

Convert direction cosines to quaternions.

Parameters:
aDirCos Vector of direction cosines.
rQ1 1st Quaternion.
rQ2 2nd Quaternion.
rQ3 3rd Quaternion.
rQ4 4th Quaternion.

Implements rdModel.

void rdMimic::convertQuaternionsToAngles double *  q,
double *  qang
const [virtual]
 

Convert quaterions to angles.

Parameters:
aQ Vector of quaternions.
rQAng Vector of equivalent angles.

Implements rdModel.

void rdMimic::convertQuaternionsToDirectionCosines double  aQ1,
double  aQ2,
double  aQ3,
double  aQ4,
double *  rDirCos
const [virtual]
 

Convert quaternions to direction cosines.

Parameters:
aQ1 1st Quaternion.
aQ2 2nd Quaternion.
aQ3 3rd Quaternion.
aQ4 4th Quaternion.
rDirCos Vector of direction cosines.

Implements rdModel.

void rdMimic::convertQuaternionsToDirectionCosines double  aQ1,
double  aQ2,
double  aQ3,
double  aQ4,
double  rDirCos[3][3]
const [virtual]
 

Convert quaternions to direction cosines.

Parameters:
aQ1 1st Quaternion.
aQ2 2nd Quaternion.
aQ3 3rd Quaternion.
aQ4 4th Quaternion.
rDirCos Vector of direction cosines.

Implements rdModel.

void rdMimic::convertRadiansToDegrees double *  aQRad,
double *  aQDeg
const [virtual]
 

Convert the rotational generalized coordinates or speeds from units of radians to units of degrees.

Parameters:
aQ Vector of angles in degrees.
rQAng Vector of equivalent angles.

Implements rdModel.

void rdMimic::formEulerTransform int  aBody,
double *  rE
const [virtual]
 

Form the transformation matrix E[3][3] that can be used to express the angular velocity of a body in terms of the time derivatives of the euler angles.

The Euler angle convention is body-fixed 1-2-3.

Parameters:
aBody Body ID.
rE Euler angles.

Implements rdModel.

void rdMimic::formJacobianEuler int  aBody,
double *  rJE,
int  aRefBody = -1
const [virtual]
 

Form the full Jacobian matrix (JE) for the orientation of a body expressed in terms of Euler angles.

JE is laid out as follows: dEx/dq1 dEx/dq2 dEx/dq3 ... dEx/dqnu dEy/dq1 dEy/dq2 dEy/dq3 ... dEy/dqnu dEz/dq1 dEz/dq2 dEz/dq3 ... dEz/dqnu where E is the orientation of the body using 1-2-3 body-fixed Euler angles.

So, JE should have 3 rows and NU columns. In memory, the column index increments fastest, so the representation is JE[3][NU].

It is assumed that enough space has been allocated at rJO to hold all of the Jacobian elements.

The Jacobian elements can be expressed in terms of the ground frame or a particular body frame. By default, the elements are expressed in the ground frame.

Parameters:
aBody Body whose orientation Jacobian is desired.
rJE Euler Jacobian.
aRefBody Body frame in which to express the Jacobian elements. aRefBody has a default value of -1, which results in the Jacobian elements being expressed in the ground frame.

Implements rdModel.

void rdMimic::formJacobianOrientation int  aBody,
double *  rJ0,
int  aRefBody = -1
const [virtual]
 

Form the full Jacobian matrix (J0) for the orientation of a body.

Note that J0 is not appropriate for operations when the body orientation is specified in terms of Euler angles. When the body is described in terms of Euler angles, the method formJacobianEuler should be used.

J0 is laid out as follows: dOx/dq1 dOx/dq2 dOx/dq3 ... dOx/dqnu dOy/dq1 dOy/dq2 dOy/dq3 ... dOy/dqnu dOz/dq1 dOz/dq2 dOz/dq3 ... dOz/dqnu where O is the orientation of the body.

So, JO should have 3 rows and NU columns. In memory, the column index increments fastest, so the representation is JO[3][NU].

It is assumed that enough space has been allocated at rJO to hold all of the Jacobian elements.

The Jacobian elements can be expressed in terms of the ground frame or a particular body frame. By default, the elements are expressed in the ground frame.

Parameters:
aBody Body whose orientation Jacobian is desired.
rJO Orientation Jacobian.
aRefBody Body frame in which to express the Jacobian elements. aRefBody has a default value of -1, which results in the Jacobian elements being expressed in the ground frame.

Implements rdModel.

void rdMimic::formJacobianTranslation int  aBody,
const double  aBodyPoint[3],
double *  rJ,
int  aRefBody = -1
const [virtual]
 

Form the full Jacobian matrix (J) for the translation of a point on a body.

J is laid out as follows: dPx/dq1 dPx/dq2 dPx/dq3 ... dPx/dqnu dPy/dq1 dPy/dq2 dPy/dq3 ... dPy/dqnu dPz/dq1 dPz/dq2 dPz/dq3 ... dPz/dqnu where P is the point on the body.

So, J should have 3 rows and NU columns. In memory, the column index increments fastest, so the representation is J[3][NU].

It is assumed that enough space has been allocated at aJ to hold all of the Jacobian elements.

The Jacobian elements can be expressed in terms of the ground frame or a particular body frame. By default, the elements are expressed in the ground frame.

Parameters:
aBody Body on which the point resides.
aPoint Point position expressed in the local frame of body aBody.
rJ Jacobian of point aPoint.
aRefBody Body frame with respect to which the Jacobian elements are expressed. aRefBody has a default value of -1, which results in the Jacobian elements being expressed in the ground frame.

Implements rdModel.

void rdMimic::formMassMatrix double *  rI  )  [virtual]
 

Form the system mass matrix.

Parameters:
rI Mass matrix (a square matrix of size NU*NU).

Implements rdModel.

void rdMimic::getAcceleration int  aBody,
const double  aPoint[3],
double  rAcc[3]
const [virtual]
 

Get the inertial acceleration of a point on a body.

Note that the configuration of the model must be set and accelerations of the generalized coordinates must be computed before calling this method.

Parameters:
aBody Body ID.
aPoint Point on the body expressed in the body-local frame.
rAcc Acceleration of the point in the inertial frame.
See also:
setConfiguration()

computeAccelerations()

Implements rdModel.

void rdMimic::getAngularAcceleration int  aBody,
double  rAngAcc[3]
const [virtual]
 

Get the inertial angular acceleration of a body in the ground reference frame.

Parameters:
aBody Body ID.
rAngAcc Angular acceleration of the body.

Implements rdModel.

void rdMimic::getAngularAccelerationBodyLocal int  aBody,
double  rAngAcc[3]
const [virtual]
 

Get the inertial angular acceleration in the local body reference frame.

Parameters:
aBody Body ID.
rAngAcc Angular acceleration of the body.

Implements rdModel.

void rdMimic::getAngularVelocity int  aBody,
double  rAngVel[3]
const [virtual]
 

Get the inertial angular velocity of a body in the ground reference frame.

Parameters:
aBody Body ID.
rAngVel Angular velocity of the body.

Implements rdModel.

void rdMimic::getAngularVelocityBodyLocal int  aBody,
double  rAngVel[3]
const [virtual]
 

Get the inertial angular velocity in the local body reference frame.

Parameters:
aBody Body ID.
rAngVel Angular velocity of the body.

Implements rdModel.

void rdMimic::getDirectionCosines int  aBody,
double *  rDirCos
const [virtual]
 

Get the body orientation with respect to the ground.

Parameters:
aBody Body ID.
rDirCos Orientation of the body with respect to the ground frame.

Implements rdModel.

void rdMimic::getDirectionCosines int  aBody,
double  rDirCos[3][3]
const [virtual]
 

Get the body orientation with respect to the ground.

Parameters:
aBody Body ID.
rDirCos Orientation of the body with respect to the ground frame.

Implements rdModel.

void rdMimic::getGravity double  rGrav[3]  )  const [virtual]
 

Get the gravity.

Parameters:
rG Gravity vector.

Reimplemented from rdModel.

int rdMimic::getInertiaBodyLocal int  aBody,
double *  rI
const [virtual]
 

Get the scalar inertia matrix of a body.

Parameters:
aBody Body ID.
rI Inertia matrix expressed in terms of body-local coordinates.
Returns:
-1 on an error, 0 otherwise.

Implements rdModel.

int rdMimic::getInertiaBodyLocal int  aBody,
double  rI[3][3]
const [virtual]
 

Get the scalar inertia matrix of a body.

Parameters:
aBody Body ID.
rI Inertia matrix expressed in terms of body-local coordinates.
Returns:
-1 on an error, 0 otherwise.

Implements rdModel.

double rdMimic::getMass int  aBody  )  const [virtual]
 

Get the mass of a body.

Parameters:
aBody Body ID.
Returns:
Body mass

Implements rdModel.

double rdMimic::getNetAppliedGeneralizedForce int  aU  )  const [virtual]
 

Get the net applied generalized force.

The returned force is the sum of all applied forces plus any forces needed for any prescribed motions. The methods setState() (or equivalent) and computeAccelerations() must be called prior to calling this method for the returned result to be valid.

Parameters:
aU Generalized speed (degree of freedom).
Returns:
Net applied force/torque at degree of freedom indexed by aU.

Implements rdModel.

void rdMimic::getPosition int  aBody,
const double  aPoint[3],
double  rPos[3]
const [virtual]
 

Get the inertial position of a point on a body.

Note that the configuration of the model must be set before calling this method.

Parameters:
aBody Body ID.
aPoint Point on the body expressed in the body-local frame.
rPos Position of the point in the inertial frame.
See also:
setConfiguration()

Implements rdModel.

void rdMimic::getSystemInertia double *  rM,
double *  rCOM,
double *  rI
const [virtual]
 

Get the mass, center of mass, and inertia tensor of the whole model.

Parameters:
rM System mass.
rCOM System center of mass.
rI System inertia tensor.

Implements rdModel.

void rdMimic::getSystemInertia double *  rM,
double  rCOM[3],
double  rI[3][3]
const [virtual]
 

Get the mass, center of mass, and inertia tensor of the whole model.

Parameters:
rM System mass.
rCOM System center of mass.
rI System inertia tensor.

Implements rdModel.

void rdMimic::getVelocity int  aBody,
const double  aPoint[3],
double  rVel[3]
const [virtual]
 

Get the inertial velocity of a point on a body.

Note that the configuration of the model must be set before calling this method.

Parameters:
aBody Body ID.
aPoint Point on the body expressed in the body-local frame.
rVel Velocity of the point in the inertial frame.
See also:
setConfiguration()

Implements rdModel.

void rdMimic::setConfiguration const double  aY[]  )  [virtual]
 

Set the configuration of the model.

Parameters:
aY Statevector.

Reimplemented from rdModel.

void rdMimic::setConfiguration const double  aQ[],
const double  aU[]
[virtual]
 

Set the configuration of the model.

Parameters:
aQ Generalized coordinates.
aU Generalized speeds.

Reimplemented from rdModel.

void rdMimic::setGravity double  aGrav[3]  )  [virtual]
 

Set the gravity.

Parameters:
aG Gravity vector.

Reimplemented from rdModel.

void rdMimic::transform int  aBody1,
const double  aVec1[3],
int  aBody2,
double  rVec2[3]
const [virtual]
 

Transform a vector from one frame to another.

Parameters:
aBody1 ID of the body in which the vector is originally defined.
aVec1 Vector to be transformed.
aBody2 ID of the body in which the new vector will be defined.
rVec2 Vector coordinates after transformation.

Implements rdModel.


The documentation for this class was generated from the following files:
Generated on Wed Aug 20 02:17:11 2003 for Simulation Software by doxygen1.3