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

rdCMC_Joint Class Reference

A class for specifying the tracking task for a joint. More...

#include <rdCMC_Joint.h>

Inheritance diagram for rdCMC_Joint:

rdCMC_Task List of all members.

Public Member Functions

 rdCMC_Joint (int aQID=-1)
 Construct a task for a specified generalized coordinate.
 rdCMC_Joint (DOMElement *aElement)
 Construct a track joint object for a specified model from an XML element.
 rdCMC_Joint (const rdCMC_Joint &aTask)
 Copy constructor.
virtual ~rdCMC_Joint ()
 Destructor.
virtual OpenSim::Object * copy () const
 Copy this track object and return a pointer to the copy.
virtual OpenSim::Object * copy (DOMElement *aElement) const
 Copy this track object and modify the copy so that it is consistent with a specified XML element node.
rdCMC_Jointoperator= (const rdCMC_Joint &aTask)
 Assignment operator.
virtual void setParametersBasedOnName ()
 Set the id of the generalized coordinate based on the name of this object.
void setQID (int aQID)
 Set the generalized coordinate that is to be tracked.
int getQID () const
 Get the generalized coordinate that is to be tracked.
double getLimit () const
 Get the limit.
virtual void computeErrors (double aT)
 Compute the position and velocity errors.
virtual void computeDesiredAccelerations (double aT)
 Compute the desired accelerations.
virtual void computeDesiredAccelerations (double aTI, double aTF)
 Compute the desired accelerations.
virtual void computeAccelerations ()
 Compute the acceleration of the appropriate generalized coordinate.
virtual void updateFromXMLNode ()
 Update this object based on its XML node.

Protected Attributes

OpenSim::PropertyInt _propQID
 Generalized coordinate to be tracked.
OpenSim::PropertyDbl _propLimit
 Error limit on the coordinate.
int & _qid
double & _limit

Private Member Functions

void setNull ()
 Set NULL values for all member variables.
void setupProperties ()
 Set up serialized member variables.
void copyData (const rdCMC_Joint &aTask)
 Copy only the member data of specified object.

Detailed Description

A class for specifying the tracking task for a joint.

Author:
Frank C. Anderson
Version:
1.0


Constructor & Destructor Documentation

rdCMC_Joint::rdCMC_Joint int  aQID = -1  ) 
 

Construct a task for a specified generalized coordinate.

Parameters:
aQID ID of the generalized coordinate to be tracked.

Todo:
Insted of an integer id, the name of the coordinate should be used.

rdCMC_Joint::rdCMC_Joint DOMElement *  aElement  ) 
 

Construct a track joint object for a specified model from an XML element.

Parameters:
aElement XML element.

rdCMC_Joint::rdCMC_Joint const rdCMC_Joint aTask  ) 
 

Copy constructor.

Parameters:
aTask Joint task to be copied.


Member Function Documentation

void rdCMC_Joint::computeAccelerations  )  [virtual]
 

Compute the acceleration of the appropriate generalized coordinate.

For the computed accelerations to be correct, Model::computeAccelerations() must have already been called.

For joints (i.e., generalized coordinates), the acceleration is not computed. It has already been computed and is simply retrieved from the model.

See also:
Model::computeAccelerations()

suTrackObject::getAcceleration()

Implements rdCMC_Task.

void rdCMC_Joint::computeDesiredAccelerations double  aTI,
double  aTF
[virtual]
 

Compute the desired accelerations.

This method assumes that the states have been set for the model.

Parameters:
aTI Initial time of the controlled interval in real time units.
aTF Final time of the controlled interval in real time units.
See also:
Model::set()

Model::setStates()

Implements rdCMC_Task.

void rdCMC_Joint::computeDesiredAccelerations double  aT  )  [virtual]
 

Compute the desired accelerations.

This method assumes that the states have been set for the model.

Parameters:
aT Time at which the desired accelerations are to be computed in real time units.
See also:
Model::set()

Model::setStates()

Implements rdCMC_Task.

void rdCMC_Joint::computeErrors double  aT  )  [virtual]
 

Compute the position and velocity errors.

This method assumes the states have been set for the model.

Parameters:
aT Current time in real time units.
See also:
Model::set()

Model::setStates()

Implements rdCMC_Task.

Object * rdCMC_Joint::copy DOMElement *  aElement  )  const [virtual]
 

Copy this track object and modify the copy so that it is consistent with a specified XML element node.

The copy is constructed by first using the contructor for the DOMElement in order to establish the relationship of the Force object with the XML node. Then, the assignment operator is used to set all data members of the copy to the values of this object. Finally, the data members of the copy are updated from the DOMElment using updateObject().

Parameters:
aElement XML element.
Returns:
Pointer to a copy of this actuator.

Implements rdCMC_Task.

Object * rdCMC_Joint::copy  )  const [virtual]
 

Copy this track object and return a pointer to the copy.

The copy constructor for this class is used.

Returns:
Pointer to a copy of this track object.

Implements rdCMC_Task.

double rdCMC_Joint::getLimit  )  const
 

Get the limit.

Returns:
limit valid of the tracked generalized coordinate.

int rdCMC_Joint::getQID  )  const
 

Get the generalized coordinate that is to be tracked.

Returns:
ID of the tracked generalized coordinate.

rdCMC_Joint & rdCMC_Joint::operator= const rdCMC_Joint aTask  ) 
 

Assignment operator.

Parameters:
aTask Object to be copied.
Returns:
Reference to the altered object.

void rdCMC_Joint::setParametersBasedOnName  )  [virtual]
 

Set the id of the generalized coordinate based on the name of this object.

The qid is set by calling Model::getCoordinateIndex(string aName) with the name of this object.

Parameters:
aQID ID of the tracked generalized coordinate.

Implements rdCMC_Task.

void rdCMC_Joint::setQID int  aQID  ) 
 

Set the generalized coordinate that is to be tracked.

Parameters:
aQID ID of the tracked generalized coordinate.

void rdCMC_Joint::updateFromXMLNode  )  [virtual]
 

Update this object based on its XML node.

Parameters:
aDeep If true, update this object and all its child objects (that is, member variables that are Object's); if false, update only the member variables that are not Object's.

Reimplemented from rdCMC_Task.


The documentation for this class was generated from the following files:
Generated on Wed Nov 1 16:04:32 2006 for Computed Muscle Control (CMC) API by doxygen 1.3.8