OpenSim::CoordinateActuator Class Reference

#include <CoordinateActuator.h>

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

List of all members.

Public Member Functions

 CoordinateActuator (std::string aCoordinateName="")
 CoordinateActuator (const CoordinateActuator &aGenForce)
 Copy constructor.
virtual ~CoordinateActuator ()
 Destructor.
virtual Objectcopy () const
 Copy this actuator and return a pointer to the copy.
void copyData (const CoordinateActuator &aGenForce)
 Copy the member data of the specified actuator.
CoordinateActuatoroperator= (const CoordinateActuator &aGenForce)
 Assignment operator.
void setCoordinate (Coordinate *aCoordinate)
 Set the generalized coordinate to which the coordinate actuator is applied.
CoordinategetCoordinate () const
 Get the generalized coordinate to which the coordinate actuator is applied.
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 coordinate actuator actuator is valid.
virtual bool isCoordinateValid () const
 Is the.
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 double getSpeed (const SimTK::State &s) const
 For a CooridnateActuator, the speed is really the speed of the coordinate underneath it this overrides the default behavior (bug ).
virtual void updateFromXMLNode ()
 Update this object based on its XML node.
 OPENSIM_DECLARE_DERIVED (CoordinateActuator, Actuator)

Static Public Member Functions

static ForceSetCreateForceSetOfCoordinateActuatorsForModel (const SimTK::State &s, Model &aModel, double aOptimalForce=1, bool aIncludeLockedAndConstrainedCoordinates=true)

Protected Member Functions

virtual void setup (Model &aModel)
 Perform some setup functions that happen after the object has been deserialized or copied.
virtual void createSystem (SimTK::MultibodySystem &system) const
 Create underlying SimTK::Force.

Protected Attributes

PropertyStr _propCoordinateName
 Name of coordinate to which the coordinate actuator is applied.
PropertyDbl _propOptimalForce
 Optimal force.
std::string & _coordName
double & _optimalForce
Coordinate_coord
 Corresponding generalized coordinate to which the coordinate actuator is applied.

Constructor & Destructor Documentation

OpenSim::CoordinateActuator::CoordinateActuator ( std::string  aCoordinateName = ""  ) 
CoordinateActuator::CoordinateActuator ( const CoordinateActuator aGenForce  ) 

Copy constructor.

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

Destructor.


Member Function Documentation

bool CoordinateActuator::check (  )  const [virtual]

Check that this coordinate actuator actuator is valid.

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

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

Implements OpenSim::Actuator_.

void CoordinateActuator::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 * CoordinateActuator::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 CoordinateActuator::copyData ( const CoordinateActuator aGenForce  ) 

Copy the member data of the specified actuator.

Reimplemented from OpenSim::Force.

ForceSet * CoordinateActuator::CreateForceSetOfCoordinateActuatorsForModel ( const SimTK::State &  s,
Model aModel,
double  aOptimalForce = 1,
bool  aIncludeLockedAndConstrainedCoordinates = true 
) [static]
void CoordinateActuator::createSystem ( SimTK::MultibodySystem &  system  )  const [protected, virtual]

Create underlying SimTK::Force.

Reimplemented from OpenSim::Actuator.

Coordinate * CoordinateActuator::getCoordinate (  )  const

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

Returns:
Pointer to the coordinate
double CoordinateActuator::getOptimalForce (  )  const [virtual]

Get the optimal force of the force.

Returns:
Optimal force.

Reimplemented from OpenSim::Actuator.

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

For a CooridnateActuator, the speed is really the speed of the coordinate underneath it this overrides the default behavior (bug ).

Reimplemented from OpenSim::Actuator.

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

Get the stress of the force.

Returns:
Stress.

Reimplemented from OpenSim::Actuator.

bool CoordinateActuator::isCoordinateValid (  )  const [virtual]

Is the.

OpenSim::CoordinateActuator::OPENSIM_DECLARE_DERIVED ( CoordinateActuator  ,
Actuator   
)
CoordinateActuator & CoordinateActuator::operator= ( const CoordinateActuator aGenForce  ) 

Assignment operator.

Returns:
aCoordinateID ID (or number, or index) of the generalized coordinate.

Reimplemented from OpenSim::Actuator.

void CoordinateActuator::setCoordinate ( Coordinate aCoordinate  ) 

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

Parameters:
aCoordinate Pointer to the generalized coordinate.
void CoordinateActuator::setOptimalForce ( double  aOptimalForce  ) 

Set the optimal force of the force.

Parameters:
aOptimalForce Optimal force.
void CoordinateActuator::setup ( Model aModel  )  [protected, virtual]

Perform some setup functions that happen after the object has been deserialized or copied.

Parameters:
aModel OpenSim model containing this CoordinateActuator.

Reimplemented from OpenSim::Actuator.

void CoordinateActuator::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 generalized coordinate to which the coordinate actuator is applied.

std::string& OpenSim::CoordinateActuator::_coordName [protected]

Name of coordinate to which the coordinate actuator is applied.

Optimal force.


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

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