OpenSim::TrackingTask Class Reference

An abstract base class for specifying a target for a tracking problem. More...

#include <TrackingTask.h>

Inheritance diagram for OpenSim::TrackingTask:
OpenSim::Object OpenSim::CMC_Task OpenSim::StateTrackingTask OpenSim::CMC_Joint OpenSim::CMC_Orientation OpenSim::CMC_Point OpenSim::MuscleStateTrackingTask OpenSim::SMC_Joint

List of all members.

Public Member Functions

 TrackingTask ()
 Construct a default track object for a specified model.
 TrackingTask (const TrackingTask &aTaskObject)
 Copy constructor.
virtual ~TrackingTask ()
 Destructor.
virtual Objectcopy () const =0
 Construct and return a copy of this object.
TrackingTaskoperator= (const TrackingTask &aTaskObject)
 Assignment operator.
virtual void setModel (OpenSim::Model &aModel)
 Set the model to which this track object applies.
ModelgetModel () 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.
void setWeight (double aW0, double aW1=0.0, double aW2=0.0)
 Set the weight of each track goal.
void setWeights (const Array< double > &aWeights)
double getWeight (int aWhich) const
 Get the weight of each track goal.
const Array< double > & getWeights () const
int getNumTaskFunctions () const
 Get the number of position track functions.
virtual void setTaskFunctions (Function *aF0, Function *aF1=NULL, Function *aF2=NULL)
 Set the track functions.

Protected Attributes

PropertyBool _propOn
 Property to indicate on or off state.
PropertyDblArray _propW
 Weights of the task goals.
bool & _on
 Reference to the value of the on property.
Array< double > & _w
 Reference to the value of the Weight property.
Model_model
 Model.
int _nTrk
 Number of functions for this target.
Function_pTrk [3]
 Position task functions.
Function_vTrk [3]
 Velocity task functions.
Function_aTrk [3]
 Acceleration task functions.

Detailed Description

An abstract base class for specifying a target for a tracking problem.

Author:
Ayman Habib & Ajay Seth
Version:
1.0

Constructor & Destructor Documentation

TrackingTask::TrackingTask (  ) 

Construct a default track object for a specified model.

TrackingTask::TrackingTask ( const TrackingTask aTask  ) 

Copy constructor.

Parameters:
aTask Task object to be copied.
TrackingTask::~TrackingTask (  )  [virtual]

Destructor.


Member Function Documentation

virtual Object* OpenSim::TrackingTask::copy (  )  const [pure virtual]

Construct and return a copy of this object.

The object is allocated using the new operator, so the caller is responsible for deleting the returned object.

Returns:
Copy of this object.

Reimplemented from OpenSim::Object.

Implemented in OpenSim::CMC_Joint, OpenSim::CMC_Point, OpenSim::CMC_Task, OpenSim::MuscleStateTrackingTask, and OpenSim::SMC_Joint.

Model * TrackingTask::getModel (  )  const

Get the model to which this track object applies.

Returns:
Pointer to the model.
int TrackingTask::getNumTaskFunctions (  )  const

Get the number of position track functions.

Returns:
Number of position track functions.
bool TrackingTask::getOn (  )  const

Get whether or not this track object is on.

Returns:
True if on, false if off.
double TrackingTask::getWeight ( int  aWhich  )  const

Get the weight of each track goal.

Parameters:
aWhich Number of the track goal in question.
Returns:
Weight.

Reimplemented in OpenSim::CMC_Task.

const Array<double>& OpenSim::TrackingTask::getWeights (  )  const [inline]
TrackingTask & TrackingTask::operator= ( const TrackingTask aTask  ) 

Assignment operator.

Returns:
Reference to the altered object.

Reimplemented from OpenSim::Object.

Reimplemented in OpenSim::CMC_Joint, OpenSim::CMC_Point, OpenSim::CMC_Task, OpenSim::MuscleStateTrackingTask, OpenSim::SMC_Joint, and OpenSim::StateTrackingTask.

void TrackingTask::setModel ( OpenSim::Model aModel  )  [virtual]

Set the model to which this track object applies.

Parameters:
aModel Model.

Reimplemented in OpenSim::CMC_Joint, and OpenSim::CMC_Point.

void TrackingTask::setOn ( bool  aTrueFalse  ) 

Turn this track object on or off.

Parameters:
aTureFalse Turns analysis on if "true" and off if "false".
void TrackingTask::setTaskFunctions ( Function aF0,
Function aF1 = NULL,
Function aF2 = NULL 
) [virtual]

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.

Parameters:
aF0 Function for track goal 0.
aF1 Function for track goal 1.
aF2 Function for track goal 2.
void TrackingTask::setWeight ( double  aW0,
double  aW1 = 0.0,
double  aW2 = 0.0 
)

Set the weight of each track goal.

Parameters:
aW0 Weight for track goal 0.
aW1 Weight for track goal 1.
aW2 Weight for track goal 2.

Reimplemented in OpenSim::CMC_Task.

void OpenSim::TrackingTask::setWeights ( const Array< double > &  aWeights  )  [inline]

Member Data Documentation

Acceleration task functions.

If acceleration task functions are not specified, derivatives of the position task function are used.

Number of functions for this target.

bool& OpenSim::TrackingTask::_on [protected]

Reference to the value of the on property.

Property to indicate on or off state.

Weights of the task goals.

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.

Array<double>& OpenSim::TrackingTask::_w [protected]

Reference to the value of the Weight property.


The documentation for this class was generated from the following files:

Generated on Sun Sep 25 00:20:08 2011 for OpenSim by  doxygen 1.6.1