#include <rdCMC_Task.h>
Inheritance diagram for rdCMC_Task:
Public Member Functions | |
rdCMC_Task () | |
Construct a default track object for a specified model. | |
rdCMC_Task (DOMElement *aElement) | |
Construct a track object from an XML Element. | |
rdCMC_Task (const rdCMC_Task &aTaskObject) | |
Copy constructor. | |
virtual | ~rdCMC_Task () |
Destructor. | |
virtual OpenSim::Object * | copy () const =0 |
virtual OpenSim::Object * | copy (DOMElement *aElement) const =0 |
rdCMC_Task & | operator= (const rdCMC_Task &aTaskObject) |
Assignment operator. | |
void | setModel (OpenSim::Model *aModel) |
Set the model to which this track object applies. | |
OpenSim::Model * | getModel () const |
Get the model to which this track object applies. | |
void | setOn (bool aTrueFalse) |
Turn this track object on or off. | |
bool | getOn () const |
Get whether or not this track object is on. | |
virtual void | setParametersBasedOnName ()=0 |
void | setWRTBody (int aBody) |
Set the body with respect to (WRT) which the track goals are specified. | |
int | getWRTBody () const |
Get the body with respect to (WRT) which the track goals are specified. | |
void | setExpressBody (int aBody) |
Set the body in which the track goals are expressed. | |
int | getExpressBody () const |
Get the body in which the track goals are expressed. | |
void | setActive (bool a0, bool a1=false, bool a2=false) |
Set whether or not track goals are active. | |
bool | getActive (int aWhich) const |
Get whether a specified track goal is active. | |
void | setWeight (double aW0, double aW1=0.0, double aW2=0.0) |
Set the weight of each track goal. | |
double | getWeight (int aWhich) const |
Get the weight of each track goal. | |
void | setKP (double aK0, double aK1=0.0, double aK2=0.0) |
Set the position gains for each track goal. | |
double | getKP (int aWhich) const |
Get the position gain for a specified track goal. | |
void | setKV (double aK0, double aK1=0.0, double aK2=0.0) |
Set the velocity gains for each track goal. | |
double | getKV (int aWhich) const |
Get the velocity gain for a specified track goal. | |
void | setKA (double aK0, double aK1=0.0, double aK2=0.0) |
Set the acceleration gains for each track goal. | |
double | getKA (int aWhich) const |
Get the acceleration gain for a specified track goal. | |
void | setDirection_0 (const double aR[3]) |
Set the direction of track goal 0. | |
void | getDirection_0 (double rR[3]) const |
Get the direction of track goal 0. | |
void | setDirection_1 (const double aR[3]) |
Set the direction of track goal 1. | |
void | getDirection_1 (double rR[3]) const |
Get the direction of track goal 1. | |
void | setDirection_2 (const double aR[3]) |
Set the direction of track goal 2. | |
void | getDirection_2 (double rR[3]) const |
Get the direction of track goal 2. | |
int | getNumTaskFunctions () const |
Get the number of position track functions. | |
void | setTaskFunctions (OpenSim::Function *aF0, OpenSim::Function *aF1=NULL, OpenSim::Function *aF2=NULL) |
Set the track functions. | |
OpenSim::Function * | getTaskFunction (int aWhich) const |
Get a specified track function. | |
void | setTaskFunctionsForVelocity (OpenSim::Function *aF0, OpenSim::Function *aF1=NULL, OpenSim::Function *aF2=NULL) |
Set the velocity track functions. | |
OpenSim::Function * | getTaskFunctionForVelocity (int aWhich) const |
Get a specified velocity track function. | |
void | setTaskFunctionsForAcceleration (OpenSim::Function *aF0, OpenSim::Function *aF1=NULL, OpenSim::Function *aF2=NULL) |
Set the acceleration track functions. | |
OpenSim::Function * | getTaskFunctionForAcceleration (int aWhich) const |
Get a specified acceleration track function. | |
double | getTaskPosition (int aWhich, double aT) const |
Get the task position. | |
double | getTaskVelocity (int aWhich, double aT) const |
Get the task velocity. | |
double | getTaskAcceleration (int aWhich, double aT) const |
Get the task acceleration. | |
void | setPositionErrorLast (double aE0, double aE1=0.0, double aE2=0.0) |
Set the last achieved position error. | |
double | getPositionErrorLast (int aWhich) const |
Get the last achieved position error. | |
void | setVelocityErrorLast (double aE0, double aE1=0.0, double aE2=0.0) |
Set the last achieved velocity error. | |
double | getVelocityErrorLast (int aWhich) const |
Get the last achieved velocity error. | |
double | getPositionError (int aWhich) const |
Get the position track error of a specified track goal. | |
double | getVelocityError (int aWhich) const |
Get the velocity track error of a specified track goal. | |
double | getDesiredAcceleration (int aWhich) const |
Get the desired acceleration of a specified track goal. | |
double | getAcceleration (int aWhich) const |
Get the acceleration of a specified track goal. | |
virtual void | computeErrors (double aT)=0 |
virtual void | computeDesiredAccelerations (double aT)=0 |
virtual void | computeDesiredAccelerations (double aTI, double aTF)=0 |
virtual void | computeAccelerations ()=0 |
virtual void | computeJacobian () |
Compute the Jacobian. | |
virtual void | computeEffectiveMassMatrix () |
Compute the effective mass matrix. | |
virtual void | updateFromXMLNode () |
Update this object based on its XML node. | |
Protected Attributes | |
OpenSim::PropertyBool | _propOn |
Property to indicate on or off state. | |
OpenSim::PropertyInt | _propWRTBody |
Body with respect to which the task goals are specified. | |
OpenSim::PropertyInt | _propExpressBody |
Body frame in which the task goals are expressed. | |
OpenSim::PropertyBoolArray | _propActive |
Property to specify the active task goals. | |
OpenSim::PropertyDblArray | _propW |
Weights of the task goals. | |
OpenSim::PropertyDblArray | _propKP |
Position error feedback gain. | |
OpenSim::PropertyDblArray | _propKV |
Velocity error feedback gain. | |
OpenSim::PropertyDblArray | _propKA |
Feedforward acceleration gain. | |
OpenSim::PropertyDblArray | _propR0 |
Directions of the task goal 0. | |
OpenSim::PropertyDblArray | _propR1 |
Directions of the task goal 1. | |
OpenSim::PropertyDblArray | _propR2 |
Directions of the task goal 2. | |
bool & | _on |
Reference to the value of the on property. | |
int & | _wrtBody |
Reference to the value of the WRTBody property. | |
int & | _expressBody |
Reference to the value of the ExpressBody property. | |
OpenSim::Array< bool > & | _active |
Reference to the value of the Active property. | |
OpenSim::Array< double > & | _w |
Reference to the value of the Weight property. | |
OpenSim::Array< double > & | _kp |
Reference to the value of the KP property. | |
OpenSim::Array< double > & | _kv |
Reference to the value of the KV property. | |
OpenSim::Array< double > & | _ka |
Reference to the value of the KA property. | |
OpenSim::Array< double > & | _r0 |
Reference to the value of the R0 property. | |
OpenSim::Array< double > & | _r1 |
Reference to the value of the R1 property. | |
OpenSim::Array< double > & | _r2 |
Reference to the value of the R2 property. | |
OpenSim::Model * | _model |
Model. | |
int | _nTrk |
Number of task functions. | |
OpenSim::Function * | _pTrk [3] |
Position task functions. | |
OpenSim::Function * | _vTrk [3] |
Velocity task functions. | |
OpenSim::Function * | _aTrk [3] |
Acceleration task functions. | |
double | _pErrLast [3] |
Last position error. | |
double | _pErr [3] |
Position error. | |
double | _vErrLast [3] |
Last velocity error. | |
double | _vErr [3] |
Velocity error. | |
double | _aDes [3] |
Desired accelerations. | |
double | _a [3] |
Accelerations. | |
double * | _j |
Jacobian. | |
double * | _m |
Effective mass matrix. | |
Private Member Functions | |
void | setNull () |
Set NULL values for all member variables. | |
void | setupProperties () |
Set up the properties. | |
void | copyData (const rdCMC_Task &aTaskObject) |
Copy the member data for this class only. |
This class supports joint, point, and orientation task objectives. Specfic implementations for these kinds of control tasks should inherit from this class.
|
Construct a track object from an XML Element.
|
|
Copy constructor.
|
|
Copy the member data for this class only.
|
|
Get the acceleration of a specified track goal. The acceleration returned is the dot product of the appropriate track-goal direction and the acceleration of the point or orientation in question. In the case of generalized coordinates, the acceleration of the generalized coordinate is returned (i.e., a direction is not appropriate). For the value returned by this method to be valid, the method computeAccelerations() must be called first.
|
|
Get whether a specified track goal is active.
|
|
Get the desired acceleration of a specified track goal. The method computeDesiredAccelerations() must be called first for the values returned by this method to be valid.
|
|
Get the direction of track goal 0.
|
|
Get the direction of track goal 1.
|
|
Get the direction of track goal 2.
|
|
Get the body in which the track goals are expressed.
|
|
Get the acceleration gain for a specified track goal.
|
|
Get the position gain for a specified track goal.
|
|
Get the velocity gain for a specified track goal.
|
|
Get the model to which this track object applies.
|
|
Get the number of position track functions.
|
|
Get whether or not this track object is on.
|
|
Get the position track error of a specified track goal.
|
|
Get the last achieved position error. This information is useful for checking that error dynamics are being followed.
|
|
Get the task acceleration.
|
|
Get a specified track function.
|
|
Get a specified acceleration track function.
|
|
Get a specified velocity track function.
|
|
Get the task position.
|
|
Get the task velocity.
|
|
Get the velocity track error of a specified track goal.
|
|
Get the last achieved velocity error. This information is useful for checking that error dynamics are being followed.
|
|
Get the weight of each track goal.
|
|
Get the body with respect to (WRT) which the track goals are specified.
|
|
Assignment operator.
|
|
Set whether or not track goals are active.
|
|
Set the direction of track goal 0.
|
|
Set the direction of track goal 1.
|
|
Set the direction of track goal 2.
|
|
Set the body in which the track goals are expressed.
|
|
Set the acceleration gains for each track goal.
|
|
Set the position gains for each track goal.
|
|
Set the velocity gains for each track goal.
|
|
Set the model to which this track object applies.
|
|
Turn this track object on or off.
|
|
Set the last achieved position error. This information is useful for checking that error dynamics are being followed.
|
|
Set the track functions. Note that this method makes copies of the specified track functions, so the caller may use the specified functions for whatever purposes.
|
|
Set the acceleration track functions. Note that this method makes copies of the specified track functions, so the caller may use the specified functions for whatever purposes.
|
|
Set the velocity track functions. Note that this method makes copies of the specified functions, so the caller may use the specified functions for whatever purposes.
|
|
Set the last achieved velocity error. This information is useful for checking that error dynamics are being followed.
|
|
Set the weight of each track goal.
|
|
Set the body with respect to (WRT) which the track goals are specified.
|
|
Acceleration task functions. If acceleration task functions are not specified, derivatives of the position task function are used. |
|
Position task functions. Different types of tasks can require different numbers of task functions. For example, to track a joint angle, only one task function is needed. However, to track a position, up to three task functions may be needed. |
|
Velocity task functions. If velocity task functions are not specified, derivatives of the position task function are used. |