OpenSim::Actuator Class Reference

Derived class for an actuator (e.g., a torque motor, muscle, . More...

#include <Actuator.h>

Inheritance diagram for OpenSim::Actuator:
OpenSim::Actuator_ OpenSim::Force OpenSim::ModelComponent OpenSim::Object OpenSim::CoordinateActuator OpenSim::PathActuator OpenSim::PointActuator OpenSim::PointToPointActuator OpenSim::TorqueActuator OpenSim::Muscle OpenSim::ActivationFiberLengthMuscle OpenSim::RigidTendonMuscle OpenSim::ContDerivMuscle OpenSim::Delp1990Muscle OpenSim::Schutte1993Muscle OpenSim::Thelen2003Muscle

List of all members.

Public Member Functions

 Actuator ()
 Default constructor.
 Actuator (const Actuator &aActuator)
 Copy constructor.
virtual ~Actuator ()
 Destructor.
Actuatoroperator= (const Actuator &aActuator)
 Assignment operator.
virtual Objectcopy () const =0
 Construct and return a copy of this object.
virtual void updateFromXMLNode ()
 Override of the default implementation to account for versioning.
virtual double getControl (const SimTK::State &s) const
 Convenience method to set controls given scalar (double) valued control.
virtual int numControls () const
virtual void setForce (const SimTK::State &s, double aForce) const
virtual double getForce (const SimTK::State &s) const
virtual void setSpeed (const SimTK::State &s, double aspeed) const
virtual double getSpeed (const SimTK::State &s) const
virtual double getPower (const SimTK::State &s) const
virtual double getStress (const SimTK::State &s) const
 getStress needs to be overridden by derived classes to be usable
virtual double getOptimalForce () const
 getOptimalForce needs to be overridden by derived classes to be usable
void setMinControl (const double &aMinControl)
double getMinControl () const
void setMaxControl (const double &aMaxControl)
double getMaxControl () const
void overrideForce (SimTK::State &s, bool flag) const
 -------------------------------------------------------------------------- Overriding forces -------------------------------------------------------------------------- The force normally produced by an Actuator can be overriden and When the Actuator's force is overriden, the Actuator will by defualt produce a constant force which can be set with setOverrideForce().
bool isForceOverriden (const SimTK::State &s) const
 return Actuator's override status
void setOverrideForce (SimTK::State &s, double value) const
 set the force value used when the override is true
double getOverrideForce (const SimTK::State &s) const
 return override force
void setOverrideForceFunction (StateFunction *)
 set the function used to compute the override force
const StateFunctiongetOverrideForceFunction () const
 return a read only pointer to the function used to compute the override force
StateFunctionupdOverrideForceFunction ()
 return a writable pointer to the function used to compute the override force
void resetOverrideForceFunction ()
 set override force function back to default (constant)
 OPENSIM_DECLARE_DERIVED (Actuator, Force)

Protected Member Functions

virtual void setup (Model &aModel)
 Perform set up functions after model has been deserialized or copied.
virtual void createSystem (SimTK::MultibodySystem &system) const
 Default is to create a ForceAdapter which is a SimTK::Force::Custom as the udnerlying computational component.
virtual void initState (SimTK::State &state) const
 This is called after a SimTK System and State have been created for the Model.
virtual void setDefaultsFromState (const SimTK::State &state)
 Set all default values for this object to match those in a specified State.
double computeOverrideForce (const SimTK::State &s) const

Protected Attributes

int _numStateVariables
StateFunction_overrideForceFunction
PropertyDbl _propMinControl
 Bounds on control of this actuator.
PropertyDbl _propMaxControl
double & _minControl
double & _maxControl

Detailed Description

Derived class for an actuator (e.g., a torque motor, muscle, .

..) that requires excactly one external input (control) to generate a scalar value force, such as a torque/force magnitude or a tension.

Author:
Ajay Seth
Version:
2.0

Constructor & Destructor Documentation

Actuator::Actuator (  ) 

Default constructor.

Actuator::Actuator ( const Actuator aAct  ) 

Copy constructor.

Parameters:
aActuator Actuator to copy.
Actuator::~Actuator (  )  [virtual]

Destructor.


Member Function Documentation

double Actuator::computeOverrideForce ( const SimTK::State &  s  )  const [protected]
virtual Object* OpenSim::Actuator::copy (  )  const [pure virtual]

Construct and return a copy of this object.

The object is allocated using the new operator, so the caller is responsible for deleting the returned object.

Returns:
Copy of this object.

Implements OpenSim::Actuator_.

Implemented in OpenSim::ContDerivMuscle, OpenSim::CoordinateActuator, OpenSim::Delp1990Muscle, OpenSim::PointActuator, OpenSim::PointToPointActuator, OpenSim::RigidTendonMuscle, OpenSim::Schutte1993Muscle, OpenSim::Thelen2003Muscle, OpenSim::TorqueActuator, OpenSim::ActivationFiberLengthMuscle, OpenSim::Muscle, and OpenSim::PathActuator.

void Actuator::createSystem ( SimTK::MultibodySystem &  system  )  const [protected, virtual]

Default is to create a ForceAdapter which is a SimTK::Force::Custom as the udnerlying computational component.

Create an underlying SimTK::Force to represent the OpenSim::Force in the computational system.

Subclasses override to employ other SimTK::Forces.

Create a SimTK::Force::Custom by default.

Reimplemented from OpenSim::Actuator_.

Reimplemented in OpenSim::ContDerivMuscle, OpenSim::CoordinateActuator, OpenSim::Delp1990Muscle, OpenSim::RigidTendonMuscle, OpenSim::Schutte1993Muscle, OpenSim::Thelen2003Muscle, OpenSim::ActivationFiberLengthMuscle, OpenSim::Muscle, and OpenSim::PathActuator.

double Actuator::getControl ( const SimTK::State &  s  )  const [virtual]

Convenience method to set controls given scalar (double) valued control.

Convenience method to get control given scalar (double) valued control

virtual double OpenSim::Actuator::getForce ( const SimTK::State &  s  )  const [virtual]
double OpenSim::Actuator::getMaxControl (  )  const [inline]
double OpenSim::Actuator::getMinControl (  )  const [inline]
double Actuator::getOptimalForce (  )  const [virtual]

getOptimalForce needs to be overridden by derived classes to be usable

Reimplemented in OpenSim::CoordinateActuator, OpenSim::PointActuator, OpenSim::PointToPointActuator, OpenSim::TorqueActuator, and OpenSim::PathActuator.

double Actuator::getOverrideForce ( const SimTK::State &  s  )  const

return override force

const StateFunction * Actuator::getOverrideForceFunction (  )  const

return a read only pointer to the function used to compute the override force

virtual double OpenSim::Actuator::getPower ( const SimTK::State &  s  )  const [inline, virtual]
virtual double OpenSim::Actuator::getSpeed ( const SimTK::State &  s  )  const [virtual]

Reimplemented in OpenSim::CoordinateActuator.

double Actuator::getStress ( const SimTK::State &  s  )  const [virtual]
void Actuator::initState ( SimTK::State &  state  )  const [protected, virtual]

This is called after a SimTK System and State have been created for the Model.

It must be implementd to set initial values of state variables.

Parameters:
state the State to initialize

Reimplemented from OpenSim::Actuator_.

Reimplemented in OpenSim::RigidTendonMuscle, OpenSim::ActivationFiberLengthMuscle, and OpenSim::Muscle.

bool Actuator::isForceOverriden ( const SimTK::State &  s  )  const

return Actuator's override status

virtual int OpenSim::Actuator::numControls (  )  const [inline, virtual]

Implements OpenSim::Actuator_.

OpenSim::Actuator::OPENSIM_DECLARE_DERIVED ( Actuator  ,
Force   
)
Actuator & Actuator::operator= ( const Actuator aAct  ) 
void Actuator::overrideForce ( SimTK::State &  s,
bool  flag 
) const

-------------------------------------------------------------------------- Overriding forces -------------------------------------------------------------------------- The force normally produced by an Actuator can be overriden and When the Actuator's force is overriden, the Actuator will by defualt produce a constant force which can be set with setOverrideForce().

overrideForce sets flag indicating if an actuator's force compuation is overriden

If the override force is not a constant, setOverrideForceFunction() can be used supply a function which computes the Actuator's force. enable/disable an Actuator's override force

Parameters:
s current state
flag true = override Actuator's output force false = use Actuator's computed forc (normal operation)
void Actuator::resetOverrideForceFunction (  ) 

set override force function back to default (constant)

void Actuator::setDefaultsFromState ( const SimTK::State &  state  )  [protected, virtual]

Set all default values for this object to match those in a specified State.

It must be implemented/overriden to set any default values defined by each subclass.

Parameters:
state the State from which to take values that should become the defaults for this object

Reimplemented from OpenSim::Actuator_.

Reimplemented in OpenSim::RigidTendonMuscle, OpenSim::ActivationFiberLengthMuscle, and OpenSim::Muscle.

virtual void OpenSim::Actuator::setForce ( const SimTK::State &  s,
double  aForce 
) const [virtual]
void OpenSim::Actuator::setMaxControl ( const double &  aMaxControl  )  [inline]
void OpenSim::Actuator::setMinControl ( const double &  aMinControl  )  [inline]
void Actuator::setOverrideForce ( SimTK::State &  s,
double  value 
) const

set the force value used when the override is true

setOverrideForce sets the value used when an actuator's force compuation is orriden

Parameters:
s current state
value value of override force
void Actuator::setOverrideForceFunction ( StateFunction overrideFunc  ) 

set the function used to compute the override force

Parameters:
StateFunction pointer to object used to compute the force
virtual void OpenSim::Actuator::setSpeed ( const SimTK::State &  s,
double  aspeed 
) const [virtual]
void Actuator::setup ( Model aModel  )  [protected, virtual]
void Actuator::updateFromXMLNode (  )  [virtual]
StateFunction * Actuator::updOverrideForceFunction (  ) 

return a writable pointer to the function used to compute the override force


Member Data Documentation

double& OpenSim::Actuator::_maxControl [protected]
double& OpenSim::Actuator::_minControl [protected]

Bounds on control of this actuator.


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

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