#include <CoordinateActuator.h>
Public Member Functions | |
CoordinateActuator (std::string aCoordinateName="") | |
CoordinateActuator (const CoordinateActuator &aGenForce) | |
Copy constructor. | |
virtual | ~CoordinateActuator () |
Destructor. | |
virtual Object * | copy () const |
Copy this actuator and return a pointer to the copy. | |
void | copyData (const CoordinateActuator &aGenForce) |
Copy the member data of the specified actuator. | |
CoordinateActuator & | operator= (const CoordinateActuator &aGenForce) |
Assignment operator. | |
void | setCoordinate (Coordinate *aCoordinate) |
Set the generalized coordinate to which the coordinate actuator is applied. | |
Coordinate * | getCoordinate () 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 ForceSet * | CreateForceSetOfCoordinateActuatorsForModel (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. |
OpenSim::CoordinateActuator::CoordinateActuator | ( | std::string | aCoordinateName = "" |
) |
CoordinateActuator::CoordinateActuator | ( | const CoordinateActuator & | aGenForce | ) |
Copy constructor.
aForce | Force to be copied. |
CoordinateActuator::~CoordinateActuator | ( | ) | [virtual] |
Destructor.
bool CoordinateActuator::check | ( | ) | const [virtual] |
Check that this coordinate actuator actuator is valid.
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.
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.
double CoordinateActuator::getOptimalForce | ( | ) | const [virtual] |
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] |
bool CoordinateActuator::isCoordinateValid | ( | ) | const [virtual] |
Is the.
OpenSim::CoordinateActuator::OPENSIM_DECLARE_DERIVED | ( | CoordinateActuator | , | |
Actuator | ||||
) |
CoordinateActuator & CoordinateActuator::operator= | ( | const CoordinateActuator & | aGenForce | ) |
Assignment operator.
Reimplemented from OpenSim::Actuator.
void CoordinateActuator::setCoordinate | ( | Coordinate * | aCoordinate | ) |
Set the generalized coordinate to which the coordinate actuator is applied.
aCoordinate | Pointer to the generalized coordinate. |
void CoordinateActuator::setOptimalForce | ( | double | aOptimalForce | ) |
Set the optimal force of the force.
aOptimalForce | Optimal force. |
void CoordinateActuator::setup | ( | Model & | aModel | ) | [protected, virtual] |
Perform some setup functions that happen after the object has been deserialized or copied.
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.
Coordinate* OpenSim::CoordinateActuator::_coord [mutable, protected] |
Corresponding generalized coordinate to which the coordinate actuator is applied.
std::string& OpenSim::CoordinateActuator::_coordName [protected] |
double& OpenSim::CoordinateActuator::_optimalForce [protected] |
Name of coordinate to which the coordinate actuator is applied.
Optimal force.