OpenSim::TorqueActuator Class Reference

#include <TorqueActuator.h>

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

List of all members.

Public Member Functions

 TorqueActuator (std::string aBodyNameA="", std::string abodyNameB="")
 TorqueActuator (const TorqueActuator &aTorqueActuator)
 Copy constructor.
virtual ~TorqueActuator ()
 Destructor.
virtual Objectcopy () const
 Copy this actuator and return a pointer to the copy.
void copyData (const TorqueActuator &aTorqueActuator)
 Copy the member data of the specified actuator.
TorqueActuatoroperator= (const TorqueActuator &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 setAxis (SimTK::Vec3 anAxis)
SimTK::Vec3 getAxis () const
void setTorqueIsGlobal (bool aBool)
bool getTorqueIsGlobal ()
void setOptimalForce (double aOptimalForce)
 Set the optimal force of the force.
double getOptimalForce () const
 Get the optimal force of the force.
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 (TorqueActuator, 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 _propAxis
 Direction.
PropertyBool _propTorqueIsGlobal
PropertyDbl _propOptimalForce
 Optimal force.
std::string & _bodyNameA
std::string & _bodyNameB
SimTK::Vec3 & _axis
 force direction: _axis is assumed to be expressed in the frame of _bodyA unless _torqueIsGlobal is true.
bool & _torqueIsGlobal
double & _optimalForce
Body_bodyA
 Corresponding Body to which the torque actuator is applied.
Body_bodyB
 Corresponding Body to which the equal and opposite torque is applied.

Constructor & Destructor Documentation

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

Copy constructor.

Parameters:
aForce Force to be copied.
TorqueActuator::~TorqueActuator (  )  [virtual]

Destructor.


Member Function Documentation

bool TorqueActuator::check (  )  const [virtual]

Check that this point actuator actuator is valid.

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

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

Implements OpenSim::Actuator_.

void TorqueActuator::computeForce ( const SimTK::State &  state,
SimTK::Vector_< SimTK::SpatialVec > &  bodyForces,
SimTK::Vector &  mobilityForces 
) const [virtual]

Apply the actuator force to BodyA and BodyB.

Reimplemented from OpenSim::Force.

Object * TorqueActuator::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 TorqueActuator::copyData ( const TorqueActuator aTorqueActuator  ) 

Copy the member data of the specified actuator.

Reimplemented from OpenSim::Force.

SimTK::Vec3 OpenSim::TorqueActuator::getAxis (  )  const [inline]
Body * TorqueActuator::getBodyA (  )  const

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

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

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

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

Get the optimal force of the force.

Returns:
Optimal force.

Reimplemented from OpenSim::Actuator.

OpenSim::Array< std::string > TorqueActuator::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 > TorqueActuator::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 TorqueActuator::getStress ( const SimTK::State &  s  )  const [virtual]

Get the stress of the force.

Returns:
Stress.

Reimplemented from OpenSim::Actuator.

bool OpenSim::TorqueActuator::getTorqueIsGlobal (  )  [inline]
OpenSim::TorqueActuator::OPENSIM_DECLARE_DERIVED ( TorqueActuator  ,
Actuator   
)
TorqueActuator & TorqueActuator::operator= ( const TorqueActuator aTorqueActuator  ) 

Assignment operator.

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

Reimplemented from OpenSim::Actuator.

void OpenSim::TorqueActuator::setAxis ( SimTK::Vec3  anAxis  )  [inline]
void TorqueActuator::setBodyA ( Body aBody  ) 

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

Parameters:
aBody Pointer to the generalized Body.
void TorqueActuator::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 TorqueActuator::setOptimalForce ( double  aOptimalForce  ) 

Set the optimal force of the force.

Parameters:
aOptimalForce Optimal force.
void OpenSim::TorqueActuator::setTorqueIsGlobal ( bool  aBool  )  [inline]
void TorqueActuator::setup ( Model aModel  )  [virtual]

setup sets the actual Body references _bodyA and _bodyB

Reimplemented from OpenSim::Actuator.

void TorqueActuator::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

SimTK::Vec3& OpenSim::TorqueActuator::_axis [protected]

force direction: _axis is assumed to be expressed in the frame of _bodyA unless _torqueIsGlobal is true.

If _torqueIsGlobal is true, _axis is assumed to be expressed in the ground body

Corresponding Body to which the torque actuator is applied.

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

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

Direction.

Name of Body to which the Body actuator is applied.

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

Optimal force.


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

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