MusclePair class. More...
Public Member Functions | |
MusclePair (PhyDOF *dof, float ksh, float tmax, float rl, float lmax) | |
construct a MusclePair The two muscles are identical and they generate opposite torques | |
virtual | ~MusclePair () |
Destructor. | |
float | apply () |
return the Torque the muscles would apply calculating the Tension forces according with Hill muscle model | |
void | getActivation (float &act1, float &act2) |
Return the activation of muscles. | |
void | getActiveForces (float &ta1, float &ta2) |
Return the current extension of muscles. | |
float | getAsh () |
Return the A_sh (shape factor) Automatically calculated by other parameters. | |
void | getExtension (float &l1, float &l2) |
Return the current extension of muscles. | |
float | getKsh () |
Return the K_sh (shape factor) | |
float | getMaxLength () |
Return the maximum length. | |
float | getMaxTension () |
Return the max tension. | |
float | getMinLength () |
Return the minimum length Automatically calculated by other parameters. | |
float | getRestLength () |
Return the resting lenght of muscles. | |
float | getViscosity () |
Return the Viscosity. | |
void | setActivation (float act1, float act2) |
Set the activation of muscles. | |
void | setAsh (float newash) |
override the automatically Ash parameter | |
void | setKsh (float ksh, float reduceFactor=1.0) |
Set the K_sh (passive shape factor) | |
void | setMaxLength (float lmax) |
Set the maximum length. | |
void | setMaxTension (float tmax) |
Set the max tension. | |
void | setRestLength (float rl) |
Set the resting lenght of muscles. | |
void | setViscosity (float b) |
Set the Viscosity. | |
Detailed Description
MusclePair class.
- Motivation
- A MusclePair emulate the muscle dynamics.
- Description
- Warnings
- Warnings
Definition at line 41 of file musclepair.h.
Constructor & Destructor Documentation
MusclePair | ( | PhyDOF * | dof, |
float | ksh, | ||
float | tmax, | ||
float | rl, | ||
float | lmax | ||
) |
construct a MusclePair The two muscles are identical and they generate opposite torques
- Parameters
-
dof the joint where the muscles are attached ksh vedi implementazione_muscolo.lyx tmax vedi implementazione_muscolo.lyx rl vedi implementazione_muscolo.lyx lmax vedi implementazione_muscolo.lyx ash is automatically determineted by equation described in implementazione_muscolo.lyx
Definition at line 36 of file musclepair.cpp.
References MusclePair::getExtension().
|
inlinevirtual |
Destructor.
Definition at line 54 of file musclepair.h.
Member Function Documentation
float apply | ( | ) |
return the Torque the muscles would apply calculating the Tension forces according with Hill muscle model
Definition at line 129 of file musclepair.cpp.
References MusclePair::getExtension(), PhyDOF::joint(), World::timeStep(), and PhyJoint::world().
void getActivation | ( | float & | act1, |
float & | act2 | ||
) |
Return the activation of muscles.
Definition at line 116 of file musclepair.cpp.
|
inline |
Return the current extension of muscles.
Definition at line 95 of file musclepair.h.
float getAsh | ( | ) |
Return the A_sh (shape factor) Automatically calculated by other parameters.
Definition at line 84 of file musclepair.cpp.
void getExtension | ( | float & | l1, |
float & | l2 | ||
) |
Return the current extension of muscles.
Definition at line 121 of file musclepair.cpp.
References invLinearMap(), PhyDOF::limits(), linearMap(), and PhyDOF::position().
Referenced by MusclePair::apply(), and MusclePair::MusclePair().
float getKsh | ( | ) |
Return the K_sh (shape factor)
Definition at line 97 of file musclepair.cpp.
float getMaxLength | ( | ) |
Return the maximum length.
Definition at line 76 of file musclepair.cpp.
float getMaxTension | ( | ) |
Return the max tension.
Definition at line 66 of file musclepair.cpp.
float getMinLength | ( | ) |
Return the minimum length Automatically calculated by other parameters.
Definition at line 80 of file musclepair.cpp.
float getRestLength | ( | ) |
Return the resting lenght of muscles.
Definition at line 58 of file musclepair.cpp.
float getViscosity | ( | ) |
Return the Viscosity.
Definition at line 105 of file musclepair.cpp.
void setActivation | ( | float | act1, |
float | act2 | ||
) |
Set the activation of muscles.
Definition at line 109 of file musclepair.cpp.
Referenced by iCubArmMusclesMotor::update(), iCubHandMusclesMotor::update(), iCubTorsoMusclesMotor::update(), and iCubHeadMusclesMotor::update().
void setAsh | ( | float | newash | ) |
override the automatically Ash parameter
- Warning
- this value will be recalculated every time other properties will be changed
Definition at line 88 of file musclepair.cpp.
void setKsh | ( | float | ksh, |
float | reduceFactor = 1.0 |
||
) |
Set the K_sh (passive shape factor)
- Parameters
-
reduceFactor scale the passive curve determined by Ksh by this factor
Definition at line 92 of file musclepair.cpp.
void setMaxLength | ( | float | lmax | ) |
Set the maximum length.
Definition at line 70 of file musclepair.cpp.
void setMaxTension | ( | float | tmax | ) |
Set the max tension.
Definition at line 62 of file musclepair.cpp.
void setRestLength | ( | float | rl | ) |
Set the resting lenght of muscles.
Definition at line 52 of file musclepair.cpp.
void setViscosity | ( | float | b | ) |
Set the Viscosity.
Definition at line 101 of file musclepair.cpp.
The documentation for this class was generated from the following files:
- experiments/include/musclepair.h
- experiments/src/musclepair.cpp