OpenSim::ExternalLoads Class Reference

A convenience class for managing ExternaForce(s) to be applied to a model. More...

#include <ExternalLoads.h>

Inheritance diagram for OpenSim::ExternalLoads:
OpenSim::ModelComponentSet< ExternalForce > OpenSim::Set< ExternalForce > OpenSim::Object

List of all members.

Public Member Functions

 ExternalLoads ()
 Default constructor.
 ExternalLoads (Model &model)
 ExternalLoads (Model &model, const std::string &aFileName, bool aUpdateFromXMLNode=true) SWIG_DECLARE_EXCEPTION
 Construct an actuator set from file.
 ExternalLoads (const ExternalLoads &aExternalLoads)
 Copy constructor.
virtual ~ExternalLoads ()
 Destructor.
virtual Objectcopy () const
 Copy this ExternalLoads and return a pointer to the copy.
void copyData (const ExternalLoads &otherExternalLoads)
 Copy the member variables of the ExternalLoads.
virtual void updateFromXMLNode ()
 Override of the default implementation to account for versioning.
virtual void setup (Model &aModel)
 Set the Model this object is part of.
const ModelgetModel () const
 Get this Model this set is part of.
const std::string & getDataFileName () const
void setDataFileName (const std::string &aNewFile)
const std::string & getExternalLoadsModelKinematicsFileName () const
void setExternalLoadsModelKinematicsFileName (const std::string &aFileName)
double getLowpassCutoffFrequencyForLoadKinematics () const
void setLowpassCutoffFrequencyForLoadKinematics (double aLowpassCutoffFrequency)
void transformPointsExpressedInGroundToAppliedBodies (const Storage &kinematics, double startTime=-SimTK::Infinity, double endTime=SimTK::Infinity)
 Re-express the position of the point of application for all ExternalForces in this collection of ExternalLoads, such that all points expressed in ground are transformed (re-expressed) in the appliedToBody of the External- Force.
ExternalForcetransformPointExpressedInGroundToAppliedBody (const ExternalForce &exForce, const Storage &kinematics, double startTime, double endTime)
ExternalLoadsoperator= (const ExternalLoads &otherExternalLoads)
 Assignment operator.

Protected Attributes

PropertyStr _dataFileNameProp
 Data source for all forces in this ExternalLoads, where individual external forces identify which subsets of the data they will acceess.
std::string & _dataFileName
OpenSim::PropertyStr _externalLoadsModelKinematicsFileNameProp
 Name of the file containing the model kinematics corresponding to the external loads.
std::string & _externalLoadsModelKinematicsFileName
OpenSim::PropertyDbl _lowpassCutoffFrequencyForLoadKinematicsProp
 Low-pass cut-off frequency for filtering the model kinematics corresponding to the external loads.
double & _lowpassCutoffFrequencyForLoadKinematics

Detailed Description

A convenience class for managing ExternaForce(s) to be applied to a model.

This includes creating instances and manipulating the data source of inividual ExternalForces so that they satsify conditions imposed by particular Tools. For example, ForwardTool, CMC/RRA, achieve better tracking (slower divergence) if the ground reaction forces are applied to a point that is expressed in the foot frame according to "ideal" kinematics. ExternalLoads provides convenience methdods to perform this "mapping" which is beyong the scope of an individual ExternalForce, but is too much detail to have each Tool implement.

An indiviudal ExternalForce has a property for its data source name, but under the management of ExternalLoads, the data source identified by ExternalLoads is used to set the data source on each ExternalForce. If multiple data sources are required for different groups of external forces then use multiple ExternalLoads.

Authors:
Ajay Seth, Ayman Habib
Version:
1.0

Constructor & Destructor Documentation

ExternalLoads::ExternalLoads (  ) 

Default constructor.

ExternalLoads::ExternalLoads ( Model model  ) 
ExternalLoads::ExternalLoads ( Model model,
const std::string &  aFileName,
bool  aUpdateFromXMLNode = true 
)

Construct an actuator set from file.

Parameters:
aFileName Name of the file.
ExternalLoads::ExternalLoads ( const ExternalLoads otherExternalLoads  ) 

Copy constructor.

Parameters:
otherExternalLoads ExternalLoads to be copied.
ExternalLoads::~ExternalLoads (  )  [virtual]

Destructor.


Member Function Documentation

Object * ExternalLoads::copy (  )  const [virtual]

Copy this ExternalLoads and return a pointer to the copy.

The copy constructor for this class is used.

Returns:
Pointer to a copy of this ExternalLoads.

Reimplemented from OpenSim::ModelComponentSet< ExternalForce >.

void ExternalLoads::copyData ( const ExternalLoads aAbsExternalLoads  ) 

Copy the member variables of the ExternalLoads.

Parameters:
otherExternalLoads actuator set to be copied
const std::string& OpenSim::ExternalLoads::getDataFileName (  )  const [inline]
const std::string& OpenSim::ExternalLoads::getExternalLoadsModelKinematicsFileName (  )  const [inline]
double OpenSim::ExternalLoads::getLowpassCutoffFrequencyForLoadKinematics (  )  const [inline]
const Model& OpenSim::ExternalLoads::getModel (  )  const [inline]

Get this Model this set is part of.

Reimplemented from OpenSim::ModelComponentSet< ExternalForce >.

ExternalLoads & ExternalLoads::operator= ( const ExternalLoads otherExternalLoads  ) 

Assignment operator.

Returns:
Reference to this object.

Reimplemented from OpenSim::Object.

void OpenSim::ExternalLoads::setDataFileName ( const std::string &  aNewFile  )  [inline]
void OpenSim::ExternalLoads::setExternalLoadsModelKinematicsFileName ( const std::string &  aFileName  )  [inline]
void OpenSim::ExternalLoads::setLowpassCutoffFrequencyForLoadKinematics ( double  aLowpassCutoffFrequency  )  [inline]
void ExternalLoads::setup ( Model model  )  [virtual]

Set the Model this object is part of.

Reimplemented from OpenSim::ModelComponentSet< ExternalForce >.

ExternalForce * ExternalLoads::transformPointExpressedInGroundToAppliedBody ( const ExternalForce exForce,
const Storage kinematics,
double  startTime,
double  endTime 
)
void ExternalLoads::transformPointsExpressedInGroundToAppliedBodies ( const Storage kinematics,
double  startTime = -SimTK::Infinity,
double  endTime = SimTK::Infinity 
)

Re-express the position of the point of application for all ExternalForces in this collection of ExternalLoads, such that all points expressed in ground are transformed (re-expressed) in the appliedToBody of the External- Force.

The pointExpressedInBody is correspondingly updated to be the appliedToBody as well. Note: If the point is not expressed in ground to begin with, it is not re-expressed. If the ExternalForce does not specify a point of application (body force or torque) it remains untouched.

Parameters:
kinematics Storage containing the time history of generalized coordinates for the model. Note that all generalized coordinates must be specified and in radians and Euler parameters.
void ExternalLoads::updateFromXMLNode (  )  [virtual]

Override of the default implementation to account for versioning.

Reimplemented from OpenSim::Object.


Member Data Documentation

std::string& OpenSim::ExternalLoads::_dataFileName [protected]

Data source for all forces in this ExternalLoads, where individual external forces identify which subsets of the data they will acceess.

Name of the file containing the model kinematics corresponding to the external loads.

Low-pass cut-off frequency for filtering the model kinematics corresponding to the external loads.

A negative value results in no filtering. The default value is -1.0, so no filtering.


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

Generated on Sun Sep 25 00:19:57 2011 for OpenSim by  doxygen 1.6.1