These functions are globally availables, just include worldsimconfig.h to use them. More...
Functions | |
FARSA_WSIM_TEMPLATE float | invLinearMap (float x, float min=-10, float max=10, float outMin=-1, float outMax=1) |
Inversed Linear mapping from [min,max] to [outMin, outMax]. | |
FARSA_WSIM_TEMPLATE float | linearMap (float x, float min=-10, float max=10, float outMin=-1, float outMax=1) |
Linear mapping from [min,max] to [outMin, outMax]. | |
template<class T , class U > | |
FARSA_WSIM_TEMPLATE const T | max (const T &t1, const U &t2) |
Template for max calculation. | |
template<class T , class U > | |
FARSA_WSIM_TEMPLATE const T | min (const T &t1, const U &t2) |
Template for min calculation. | |
FARSA_WSIM_TEMPLATE real | ramp (real minv, real maxv, real value) |
Function for imposing a range for a real variable. | |
FARSA_WSIM_TEMPLATE real | toDegree (real x) |
convert radians to degree | |
FARSA_WSIM_TEMPLATE real | toRad (real x) |
convert degree to radians | |
Detailed Description
These functions are globally availables, just include worldsimconfig.h to use them.
Function Documentation
|
inline |
Inversed Linear mapping from [min,max] to [outMin, outMax].
-----—\ outMax \ -----— outMin min max
Definition at line 149 of file worldsimconfig.h.
References farsa::max(), and farsa::min().
|
inline |
Linear mapping from [min,max] to [outMin, outMax].
/-----— outMax / -----—/ outMin min max
Definition at line 130 of file worldsimconfig.h.
References farsa::max(), and farsa::min().
FARSA_WSIM_TEMPLATE const T farsa::max | ( | const T & | t1, |
const U & | t2 | ||
) |
Template for max calculation.
Definition at line 104 of file worldsimconfig.h.
Referenced by Frame::alignWithFrame(), RenderWObjectContainer::drawSkyGroundBox(), wMatrix::getEuleroAngles(), RenderWorld::init(), farsa::invLinearMap(), farsa::linearMap(), PhyiCub::PhyiCub(), wPID::pidloop(), RenderWorld::resourceChanged(), MultiMotorController::setLimits(), World::setMultiThread(), and wPID::wPID().
FARSA_WSIM_TEMPLATE const T farsa::min | ( | const T & | t1, |
const U & | t2 | ||
) |
Template for min calculation.
Definition at line 92 of file worldsimconfig.h.
Referenced by RenderWObjectContainer::drawSkyGroundBox(), wMatrix::getEuleroAngles(), RenderWorld::init(), farsa::invLinearMap(), farsa::linearMap(), PhyiCub::PhyiCub(), wPID::pidloop(), RenderWorld::resourceChanged(), MultiMotorController::setLimits(), and wPID::wPID().
|
inline |
Function for imposing a range for a real variable.
Definition at line 115 of file worldsimconfig.h.
Referenced by PhyiCub::PhyiCub(), MultiMotorController::positionMove(), MultiMotorController::relativeMove(), PhyDOF::setDesiredPosition(), PhyDOF::setLimits(), PhyDOF::setStiffness(), and DOFStatusListener::update().
|
inline |
convert radians to degree
Definition at line 84 of file worldsimconfig.h.
Referenced by MultiMotorController::getEncoder(), MultiMotorController::getEncoders(), MultiMotorController::getEncoderSpeed(), MultiMotorController::getEncoderSpeeds(), MultiMotorController::getLimits(), MultiMotorController::getLimitsRaw(), MultiMotorController::getRefAcceleration(), MultiMotorController::getRefAccelerations(), MultiMotorController::getRefSpeed(), and MultiMotorController::getRefSpeeds().
|
inline |
convert degree to radians
Definition at line 77 of file worldsimconfig.h.
Referenced by PhyiCub::configurePosture(), MultiMotorController::MultiMotorController(), PhyEpuck::PhyEpuck(), PhyiCub::PhyiCub(), PhyKhepera::PhyKhepera(), PhyMarXbot::PhyMarXbot(), MultiMotorController::positionMove(), MultiMotorController::relativeMove(), MultiMotorController::setLimits(), MultiMotorController::setLimitsRaw(), MultiMotorController::setRefAcceleration(), MultiMotorController::setRefAccelerations(), MultiMotorController::setRefSpeed(), MultiMotorController::setRefSpeeds(), and MultiMotorController::velocityMove().