#include <PathActuator.h>
Public Member Functions | |
PathActuator () | |
Default constructor. | |
PathActuator (const PathActuator &aGenForce) | |
Copy constructor. | |
virtual | ~PathActuator () |
Destructor. | |
virtual Object * | copy () const |
Copy this actuator and return a pointer to the copy. | |
void | copyData (const PathActuator &aGenForce) |
Copy the member data of the specified actuator. | |
PathActuator & | operator= (const PathActuator &aGenForce) |
Assignment operator. | |
GeometryPath & | updGeometryPath () const |
const GeometryPath & | getGeometryPath () const |
virtual bool | hasGeometryPath () const |
return a flag indicating whether the Force is applied along a Path if you override this method to return true for a specific subclass, it must also implement the getGeometryPath() mathod | |
void | setOptimalForce (double aOptimalForce) |
Set the optimal force of the force. | |
double | getOptimalForce () const |
Get the optimal force of the force. | |
virtual double | getLength (const SimTK::State &s) const |
Get the length of the path actuator. | |
virtual double | getLengtheningSpeed (const SimTK::State &s) const |
Get the speed of actuator along its path. | |
virtual double | getStress (const SimTK::State &s) const |
Get the stress of the force. | |
void | addNewPathPoint (const std::string &proposedName, OpenSim::Body &aBody, const SimTK::Vec3 &aPositionOnBody) |
Note that this function does not maintain the State and so should be used only before a valid State is created. | |
virtual void | computeForce (const SimTK::State &state, SimTK::Vector_< SimTK::SpatialVec > &bodyForces, SimTK::Vector &mobilityForces) const |
Apply the actuator force along path wrapping over and connecting rigid bodies. | |
virtual double | computeActuation (const SimTK::State &s) const |
Compute all quantities necessary for applying the actuator force to the model. | |
virtual double | computeMomentArm (SimTK::State &s, Coordinate &aCoord) const |
Compute the moment-arm of this muscle about a coordinate. | |
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. | |
virtual void | preScale (const SimTK::State &s, const ScaleSet &aScaleSet) |
Perform computations that need to happen before the muscle is scaled. | |
virtual void | scale (const SimTK::State &s, const ScaleSet &aScaleSet) |
Scale the muscle based on XYZ scale factors for each body. | |
virtual void | postScale (const SimTK::State &s, const ScaleSet &aScaleSet) |
Perform computations that need to happen after the muscle is scaled. | |
virtual VisibleObject * | getDisplayer () const |
Get the visible object used to represent the muscle. | |
virtual void | updateDisplayer (const SimTK::State &s) |
Update the visible object used to represent the muscle. | |
OPENSIM_DECLARE_DERIVED (PathActuator, Actuator) | |
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 | |
PropertyObj | _pathProp |
the set of points defining the path of the muscle | |
GeometryPath & | _path |
PropertyDbl | _propOptimalForce |
Optimal force. | |
double & | _optimalForce |
PathActuator::PathActuator | ( | ) |
Default constructor.
PathActuator::PathActuator | ( | const PathActuator & | aPathActuator | ) |
Copy constructor.
aForce | Force to be copied. |
PathActuator::~PathActuator | ( | ) | [virtual] |
Destructor.
void PathActuator::addNewPathPoint | ( | const std::string & | proposedName, | |
OpenSim::Body & | aBody, | |||
const SimTK::Vec3 & | aPositionOnBody | |||
) |
Note that this function does not maintain the State and so should be used only before a valid State is created.
Add a Path point to the _path of the actuator.
The new point is appended to the end of the current path
double PathActuator::computeActuation | ( | const SimTK::State & | s | ) | const [virtual] |
Compute all quantities necessary for applying the actuator force to the model.
Implements OpenSim::Actuator_.
Reimplemented in OpenSim::ContDerivMuscle, OpenSim::Delp1990Muscle, OpenSim::RigidTendonMuscle, OpenSim::Schutte1993Muscle, OpenSim::Thelen2003Muscle, OpenSim::ActivationFiberLengthMuscle, and OpenSim::Muscle.
void PathActuator::computeForce | ( | const SimTK::State & | state, | |
SimTK::Vector_< SimTK::SpatialVec > & | bodyForces, | |||
SimTK::Vector & | mobilityForces | |||
) | const [virtual] |
Apply the actuator force along path wrapping over and connecting rigid bodies.
Reimplemented from OpenSim::Force.
Reimplemented in OpenSim::RigidTendonMuscle, OpenSim::ActivationFiberLengthMuscle, and OpenSim::Muscle.
double PathActuator::computeMomentArm | ( | SimTK::State & | s, | |
Coordinate & | aCoord | |||
) | const [virtual] |
Compute the moment-arm of this muscle about a coordinate.
Object * PathActuator::copy | ( | ) | const [virtual] |
Copy this actuator and return a pointer to the copy.
The copy constructor for this class is used.
Implements OpenSim::Actuator.
Reimplemented in OpenSim::ContDerivMuscle, OpenSim::Delp1990Muscle, OpenSim::RigidTendonMuscle, OpenSim::Schutte1993Muscle, OpenSim::Thelen2003Muscle, OpenSim::ActivationFiberLengthMuscle, and OpenSim::Muscle.
void PathActuator::copyData | ( | const PathActuator & | aGenForce | ) |
Copy the member data of the specified actuator.
Reimplemented from OpenSim::Force.
Reimplemented in OpenSim::ContDerivMuscle, OpenSim::Delp1990Muscle, OpenSim::RigidTendonMuscle, OpenSim::Schutte1993Muscle, OpenSim::Thelen2003Muscle, OpenSim::ActivationFiberLengthMuscle, and OpenSim::Muscle.
void PathActuator::createSystem | ( | SimTK::MultibodySystem & | system | ) | const [protected, virtual] |
Create underlying SimTK::Force.
Reimplemented from OpenSim::Actuator.
Reimplemented in OpenSim::ContDerivMuscle, OpenSim::Delp1990Muscle, OpenSim::RigidTendonMuscle, OpenSim::Schutte1993Muscle, OpenSim::Thelen2003Muscle, OpenSim::ActivationFiberLengthMuscle, and OpenSim::Muscle.
VisibleObject * PathActuator::getDisplayer | ( | ) | const [virtual] |
Get the visible object used to represent the muscle.
Reimplemented from OpenSim::Object.
const GeometryPath& OpenSim::PathActuator::getGeometryPath | ( | ) | const [inline] |
double PathActuator::getLength | ( | const SimTK::State & | s | ) | const [virtual] |
Get the length of the path actuator.
This is a convenience function that calls the underlying path object for its length.
double PathActuator::getLengtheningSpeed | ( | const SimTK::State & | s | ) | const [virtual] |
Get the speed of actuator along its path.
double PathActuator::getOptimalForce | ( | ) | const [virtual] |
OpenSim::Array< std::string > PathActuator::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.
Reimplemented in OpenSim::RigidTendonMuscle, OpenSim::ActivationFiberLengthMuscle, and OpenSim::Muscle.
OpenSim::Array< double > PathActuator::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.
Reimplemented in OpenSim::RigidTendonMuscle, OpenSim::ActivationFiberLengthMuscle, and OpenSim::Muscle.
double PathActuator::getStress | ( | const SimTK::State & | s | ) | const [virtual] |
Get the stress of the force.
Reimplemented from OpenSim::Actuator.
Reimplemented in OpenSim::ContDerivMuscle, and OpenSim::ActivationFiberLengthMuscle.
virtual bool OpenSim::PathActuator::hasGeometryPath | ( | ) | const [inline, virtual] |
return a flag indicating whether the Force is applied along a Path if you override this method to return true for a specific subclass, it must also implement the getGeometryPath() mathod
Reimplemented from OpenSim::Force.
OpenSim::PathActuator::OPENSIM_DECLARE_DERIVED | ( | PathActuator | , | |
Actuator | ||||
) |
PathActuator & PathActuator::operator= | ( | const PathActuator & | aPathActuator | ) |
Assignment operator.
Reimplemented from OpenSim::Actuator.
Reimplemented in OpenSim::ContDerivMuscle, OpenSim::Delp1990Muscle, OpenSim::RigidTendonMuscle, OpenSim::Schutte1993Muscle, OpenSim::Thelen2003Muscle, OpenSim::ActivationFiberLengthMuscle, and OpenSim::Muscle.
void PathActuator::postScale | ( | const SimTK::State & | s, | |
const ScaleSet & | aScaleSet | |||
) | [virtual] |
Perform computations that need to happen after the muscle is scaled.
For this object, that entails updating the muscle path. Derived classes should probably also scale or update some of the force-generating properties.
aScaleSet | XYZ scale factors for the bodies. |
Reimplemented in OpenSim::ActivationFiberLengthMuscle.
void PathActuator::preScale | ( | const SimTK::State & | s, | |
const ScaleSet & | aScaleSet | |||
) | [virtual] |
Perform computations that need to happen before the muscle is scaled.
For this object, that entails calculating and storing the muscle-tendon length in the current body position.
aScaleSet | XYZ scale factors for the bodies. |
void PathActuator::scale | ( | const SimTK::State & | s, | |
const ScaleSet & | aScaleSet | |||
) | [virtual] |
Scale the muscle based on XYZ scale factors for each body.
aScaleSet | XYZ scale factors for the bodies. |
void PathActuator::setOptimalForce | ( | double | aOptimalForce | ) |
Set the optimal force of the force.
aOptimalForce | Optimal force. |
void PathActuator::setup | ( | Model & | aModel | ) | [protected, virtual] |
Perform some setup functions that happen after the object has been deserialized or copied.
aModel | OpenSim model containing this PathActuator. |
Reimplemented from OpenSim::Actuator.
Reimplemented in OpenSim::ContDerivMuscle, OpenSim::Delp1990Muscle, OpenSim::RigidTendonMuscle, OpenSim::Schutte1993Muscle, OpenSim::Thelen2003Muscle, OpenSim::ActivationFiberLengthMuscle, and OpenSim::Muscle.
void PathActuator::updateDisplayer | ( | const SimTK::State & | s | ) | [virtual] |
Update the visible object used to represent the muscle.
Reimplemented from OpenSim::ModelComponent.
void PathActuator::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.
Reimplemented in OpenSim::RigidTendonMuscle, OpenSim::ActivationFiberLengthMuscle, and OpenSim::Muscle.
GeometryPath& OpenSim::PathActuator::updGeometryPath | ( | ) | const [inline] |
double& OpenSim::PathActuator::_optimalForce [protected] |
GeometryPath& OpenSim::PathActuator::_path [protected] |
PropertyObj OpenSim::PathActuator::_pathProp [protected] |
the set of points defining the path of the muscle
PropertyDbl OpenSim::PathActuator::_propOptimalForce [protected] |
Optimal force.