OpenSim::IKTarget Class Reference
A Class that represents an inverse kinematics optimization target.
More...
#include <IKTarget.h>
List of all members.
Classes |
struct | coordinateInfo |
struct | markerToSolve |
Public Member Functions |
| IKTarget (const SimTK::State &s, Model &aModel, IKTaskSet &aIKTaskSet, Storage &aExperimentalDataStorage) |
virtual | ~IKTarget (void) |
| Destructor.
|
void | prepareToSolve (SimTK::State &s, int aIndex, double *qGuess) |
| prepareToSolve specifies the row of the Storage instance _experimentalDataStorage that the optimizer is trying to solve.
|
void | printTasks () const |
void | printPerformance (double *x) |
void | interrupt () |
void | getComputedMarkerLocations (Array< double > &aMarkerLocations) const |
| getComputedMarkerLocations returns current commputed (model) marker locations for debugging and display purposes
|
void | getExperimentalMarkerLocations (Array< double > &aMarkerLocations) const |
| getExperimentalMarkerLocations returns current experimental marker locations for debugging and display purposes
|
void | getPrescribedCoordinateValues (const SimTK::State &s, Array< double > &aQValues) const |
| getComputedMarkerLocations returns current marker locations for debugging and display purposes
|
void | getUnprescribedCoordinateNames (Array< std::string > &aNameArray) |
void | getPrescribedCoordinateNames (Array< std::string > &aNameArray) |
void | getOutputMarkerNames (Array< std::string > &aNameArray) |
Model & | getModel () |
int | getNumUnprescribedCoordinates () |
int | getNumOutputMarkers () |
const Coordinate * | getUnprescribedCoordinate (int i) const |
void | setCurrentState (SimTK::State *state) |
const SimTK::State * | getCurrentState () const |
int | objectiveFunc (const SimTK::Vector ¶meters, const bool new_parameters, SimTK::Real &f) const |
| Compute objective function (sum of squared errors in marker positions) using current values (x) for controls.
|
int | gradientFunc (const SimTK::Vector ¶meters, const bool new_parameters, SimTK::Vector &gradient) const |
| Compute derivative of objective function using finite differences.
|
int | iterativeOptimization (SimTK::State &s, SimTK::Vector &results) |
| Compute derivative of objective function using finite differences.
|
const double & | getWorstMarkerError () const |
const double & | getWorstCoordinateError () const |
const std::string & | getNameOfWorstMarker () const |
const std::string & | getNameOfWorstCoordinate () const |
Static Public Attributes |
static const double | _perturbation = 1e-3 |
Detailed Description
A Class that represents an inverse kinematics optimization target.
This solves the problem of computing Qs that minimize the sum of the squared differences between a set of markers on a on the nominal model and passed in marker positions.
- Author:
- Ayman Habib, Peter Loan
- Version:
- 1.0
Constructor & Destructor Documentation
IKTarget::IKTarget |
( |
const SimTK::State & |
s, |
|
|
Model & |
aModel, |
|
|
IKTaskSet & |
aIKTaskSet, |
|
|
Storage & |
aExperimentalDataStorage | |
|
) |
| | |
Number of controls -- also allocates _dx.
IKTarget::~IKTarget |
( |
void |
|
) |
[virtual] |
Member Function Documentation
void IKTarget::getComputedMarkerLocations |
( |
OpenSim::Array< double > & |
aMarkerLocations |
) |
const |
getComputedMarkerLocations returns current commputed (model) marker locations for debugging and display purposes
const SimTK::State* OpenSim::IKTarget::getCurrentState |
( |
|
) |
const [inline] |
void IKTarget::getExperimentalMarkerLocations |
( |
OpenSim::Array< double > & |
aMarkerLocations |
) |
const |
getExperimentalMarkerLocations returns current experimental marker locations for debugging and display purposes
Model& OpenSim::IKTarget::getModel |
( |
|
) |
[inline] |
const std::string& OpenSim::IKTarget::getNameOfWorstCoordinate |
( |
|
) |
const [inline] |
const std::string& OpenSim::IKTarget::getNameOfWorstMarker |
( |
|
) |
const [inline] |
int OpenSim::IKTarget::getNumOutputMarkers |
( |
|
) |
[inline] |
int OpenSim::IKTarget::getNumUnprescribedCoordinates |
( |
|
) |
[inline] |
void OpenSim::IKTarget::getOutputMarkerNames |
( |
Array< std::string > & |
aNameArray |
) |
|
void OpenSim::IKTarget::getPrescribedCoordinateNames |
( |
Array< std::string > & |
aNameArray |
) |
|
void IKTarget::getPrescribedCoordinateValues |
( |
const SimTK::State & |
s, |
|
|
OpenSim::Array< double > & |
aQValues | |
|
) |
| | const |
getComputedMarkerLocations returns current marker locations for debugging and display purposes
const Coordinate* OpenSim::IKTarget::getUnprescribedCoordinate |
( |
int |
i |
) |
const [inline] |
void OpenSim::IKTarget::getUnprescribedCoordinateNames |
( |
Array< std::string > & |
aNameArray |
) |
|
const double& OpenSim::IKTarget::getWorstCoordinateError |
( |
|
) |
const [inline] |
const double& OpenSim::IKTarget::getWorstMarkerError |
( |
|
) |
const [inline] |
int IKTarget::gradientFunc |
( |
const SimTK::Vector & |
parameters, |
|
|
const bool |
new_parameters, |
|
|
SimTK::Vector & |
gradient | |
|
) |
| | const |
Compute derivative of objective function using finite differences.
void OpenSim::IKTarget::interrupt |
( |
|
) |
[inline] |
int IKTarget::iterativeOptimization |
( |
SimTK::State & |
s, |
|
|
SimTK::Vector & |
results | |
|
) |
| | |
Compute derivative of objective function using finite differences.
int IKTarget::objectiveFunc |
( |
const SimTK::Vector & |
x, |
|
|
const bool |
new_parameters, |
|
|
SimTK::Real & |
f | |
|
) |
| | const |
Compute objective function (sum of squared errors in marker positions) using current values (x) for controls.
Value of error is returned in p
void IKTarget::prepareToSolve |
( |
SimTK::State & |
s, |
|
|
int |
aIndex, |
|
|
double * |
qGuess | |
|
) |
| | |
prepareToSolve specifies the row of the Storage instance _experimentalDataStorage that the optimizer is trying to solve.
It also sets the values of the prescribed coordinates and returns the initial guess for the unprescribed coordinates.
void IKTarget::printPerformance |
( |
double * |
x |
) |
[virtual] |
void IKTarget::printTasks |
( |
|
) |
const |
void OpenSim::IKTarget::setCurrentState |
( |
SimTK::State * |
state |
) |
[inline] |
Member Data Documentation
The documentation for this class was generated from the following files:
- OpenSim/Tools/IKTarget.h
- OpenSim/Tools/IKTarget.cpp