A class for specifying the tracking task for a joint. More...
#include <CMC_Joint.h>
Public Member Functions | |
CMC_Joint (const std::string &aCoordinateName="") | |
CMC_Joint (const CMC_Joint &aTask) | |
Copy constructor. | |
virtual | ~CMC_Joint () |
Destructor. | |
virtual Object * | copy () const |
Copy this track object and return a pointer to the copy. | |
CMC_Joint & | operator= (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 |
A class for specifying the tracking task for a joint.
OpenSim::CMC_Joint::CMC_Joint | ( | const std::string & | aCoordinateName = "" |
) |
CMC_Joint::CMC_Joint | ( | const CMC_Joint & | aTask | ) |
Copy constructor.
aTask | Joint task to be copied. |
CMC_Joint::~CMC_Joint | ( | ) | [virtual] |
Destructor.
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.
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.
aTI | Initial time of the controlled interval in real time units. | |
aTF | Final time of the controlled interval in real time units. |
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.
aT | Time at which the desired accelerations are to be computed in real time units. |
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.
aT | Current time in real time units. |
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.
Implements OpenSim::CMC_Task.
Reimplemented in OpenSim::SMC_Joint.
string CMC_Joint::getCoordinateName | ( | ) | const |
Get the generalized coordinate that is to be tracked.
double CMC_Joint::getLimit | ( | ) | const |
Get the limit.
Assignment operator.
aTask | Object to be copied. |
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.
aModel | Model. |
Reimplemented from OpenSim::CMC_Task.
void CMC_Joint::updateFromXMLNode | ( | ) | [virtual] |
Update this object based on its XML node.
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.
std::string& OpenSim::CMC_Joint::_coordinateName [protected] |
double& OpenSim::CMC_Joint::_limit [protected] |
PropertyStr OpenSim::CMC_Joint::_propCoordinateName [protected] |
Name of the generalized coordinate to be tracked.
PropertyDbl OpenSim::CMC_Joint::_propLimit [protected] |
Error limit on the coordinate.
Coordinate* OpenSim::CMC_Joint::_q [protected] |