OpenSim::CMC_Joint Class Reference

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

#include <CMC_Joint.h>

Inheritance diagram for OpenSim::CMC_Joint:
OpenSim::CMC_Task OpenSim::Object OpenSim::SMC_Joint

List of all members.

Public Member Functions

 CMC_Joint (const std::string &aCoordinateName="")
 CMC_Joint (const CMC_Joint &aTask)
 Copy constructor.
virtual ~CMC_Joint ()
 Destructor.
virtual Objectcopy () const
 Copy this track object and return a pointer to the copy.
CMC_Jointoperator= (const CMC_Joint &aTask)
 Assignment operator.
virtual void setModel (Model &aModel)
 Initializes pointers to the Coordinate and Speed in the model given the coordinate name assigned to this task.
void setCoordinateName (const std::string &aName)
std::string getCoordinateName () const
 Get the generalized coordinate that is to be tracked.
double getLimit () const
 Get the limit.
virtual void computeErrors (const SimTK::State &s, double aT)
 Compute the position and velocity errors.
virtual void computeDesiredAccelerations (const SimTK::State &s, double aT)
 Compute the desired accelerations.
virtual void computeDesiredAccelerations (const SimTK::State &s, double aTI, double aTF)
 Compute the desired accelerations.
virtual void computeAccelerations (const SimTK::State &s)
 Compute the acceleration of the appropriate generalized coordinate.
virtual void updateFromXMLNode ()
 Update this object based on its XML node.

Protected Attributes

PropertyStr _propCoordinateName
 Name of the generalized coordinate to be tracked.
PropertyDbl _propLimit
 Error limit on the coordinate.
std::string & _coordinateName
double & _limit
Coordinate_q

Detailed Description

A class for specifying the tracking task for a joint.

Author:
Frank C. Anderson
Version:
1.0

Constructor & Destructor Documentation

OpenSim::CMC_Joint::CMC_Joint ( const std::string &  aCoordinateName = ""  ) 
CMC_Joint::CMC_Joint ( const CMC_Joint aTask  ) 

Copy constructor.

Parameters:
aTask Joint task to be copied.
CMC_Joint::~CMC_Joint (  )  [virtual]

Destructor.


Member Function Documentation

void CMC_Joint::computeAccelerations ( const SimTK::State &  s  )  [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 OpenSim::CMC_Task.

void CMC_Joint::computeDesiredAccelerations ( const SimTK::State &  s,
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 OpenSim::CMC_Task.

void CMC_Joint::computeDesiredAccelerations ( const SimTK::State &  s,
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 OpenSim::CMC_Task.

Reimplemented in OpenSim::SMC_Joint.

void CMC_Joint::computeErrors ( const SimTK::State &  s,
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 OpenSim::CMC_Task.

Object * CMC_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 OpenSim::CMC_Task.

Reimplemented in OpenSim::SMC_Joint.

string CMC_Joint::getCoordinateName (  )  const

Get the generalized coordinate that is to be tracked.

Returns:
Name of the tracked generalized coordinate.
double CMC_Joint::getLimit (  )  const

Get the limit.

Returns:
limit valid of the tracked generalized coordinate.
CMC_Joint & CMC_Joint::operator= ( const CMC_Joint aTask  ) 

Assignment operator.

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

Reimplemented from OpenSim::CMC_Task.

Reimplemented in OpenSim::SMC_Joint.

void OpenSim::CMC_Joint::setCoordinateName ( const std::string &  aName  ) 
void CMC_Joint::setModel ( Model aModel  )  [virtual]

Initializes pointers to the Coordinate and Speed in the model given the coordinate name assigned to this task.

Parameters:
aModel Model.

Reimplemented from OpenSim::CMC_Task.

void CMC_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 OpenSim::CMC_Task.


Member Data Documentation

std::string& OpenSim::CMC_Joint::_coordinateName [protected]
double& OpenSim::CMC_Joint::_limit [protected]

Name of the generalized coordinate to be tracked.

Error limit on the coordinate.


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

Generated on Wed Dec 16 15:03:49 2009 for OpenSim by  doxygen 1.6.1