#include <CoordinateLimitForce.h>
Public Member Functions | |
CoordinateLimitForce () | |
Default constructor. | |
CoordinateLimitForce (const std::string &coordName, double q_upper, double K_upper, double q_lower, double K_lower, double damping, double dq) | |
Generate a force that acts to limit the range of motion of a coordinate Force experienced at upper and lower limits of the coordinate (q) value is according to a linear siffneses K_upper and K_lower, with a C2 continuos transition from 0 to K. | |
CoordinateLimitForce (const CoordinateLimitForce &aForce) | |
Copy constructor. | |
virtual | ~CoordinateLimitForce () |
Destructor. | |
virtual Object * | copy () const |
Copy this actuator and return a pointer to the copy. | |
CoordinateLimitForce & | operator= (const CoordinateLimitForce &aForce) |
Assignment operator. | |
void | setUpperStiffness (double aUpperStiffness) |
Set the parameters. | |
double | getUpperStiffness () const |
Get the parameters. | |
void | setUpperLimit (double aUpperLimit) |
double | getUpperLimit () const |
void | setLowerStiffness (double aLowerStiffness) |
double | getLowerStiffness () const |
void | setLowerLimit (double aLowerLimit) |
double | getLowerLimit () const |
void | setOffset (double aOffset) |
double | getOffset () const |
void | setDamping (double aDamping) |
double | getDamping () const |
void | setTransition (double aTransition) |
virtual void | computeForce (const SimTK::State &s, SimTK::Vector_< SimTK::SpatialVec > &bodyForces, SimTK::Vector &mobilityForces) const |
Compute and apply the mobility force corrsponding to the passive limit force. | |
double | calcLimitForce (const SimTK::State &s) const |
virtual 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 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 | setup (Model &aModel) |
Perform some setup functions that happen after the object has been deserialized or copied. | |
OPENSIM_DECLARE_DERIVED (CoordinateLimitForce, Force) | |
Protected Attributes | |
PropertyStr | _propCoordinateName |
Name of coordinate to which the coordinate actuator is applied. | |
std::string & | _coordName |
PropertyDbl | _propUpperStiffness |
Stiffness of the limiting force beyond the transition region. | |
double & | _upperStiffness |
PropertyDbl | _propUpperLimit |
double & | _upperLimit |
PropertyDbl | _propLowerStiffness |
double & | _lowerStiffness |
PropertyDbl | _propLowerLimit |
double & | _lowerLimit |
PropertyDbl | _propDamping |
Damping parameter. | |
double & | _damping |
PropertyDbl | _propTransition |
The width of the nonlinear transition region. | |
double & | _transition |
Coordinate * | _coord |
Corresponding generalized coordinate to which the coordinate actuator is applied. |
CoordinateLimitForce::CoordinateLimitForce | ( | ) |
Default constructor.
OpenSim::CoordinateLimitForce::CoordinateLimitForce | ( | const std::string & | coordName, | |
double | q_upper, | |||
double | K_upper, | |||
double | q_lower, | |||
double | K_lower, | |||
double | damping, | |||
double | dq | |||
) |
Generate a force that acts to limit the range of motion of a coordinate Force experienced at upper and lower limits of the coordinate (q) value is according to a linear siffneses K_upper and K_lower, with a C2 continuos transition from 0 to K.
The transition parameter (dq) defines how far beyond the limit the stiffness becomes purely linear. The integrator will like smoother (i.e. larger transition regions).
CoordinateLimitForce::CoordinateLimitForce | ( | const CoordinateLimitForce & | aForce | ) |
Copy constructor.
aForce | Actuator to be copied. |
CoordinateLimitForce::~CoordinateLimitForce | ( | ) | [virtual] |
Destructor.
double CoordinateLimitForce::calcLimitForce | ( | const SimTK::State & | s | ) | const |
void CoordinateLimitForce::computeForce | ( | const SimTK::State & | s, | |
SimTK::Vector_< SimTK::SpatialVec > & | bodyForces, | |||
SimTK::Vector & | mobilityForces | |||
) | const [virtual] |
Compute and apply the mobility force corrsponding to the passive limit force.
Reimplemented from OpenSim::Force.
Object * CoordinateLimitForce::copy | ( | ) | const [virtual] |
Copy this actuator and return a pointer to the copy.
The copy constructor for this class is used.
Implements OpenSim::Force.
double CoordinateLimitForce::getDamping | ( | ) | const |
double CoordinateLimitForce::getLowerLimit | ( | ) | const |
double CoordinateLimitForce::getLowerStiffness | ( | ) | const |
double OpenSim::CoordinateLimitForce::getOffset | ( | ) | const |
Array< std::string > CoordinateLimitForce::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.
Array< double > CoordinateLimitForce::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 CoordinateLimitForce::getUpperLimit | ( | ) | const |
double CoordinateLimitForce::getUpperStiffness | ( | ) | const |
Get the parameters.
OpenSim::CoordinateLimitForce::OPENSIM_DECLARE_DERIVED | ( | CoordinateLimitForce | , | |
Force | ||||
) |
CoordinateLimitForce & CoordinateLimitForce::operator= | ( | const CoordinateLimitForce & | aForce | ) |
void CoordinateLimitForce::setDamping | ( | double | aDamping | ) |
void CoordinateLimitForce::setLowerLimit | ( | double | aLowerLimit | ) |
void CoordinateLimitForce::setLowerStiffness | ( | double | aLowerStiffness | ) |
void OpenSim::CoordinateLimitForce::setOffset | ( | double | aOffset | ) |
void CoordinateLimitForce::setTransition | ( | double | aTransition | ) |
void CoordinateLimitForce::setup | ( | Model & | aModel | ) | [virtual] |
Perform some setup functions that happen after the object has been deserialized or copied.
aModel | OpenSim model containing this CoordinateActuator. |
Reimplemented from OpenSim::Force.
void CoordinateLimitForce::setUpperLimit | ( | double | aUpperLimit | ) |
void CoordinateLimitForce::setUpperStiffness | ( | double | aUpperStiffness | ) |
Set the parameters.
Coordinate* OpenSim::CoordinateLimitForce::_coord [mutable, protected] |
Corresponding generalized coordinate to which the coordinate actuator is applied.
std::string& OpenSim::CoordinateLimitForce::_coordName [protected] |
double& OpenSim::CoordinateLimitForce::_damping [protected] |
double& OpenSim::CoordinateLimitForce::_lowerLimit [protected] |
double& OpenSim::CoordinateLimitForce::_lowerStiffness [protected] |
Name of coordinate to which the coordinate actuator is applied.
Damping parameter.
The width of the nonlinear transition region.
Stiffness of the limiting force beyond the transition region.
Translations have units of Force/length and rotations have units of Torque/degree
double& OpenSim::CoordinateLimitForce::_transition [protected] |
double& OpenSim::CoordinateLimitForce::_upperLimit [protected] |
double& OpenSim::CoordinateLimitForce::_upperStiffness [protected] |