NTRT Simulator  Version: Master
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
tgImpedanceController Class Reference

#include <tgImpedanceController.h>

Public Member Functions

 tgImpedanceController ()
 Constructors. More...
 
 tgImpedanceController (double offsetTension, double lengthStiffness, double velStiffness)
 
double control (tgBasicController &mLocalController, double deltaTimeSeconds, double newPosition, double offsetVel=0)
 Control Functions. More...
 
double controlTension (tgBasicController &mLocalController, double deltaTimeSeconds, double newPosition, double offsetTension, double offsetVel=0)
 
double control (tgBasicActuator &mLocalController, double deltaTimeSeconds, double newPosition, double offsetVel=0)
 
double controlTension (tgBasicActuator &mLocalController, 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 m_offsetTension
 
double m_lengthStiffness
 
double m_velStiffness
 

Detailed Description

Influences the spring-cable actuator tension using length and velocity.

Definition at line 34 of file tgImpedanceController.h.

Constructor & Destructor Documentation

tgImpedanceController::tgImpedanceController ( )

Constructors.

The null constructor sets defaults values for the member variables.

Definition at line 55 of file tgImpedanceController.cpp.

tgImpedanceController::tgImpedanceController ( 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 67 of file tgImpedanceController.cpp.

Member Function Documentation

double tgImpedanceController::control ( tgBasicController mLocalController,
double  deltaTimeSeconds,
double  newPosition,
double  offsetVel = 0 
)

Control Functions.

Parameters
[in]Controla tgBasicActuator given a new offset force and a new offset velocity.
[in]mStringa pointer to a tgBasicActuator; must not be NULL
[in]deltaTimeSecondsthe number of seconds since the last call
[in]newPositionthe current position of the Muscle
Todo:
should we add an offset position so it can just control??

Definition at line 106 of file tgImpedanceController.cpp.

double tgImpedanceController::control ( tgBasicActuator mLocalController,
double  deltaTimeSeconds,
double  newPosition,
double  offsetVel = 0 
)

For those who control on tension without PID

Definition at line 152 of file tgImpedanceController.cpp.

double tgImpedanceController::getLengthStiffness ( ) const
inline

Return the value of the length stiffness property.

Returns
the value of the length stiffness property

Definition at line 129 of file tgImpedanceController.h.

double tgImpedanceController::getOffsetTension ( ) const
inline

Return the value of the offset tension property.

Returns
the value of the offset tension property

Definition at line 120 of file tgImpedanceController.h.

double tgImpedanceController::getVelStiffness ( ) const
inline

Return the value of the velocity stiffness property.

Returns
the value of the velocity stiffness property

Definition at line 138 of file tgImpedanceController.h.

void tgImpedanceController::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 199 of file tgImpedanceController.cpp.

void tgImpedanceController::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 187 of file tgImpedanceController.cpp.

Here is the caller graph for this function:

void tgImpedanceController::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 211 of file tgImpedanceController.cpp.

Member Data Documentation

double tgImpedanceController::m_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 cable length it gives a force component.

Definition at line 160 of file tgImpedanceController.h.

double tgImpedanceController::m_offsetTension
protected

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

Definition at line 151 of file tgImpedanceController.h.

double tgImpedanceController::m_velStiffness
protected

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

Definition at line 169 of file tgImpedanceController.h.


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