OpenSim::LineActuator Class Reference

#include <LineActuator.h>

Inheritance diagram for OpenSim::LineActuator:
OpenSim::Actuator OpenSim::Actuator_ OpenSim::Force OpenSim::ModelComponent OpenSim::Object

List of all members.

Public Member Functions

 LineActuator (std::string aBodyNameA="", std::string abodyNameB="")
 LineActuator (const LineActuator &aLineActuator)
 Copy constructor.
virtual ~LineActuator ()
 Destructor.
virtual Objectcopy () const
 Copy this actuator and return a pointer to the copy.
void copyData (const LineActuator &aLineActuator)
 Copy the member data of the specified actuator.
LineActuatoroperator= (const LineActuator &aGenForce)
 Assignment operator.
void setBodyA (Body *aBody)
 Set the generalized Body to which the Body actuator is applied.
void setBodyB (Body *aBody)
 Set the generalized Body to which the equal and opposite Body actuation is applied.
BodygetBodyA () const
 Get the generalized Body to which the Body actuator is applied.
BodygetBodyB () const
 Get the generalized Body to which the equal and opposite Body actuation is applied.
void setPointA (SimTK::Vec3 aPosition)
SimTK::Vec3 getPointA () const
void setPointB (SimTK::Vec3 aPosition)
SimTK::Vec3 getPointB () const
void setPointsAreGlobal (bool aBool)
bool getPointsAreGlobal ()
void setOptimalForce (double aOptimalForce)
 Set the optimal force of the actuator.
double getOptimalForce () const
 Get the optimal force of the actuator.
double getStress (const SimTK::State &s) const
 Get the stress of the force.
virtual void computeForce (const SimTK::State &state, SimTK::Vector_< SimTK::SpatialVec > &bodyForces, SimTK::Vector &mobilityForces) const
 Apply the actuator force to BodyA and BodyB.
virtual double computeActuation (const SimTK::State &s) const
 Compute all quantities necessary for applying the actuator force to the model.
virtual bool check () const
 Check that this point actuator actuator is valid.
void setup (Model &aModel)
 setup sets the actual Body references _bodyA and _bodyB
virtual OpenSim::Array
< std::string > 
getRecordLabels () const
 Methods to query a Force for the value actually applied during simulation The names of the quantities (column labels) is returned by this first function getRecordLabels().
virtual OpenSim::Array< double > getRecordValues (const SimTK::State &state) const
 Given SimTK::State object extract all the values necessary to report forces, application location frame, etc.
virtual void updateFromXMLNode ()
 Update this object based on its XML node.
 OPENSIM_DECLARE_DERIVED (LineActuator, Actuator)

Protected Attributes

PropertyStr _propBodyNameA
 Name of Body to which the Body actuator is applied.
PropertyStr _propBodyNameB
 Name of Body to which the equal and opposite torque is applied.
PropertyDblVec3 _propPointA
 Point of application on each body.
PropertyDblVec3 _propPointB
PropertyBool _propPointsAreGlobal
 bool to indicate whether or not the points are expressed in global frame
PropertyDbl _propOptimalForce
 Optimal force.
std::string & _bodyNameA
std::string & _bodyNameB
SimTK::Vec3 & _pointA
 force points of application: assumed to be expressed in the frame of _bodyA and _bodyB unless _pointsAreGlobal is true.
SimTK::Vec3 & _pointB
bool & _pointsAreGlobal
double & _optimalForce
 Optimal force.
Body_bodyA
 Corresponding Body to which the force actuator is applied.
Body_bodyB
 Corresponding Body to which the equal and force torque is applied.

Constructor & Destructor Documentation

OpenSim::LineActuator::LineActuator ( std::string  aBodyNameA = "",
std::string  abodyNameB = "" 
)
LineActuator::LineActuator ( const LineActuator anActuator  ) 

Copy constructor.

Parameters:
anActuator actuator to be copied.
LineActuator::~LineActuator (  )  [virtual]

Destructor.


Member Function Documentation

bool LineActuator::check (  )  const [virtual]

Check that this point actuator actuator is valid.

Returns:
True if valid, false if invalid.
double LineActuator::computeActuation ( const SimTK::State &  s  )  const [virtual]

Compute all quantities necessary for applying the actuator force to the model.

Parameters:
s current SimTK::State

Implements OpenSim::Actuator_.

void LineActuator::computeForce ( const SimTK::State &  s,
SimTK::Vector_< SimTK::SpatialVec > &  bodyForces,
SimTK::Vector &  generalizedForces 
) const [virtual]

Apply the actuator force to BodyA and BodyB.

Parameters:
s current SimTK::State

Reimplemented from OpenSim::Force.

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

Copy this actuator and return a pointer to the copy.

The copy constructor for this class is used.

Returns:
Pointer to a copy of this actuator.

Implements OpenSim::Actuator.

void LineActuator::copyData ( const LineActuator aLineActuator  ) 

Copy the member data of the specified actuator.

Parameters:
aLineActuator LineActuator providing the data to be copied

Reimplemented from OpenSim::Force.

Body * LineActuator::getBodyA (  )  const

Get the generalized Body to which the Body actuator is applied.

Returns:
Pointer to the Body
Body * LineActuator::getBodyB (  )  const

Get the generalized Body to which the equal and opposite Body actuation is applied.

Returns:
Pointer to the Body
double LineActuator::getOptimalForce (  )  const [virtual]

Get the optimal force of the actuator.

Returns:
Optimal force.

Reimplemented from OpenSim::Actuator.

SimTK::Vec3 OpenSim::LineActuator::getPointA (  )  const [inline]
SimTK::Vec3 OpenSim::LineActuator::getPointB (  )  const [inline]
bool OpenSim::LineActuator::getPointsAreGlobal (  )  [inline]
OpenSim::Array< std::string > LineActuator::getRecordLabels (  )  const [virtual]

Methods to query a Force for the value actually applied during simulation The names of the quantities (column labels) is returned by this first function getRecordLabels().

Reimplemented from OpenSim::Force.

OpenSim::Array< double > LineActuator::getRecordValues ( const SimTK::State &  state  )  const [virtual]

Given SimTK::State object extract all the values necessary to report forces, application location frame, etc.

used in conjunction with getRecordLabels and should return same size Array

Reimplemented from OpenSim::Force.

double LineActuator::getStress ( const SimTK::State &  s  )  const [virtual]

Get the stress of the force.

Returns:
Stress.

Reimplemented from OpenSim::Actuator.

OpenSim::LineActuator::OPENSIM_DECLARE_DERIVED ( LineActuator  ,
Actuator   
)
LineActuator & LineActuator::operator= ( const LineActuator aLineActuator  ) 

Assignment operator.

Returns:
aBodyID ID (or number, or index) of the generalized Body.

Reimplemented from OpenSim::Actuator.

void LineActuator::setBodyA ( Body aBody  ) 

Set the generalized Body to which the Body actuator is applied.

Parameters:
aBody Pointer to the generalized Body.
void LineActuator::setBodyB ( Body aBody  ) 

Set the generalized Body to which the equal and opposite Body actuation is applied.

Parameters:
aBody Pointer to the generalized Body.
void LineActuator::setOptimalForce ( double  aOptimalForce  ) 

Set the optimal force of the actuator.

Parameters:
aOptimalForce Optimal force.
void OpenSim::LineActuator::setPointA ( SimTK::Vec3  aPosition  )  [inline]
void OpenSim::LineActuator::setPointB ( SimTK::Vec3  aPosition  )  [inline]
void OpenSim::LineActuator::setPointsAreGlobal ( bool  aBool  )  [inline]
void LineActuator::setup ( Model aModel  )  [virtual]

setup sets the actual Body references _bodyA and _bodyB

Reimplemented from OpenSim::Actuator.

void LineActuator::updateFromXMLNode (  )  [virtual]

Update this object based on its XML node.

This method simply calls Object::updateFromXMLNode() and then calls a few methods in this class to ensure that variable members have been set in a consistent manner.

Reimplemented from OpenSim::Actuator.


Member Data Documentation

Corresponding Body to which the force actuator is applied.

Corresponding Body to which the equal and force torque is applied.

std::string& OpenSim::LineActuator::_bodyNameA [protected]
std::string& OpenSim::LineActuator::_bodyNameB [protected]

Optimal force.

SimTK::Vec3& OpenSim::LineActuator::_pointA [protected]

force points of application: assumed to be expressed in the frame of _bodyA and _bodyB unless _pointsAreGlobal is true.

If _pointsAreGlobal is true, _pointA and _pointB are assumed to be expressed in the ground body

SimTK::Vec3& OpenSim::LineActuator::_pointB [protected]

Name of Body to which the Body actuator is applied.

Name of Body to which the equal and opposite torque is applied.

Optimal force.

Point of application on each body.

bool to indicate whether or not the points are expressed in global frame


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

Generated on Sat Jun 18 13:15:51 2011 for OpenSim by  doxygen 1.6.1