NTRT Simulator
 All Classes Files Functions Variables Typedefs Friends Pages
ImpedanceControl Class Reference

#include <ImpedanceControl.h>

Public Member Functions

 ImpedanceControl ()
 Constructors. More...
 
 ImpedanceControl (double offsetTension, double lengthStiffness, double velStiffness)
 
double control (tgBaseString *const mString, double deltaTimeSeconds, double newPosition, double offsetVel=0)
 Control Functions. More...
 
double controlTension (tgBaseString *const mString, double deltaTimeSeconds, double newPosition, double offsetTension, double offsetVel=0)
 
void setOffsetTension (double offsetTension)
 
void setLengthStiffness (double lengthStiffness)
 
void setVelStiffness (double velStiffness)
 
double getOffsetTension () const
 
double getLengthStiffness () const
 
double getVelStiffness () const
 

Protected Attributes

double _offsetTension
 
double _lengthStiffness
 
double _velStiffness
 

Detailed Description

Influences the Muscle tension using length and velocity.

Definition at line 33 of file ImpedanceControl.h.

Constructor & Destructor Documentation

ImpedanceControl::ImpedanceControl ( )

Constructors.

The null constructor sets defaults values for the member variables.

Definition at line 51 of file ImpedanceControl.cpp.

ImpedanceControl::ImpedanceControl ( double  offsetTension,
double  lengthStiffness,
double  velStiffness 
)

This constructor supplies initial values for all member variables.

Parameters
[in]offsetTensionthe initial value for the offset tension property; must be non-negative
[in]lengthStiffnessthe initial value for the length stiffness property; must be non-negative
[in]velStiffnessthe initial value for the velocity stiffness property; must be non-negative

Definition at line 63 of file ImpedanceControl.cpp.

Member Function Documentation

double ImpedanceControl::control ( tgBaseString *const  mString,
double  deltaTimeSeconds,
double  newPosition,
double  offsetVel = 0 
)

Control Functions.

Parameters
[in]Controla tgLinearString given a new offset force and a new offset velocity.
[in]mStringa pointer to a tgLinearString; must not be NULL
[in]deltaTimeSecondsthe number of seconds since the last call
[in]newPositionthe current position of the Muscle
Todo:

Make mMuscle a reference.

should we add an offset position so it can just control??

Definition at line 118 of file ImpedanceControl.cpp.

double ImpedanceControl::getLengthStiffness ( ) const
inline

Return the value of the length stiffness property.

Returns
the value of the length stiffness property

Definition at line 116 of file ImpedanceControl.h.

double ImpedanceControl::getOffsetTension ( ) const
inline

Return the value of the offset tension property.

Returns
the value of the offset tension property

Definition at line 107 of file ImpedanceControl.h.

double ImpedanceControl::getVelStiffness ( ) const
inline

Return the value of the velocity stiffness property.

Returns
the value of the velocity stiffness property

Definition at line 125 of file ImpedanceControl.h.

void ImpedanceControl::setLengthStiffness ( double  lengthStiffness)

Set the value of the length stiffness property.

Parameters
[in]thenew value for the length stiffness property must be non-negative

Definition at line 169 of file ImpedanceControl.cpp.

void ImpedanceControl::setOffsetTension ( double  offsetTension)

Set the value of the offset tension property.

Parameters
[in]thenew value for the offset tension property must be non-negative

Definition at line 157 of file ImpedanceControl.cpp.

void ImpedanceControl::setVelStiffness ( double  velStiffness)

Set the value of the velocity stiffness property.

Parameters
[in]thenew value for the velocity stiffness property must be non-negative

Definition at line 181 of file ImpedanceControl.cpp.

Member Data Documentation

double ImpedanceControl::_lengthStiffness
protected

Used to determine the force component attributable to a Muscle's length. Must be non-negative to ensure stability. The units are kg/sec^2. When multiplied by the Muscle length it gives a force component.

Todo:
Rename m_lengthStiffness.

Definition at line 149 of file ImpedanceControl.h.

double ImpedanceControl::_offsetTension
protected

A force component. Must be non-negative to ensure stability. The units are application-dependent, e.g., Newtons or centinewtons.

Todo:
rename m_offsetTension.

Definition at line 139 of file ImpedanceControl.h.

double ImpedanceControl::_velStiffness
protected

Used to determine the force component attributable to a Muscle's velocity. The units are kg/sec. When multiplied by the Muscle velocity it gives a force component. Must be non-negative to ensure stability

Todo:
Rename m_velocityStiffness.

Definition at line 159 of file ImpedanceControl.h.


The documentation for this class was generated from the following files: