musclepair.cpp
138 float tp1 = reduceKsh*0.5*tmax * ( exp( ksh*(x1-rl)/(lmax-rl) ) - 1.0f ) / ( exp( ksh ) - 1.0f );
142 float tp2 = reduceKsh*0.5*tmax * ( exp( ksh*(x2-rl)/(lmax-rl) ) - 1.0f ) / ( exp( ksh ) - 1.0f );
void limits(real &lo, real &hi) const
FARSA_UTIL_TEMPLATE float linearMap(float x, float min=-10, float max=10, float outMin=-1, float outMax=1)
float apply()
return the Torque the muscles would apply calculating the Tension forces according with Hill muscle m...
Definition: musclepair.cpp:129
World * world()
MusclePair(PhyDOF *dof, float ksh, float tmax, float rl, float lmax)
construct a MusclePair The two muscles are identical and they generate opposite torques ...
Definition: musclepair.cpp:36
float getAsh()
Return the A_sh (shape factor) Automatically calculated by other parameters.
Definition: musclepair.cpp:84
FARSA_UTIL_TEMPLATE float invLinearMap(float x, float min=-10, float max=10, float outMin=-1, float outMax=1)
real position() const
real timeStep() const
void getExtension(float &l1, float &l2)
Return the current extension of muscles.
Definition: musclepair.cpp:121
void getActivation(float &act1, float &act2)
Return the activation of muscles.
Definition: musclepair.cpp:116
void setKsh(float ksh, float reduceFactor=1.0)
Set the K_sh (passive shape factor)
Definition: musclepair.cpp:92
float real
float getMinLength()
Return the minimum length Automatically calculated by other parameters.
Definition: musclepair.cpp:80
void setActivation(float act1, float act2)
Set the activation of muscles.
Definition: musclepair.cpp:109
PhyJoint * joint()