#include <TorqueActuator.h>
Public Member Functions | |
TorqueActuator (std::string aBodyNameA="", std::string abodyNameB="") | |
TorqueActuator (const TorqueActuator &aTorqueActuator) | |
Copy constructor. | |
virtual | ~TorqueActuator () |
Destructor. | |
virtual Object * | copy () const |
Copy this actuator and return a pointer to the copy. | |
void | copyData (const TorqueActuator &aTorqueActuator) |
Copy the member data of the specified actuator. | |
TorqueActuator & | operator= (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. | |
Body * | getBodyA () const |
Get the generalized Body to which the Body actuator is applied. | |
Body * | getBodyB () 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 | initStateCache (SimTK::State &s, SimTK::SubsystemIndex subsystemIndex, Model &model) |
virtual void | computeForce (const SimTK::State &s) 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. |
OpenSim::TorqueActuator::TorqueActuator | ( | std::string | aBodyNameA = "" , |
|
std::string | abodyNameB = "" | |||
) |
TorqueActuator::TorqueActuator | ( | const TorqueActuator & | anActuator | ) |
Copy constructor.
aForce | Force to be copied. |
TorqueActuator::~TorqueActuator | ( | ) | [virtual] |
Destructor.
bool TorqueActuator::check | ( | ) | const [virtual] |
Check that this point actuator actuator is valid.
Reimplemented from OpenSim::Actuator.
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 & | s | ) | const [virtual] |
Apply the actuator force to BodyA and BodyB.
Implements OpenSim::CustomActuator.
Object * TorqueActuator::copy | ( | ) | const [virtual] |
Copy this actuator and return a pointer to the copy.
The copy constructor for this class is used.
Implements OpenSim::Actuator.
void TorqueActuator::copyData | ( | const TorqueActuator & | aTorqueActuator | ) |
Copy the member data of the specified actuator.
SimTK::Vec3 OpenSim::TorqueActuator::getAxis | ( | ) | const [inline] |
Body * TorqueActuator::getBodyA | ( | ) | const |
Body * TorqueActuator::getBodyB | ( | ) | const |
double TorqueActuator::getOptimalForce | ( | ) | const [virtual] |
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] |
bool OpenSim::TorqueActuator::getTorqueIsGlobal | ( | ) | [inline] |
void TorqueActuator::initStateCache | ( | SimTK::State & | s, | |
SimTK::SubsystemIndex | subsystemIndex, | |||
Model & | model | |||
) | [virtual] |
Reimplemented from OpenSim::Actuator.
OpenSim::TorqueActuator::OPENSIM_DECLARE_DERIVED | ( | TorqueActuator | , | |
Actuator | ||||
) |
Reimplemented from OpenSim::CustomActuator.
TorqueActuator & TorqueActuator::operator= | ( | const TorqueActuator & | aTorqueActuator | ) |
Assignment operator.
Reimplemented from OpenSim::Actuator.
void OpenSim::TorqueActuator::setAxis | ( | SimTK::Vec3 | anAxis | ) | [inline] |
void TorqueActuator::setBodyA | ( | Body * | aBody | ) |
void TorqueActuator::setBodyB | ( | Body * | aBody | ) |
void TorqueActuator::setOptimalForce | ( | double | aOptimalForce | ) |
Set the optimal force of the force.
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::Object.
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
Body* OpenSim::TorqueActuator::_bodyA [protected] |
Corresponding Body to which the torque actuator is applied.
Body* OpenSim::TorqueActuator::_bodyB [protected] |
Corresponding Body to which the equal and opposite torque is applied.
std::string& OpenSim::TorqueActuator::_bodyNameA [protected] |
std::string& OpenSim::TorqueActuator::_bodyNameB [protected] |
double& OpenSim::TorqueActuator::_optimalForce [protected] |
PropertyDblVec3 OpenSim::TorqueActuator::_propAxis [protected] |
Direction.
PropertyStr OpenSim::TorqueActuator::_propBodyNameA [protected] |
PropertyStr OpenSim::TorqueActuator::_propBodyNameB [protected] |
Name of Body to which the equal and opposite torque is applied.
Optimal force.
bool& OpenSim::TorqueActuator::_torqueIsGlobal [protected] |