#include <rdCMC_TaskSet.h>
Public Member Functions | |
rdCMC_TaskSet () | |
Construct a default task set for a specified model. | |
rdCMC_TaskSet (const char *aFileName) | |
Construct a task set from file. | |
virtual | ~rdCMC_TaskSet () |
Destructor. | |
void | setModel (OpenSim::Model *aModel) |
Set the model for which the tracking is performed. | |
OpenSim::Model * | getModel () const |
Get the model for which the tracking is performed. | |
void | setParametersBasedOnName () |
Set the parameters for each task in this set based on the name of each task in this set. | |
void | setFunctions (OpenSim::FunctionSet &aFuncSet) |
Set the functions for the tasks. | |
void | setFunctionsForVelocity (OpenSim::FunctionSet &aFuncSet) |
Set the velocity functions for the tasks. | |
void | setFunctionsForAcceleration (OpenSim::FunctionSet &aFuncSet) |
Set the acceleration functions for the tasks. | |
OpenSim::Array< double > & | getTaskPositions (double aT) |
Get all active task positions. | |
OpenSim::Array< double > & | getTaskVelocities (double aT) |
Get all active task velocities. | |
OpenSim::Array< double > & | getTaskAccelerations (double aT) |
Get all active task accelerations. | |
OpenSim::Array< double > & | getPositionGains () |
Get all active gains for position errors. | |
OpenSim::Array< double > & | getVelocityGains () |
Get all active gains for velocity errors. | |
OpenSim::Array< double > & | getAccelerationGains () |
Get all active gains for acceleration errors. | |
OpenSim::Array< double > & | getPositionErrorsLast () |
Get the last position errors. | |
OpenSim::Array< double > & | getPositionErrors () |
Get the position errors. | |
OpenSim::Array< double > & | getVelocityErrorsLast () |
Get the last velocity errors. | |
OpenSim::Array< double > & | getVelocityErrors () |
Get the velocity errors. | |
OpenSim::Array< double > & | getWeights () |
Get the array of weights for the desired accelerations. | |
OpenSim::Array< double > & | getDesiredAccelerations () |
Get the desired accelerations. | |
OpenSim::Array< double > & | getAccelerations () |
Get the accelerations. | |
void | recordErrorsAsLastErrors () |
Record the current position errors of all tasks as the last errors that were achieved during a simulation. | |
void | computeErrors (double aT) |
Compute the errors for all tasks. | |
void | computeDesiredAccelerations (double aT) |
Compute the desired acceleration(s) for each task at a specified time. | |
void | computeDesiredAccelerations (double aTCurrent, double aTFuture) |
Compute the desired acceleration(s) for each task given a time interval over which the accelerations are to be achieved. | |
void | computeAccelerations () |
Compute the acceleration(s) for each task. | |
Protected Attributes | |
OpenSim::Model * | _model |
Model for which the tracking is conducted. | |
OpenSim::Array< double > | _pTask |
Array of task positions. | |
OpenSim::Array< double > | _vTask |
Array of task velocities. | |
OpenSim::Array< double > | _aTask |
Array of task accelerations. | |
OpenSim::Array< double > | _pErrLast |
Array of last position errors. | |
OpenSim::Array< double > | _pErr |
Array of position errors. | |
OpenSim::Array< double > | _vErrLast |
Array of last velocity errors. | |
OpenSim::Array< double > | _vErr |
Array of velocity errors. | |
OpenSim::Array< double > | _kp |
Array of gains for the position errors. | |
OpenSim::Array< double > | _kv |
Array of gains for the velocity errors. | |
OpenSim::Array< double > | _ka |
Array of gains for the acceleration errors. | |
OpenSim::Array< double > | _w |
Array of weights of the desired acceleration. | |
OpenSim::Array< double > | _aDes |
Array of desired accelerations. | |
OpenSim::Array< double > | _a |
Array of accelerations. | |
Private Member Functions | |
void | setNull () |
Set the data members of this actuator to their null values. | |
void | setupProperties () |
Set up the serialized member variables. |
|
Construct a default task set for a specified model.
|
|
Construct a task set from file.
|
|
Compute the acceleration(s) for each task. Model::computeAccelerations must be called before this method is called for the results to be valid. |
|
Compute the desired acceleration(s) for each task given a time interval over which the accelerations are to be achieved. Currently, the algorithm is to compute the position and velocity error terms at the initial time and the acceleration term from the task set at the final time.
|
|
Compute the desired acceleration(s) for each task at a specified time.
|
|
Compute the errors for all tasks.
|
|
Get all active gains for acceleration errors.
|
|
Get the accelerations.
|
|
Get the desired accelerations.
|
|
Get the model for which the tracking is performed.
|
|
Get the position errors.
|
|
Get the last position errors.
|
|
Get all active gains for position errors.
|
|
Get all active task accelerations.
|
|
Get all active task positions.
|
|
Get all active task velocities.
|
|
Get the velocity errors.
|
|
Get the last velocity errors.
|
|
Get all active gains for velocity errors.
|
|
Get the array of weights for the desired accelerations.
|
|
Record the current position errors of all tasks as the last errors that were achieved during a simulation. This method assumes that the position errors have already been computed. |
|
Set the functions for the tasks. Functions are set based on the correspondence of the function and the task. For example, a task with the name "x" will search for a function or functions with the name "x". For tasks that require 3 functions, such as rdCMC_Point tasks, the assumption is that there will be three consecutive functions named "x" in the function set. If the correct number of functions is not found, the task is disabled.
|
|
Set the acceleration functions for the tasks. Functions are set based on the correspondence of the function and the task. For example, a task with the name "x" will search for a function or functions with the name "x". For tasks that require 3 functions, such as rdCMC_Point tasks, the assumption is that there will be three consecutive functions named "x" in the function set. If the correct number of functions is not found, the task is disabled.
|
|
Set the velocity functions for the tasks. Functions are set based on the correspondence of the function and the task. For example, a task with the name "x" will search for a function or functions with the name "x". For tasks that require 3 functions, such as rdCMC_Point tasks, the assumption is that there will be three consecutive functions named "x" in the function set. If the correct number of functions is not found, the task is disabled.
|
|
Set the model for which the tracking is performed. The model is set for all tasks that are currently being managed by this set.
|
|
Set the parameters for each task in this set based on the name of each task in this set.
|