#include <LinearActuator.h>
Public Member Functions | |
LinearActuator (std::string aBodyNameA="", std::string abodyNameB="") | |
LinearActuator (const LinearActuator &aLinearActuator) | |
Copy constructor. | |
virtual | ~LinearActuator () |
Destructor. | |
virtual Object * | copy () const |
Copy this actuator and return a pointer to the copy. | |
void | copyData (const LinearActuator &aLinearActuator) |
Copy the member data of the specified actuator. | |
LinearActuator & | operator= (const LinearActuator &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 | 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 | 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 (LinearActuator, 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. |
OpenSim::LinearActuator::LinearActuator | ( | std::string | aBodyNameA = "" , |
|
std::string | abodyNameB = "" | |||
) |
LinearActuator::LinearActuator | ( | const LinearActuator & | anActuator | ) |
Copy constructor.
aForce | Force to be copied. |
LinearActuator::~LinearActuator | ( | ) | [virtual] |
Destructor.
bool LinearActuator::check | ( | ) | const [virtual] |
Check that this point actuator actuator is valid.
Reimplemented from OpenSim::Actuator.
double LinearActuator::computeActuation | ( | const SimTK::State & | s | ) | const [virtual] |
Compute all quantities necessary for applying the actuator force to the model.
Implements OpenSim::Actuator.
void LinearActuator::computeForce | ( | const SimTK::State & | s | ) | const [virtual] |
Apply the actuator force to BodyA and BodyB.
Implements OpenSim::CustomActuator.
Object * LinearActuator::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 LinearActuator::copyData | ( | const LinearActuator & | aLinearActuator | ) |
Copy the member data of the specified actuator.
Body * LinearActuator::getBodyA | ( | ) | const |
Body * LinearActuator::getBodyB | ( | ) | const |
double LinearActuator::getOptimalForce | ( | ) | const [virtual] |
SimTK::Vec3 OpenSim::LinearActuator::getPointA | ( | ) | const [inline] |
SimTK::Vec3 OpenSim::LinearActuator::getPointB | ( | ) | const [inline] |
bool OpenSim::LinearActuator::getPointsAreGlobal | ( | ) | [inline] |
OpenSim::Array< std::string > LinearActuator::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 > LinearActuator::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 LinearActuator::getStress | ( | const SimTK::State & | s | ) | const [virtual] |
void LinearActuator::initStateCache | ( | SimTK::State & | s, | |
SimTK::SubsystemIndex | subsystemIndex, | |||
Model & | model | |||
) | [virtual] |
Reimplemented from OpenSim::Actuator.
OpenSim::LinearActuator::OPENSIM_DECLARE_DERIVED | ( | LinearActuator | , | |
Actuator | ||||
) |
Reimplemented from OpenSim::CustomActuator.
LinearActuator & LinearActuator::operator= | ( | const LinearActuator & | aLinearActuator | ) |
Assignment operator.
Reimplemented from OpenSim::Actuator.
void LinearActuator::setBodyA | ( | Body * | aBody | ) |
void LinearActuator::setBodyB | ( | Body * | aBody | ) |
void LinearActuator::setOptimalForce | ( | double | aOptimalForce | ) |
Set the optimal force of the actuator.
aOptimalForce | Optimal force. |
void OpenSim::LinearActuator::setPointA | ( | SimTK::Vec3 | aPosition | ) | [inline] |
void OpenSim::LinearActuator::setPointB | ( | SimTK::Vec3 | aPosition | ) | [inline] |
void OpenSim::LinearActuator::setPointsAreGlobal | ( | bool | aBool | ) | [inline] |
void LinearActuator::setup | ( | Model & | aModel | ) | [virtual] |
setup sets the actual Body references _bodyA and _bodyB
Reimplemented from OpenSim::Actuator.
void LinearActuator::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.
Body* OpenSim::LinearActuator::_bodyA [protected] |
Corresponding Body to which the force actuator is applied.
Body* OpenSim::LinearActuator::_bodyB [protected] |
Corresponding Body to which the equal and force torque is applied.
std::string& OpenSim::LinearActuator::_bodyNameA [protected] |
std::string& OpenSim::LinearActuator::_bodyNameB [protected] |
double& OpenSim::LinearActuator::_optimalForce [protected] |
Optimal force.
SimTK::Vec3& OpenSim::LinearActuator::_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::LinearActuator::_pointB [protected] |
bool& OpenSim::LinearActuator::_pointsAreGlobal [protected] |
PropertyStr OpenSim::LinearActuator::_propBodyNameA [protected] |
PropertyStr OpenSim::LinearActuator::_propBodyNameB [protected] |
Name of Body to which the equal and opposite torque is applied.
Optimal force.
PropertyDblVec3 OpenSim::LinearActuator::_propPointA [protected] |
Point of application on each body.
PropertyDblVec3 OpenSim::LinearActuator::_propPointB [protected] |
bool to indicate whether or not the points are expressed in global frame