![]() |
Laelaps
2.3.5
RoadNarrows Robotics Small Outdoor Mobile Robot Project
|
Laelaps tuning data class. More...
#include <laeTune.h>
Public Types | |
typedef std::map< std::string, LaeTunesPowertrain > | LaeTunesMapPtp |
typedef std::map< std::string, LaeTunesVL6180 > | LaeTunesMapVL6180 |
Public Member Functions | |
LaeTunes () | |
Default constructor. | |
~LaeTunes () | |
Destructor. | |
double | getImuHz () const |
Get IMU tasks thread cycle rate tune parameter (hertz). More... | |
double | getKinematicsHz () const |
Get kinematics thread cycle rate tune parameter (hertz). More... | |
double | getRangeHz () const |
Get range sensing thread cycle rate tune parameter (hertz). More... | |
double | getWatchDogTimeout () const |
Get watchdog timeout (seconds). More... | |
double | getVelocityDerate () const |
Get derated velocity tune parameter (normalized). More... | |
void | getTrajectoryParams (LaeNorm &eNorm, double &fEpsilon) const |
Get trajectory tune parameters. More... | |
void | getBattOpRangeParams (double &fBattMinV, double &fBattMaxV) const |
Get battery minimum and maximum allowed operating range voltages tune parameters. More... | |
void | getVelPidKParams (const std::string &strName, double &fKp, double &fKi, double &fKd) const |
Get motor velocity PID K tune parameters. More... | |
void | getTireDimParams (const std::string &strName, double &fTireRadius, double &fTireWidth) const |
Get tire dimensions tune parameters. More... | |
std::string | mapToPtp (const std::string &strKey) const |
void | getVL6180Params (const std::string &strName, int &nTofOffset, int &nTofCrossTalk, double &fAlsGain, int &nAlsIntPeriod) const |
Get VL6180 range sensor tune parameters. More... | |
void | print (int indent=0) |
Print out tuning parameters to stdout. More... | |
Public Attributes | |
double | m_fImuHz |
kinematic thread rate (hertz) | |
double | m_fKinematicsHz |
kinematic thread rate (hertz) | |
double | m_fRangeHz |
kinematic thread rate (hertz) | |
double | m_fWatchDogTimeout |
watchdog timeout (seconds) | |
double | m_fVelDerate |
velocity derate (fraction) | |
LaeNorm | m_eTrajNorm |
trajectory distanct norm | |
double | m_fTrajEpsilon |
trajectory epsilon distance (radians) | |
LaeTunesBattery | m_battery |
battery tuning | |
LaeTunesMapPtp | m_mapPtp |
powertrain pair tuning | |
LaeTunesMapVL6180 | m_mapVL6180 |
range sensors tuning | |
typedef std::map<std::string, LaeTunesPowertrain> laelaps::LaeTunes::LaeTunesMapPtp |
typedef std::map<std::string, LaeTunesVL6180> laelaps::LaeTunes::LaeTunesMapVL6180 |
void LaeTunes::getBattOpRangeParams | ( | double & | fBattMinV, |
double & | fBattMaxV | ||
) | const |
Get battery minimum and maximum allowed operating range voltages tune parameters.
[out] | fBattMinV | Minimum battery voltage. |
[out] | fBattMaxV | Maximum battery voltage. |
Definition at line 350 of file laeTune.cxx.
double LaeTunes::getImuHz | ( | ) | const |
Get IMU tasks thread cycle rate tune parameter (hertz).
Definition at line 319 of file laeTune.cxx.
Referenced by laelaps::LaeThreadImu::reload(), and laelaps::LaeRobot::startCoreThreads().
double LaeTunes::getKinematicsHz | ( | ) | const |
Get kinematics thread cycle rate tune parameter (hertz).
Definition at line 324 of file laeTune.cxx.
Referenced by laelaps::LaeThreadKin::reload(), and laelaps::LaeRobot::startCoreThreads().
double LaeTunes::getRangeHz | ( | ) | const |
Get range sensing thread cycle rate tune parameter (hertz).
Definition at line 329 of file laeTune.cxx.
Referenced by laelaps::LaeThreadRange::reload(), and laelaps::LaeRobot::startCoreThreads().
void LaeTunes::getTireDimParams | ( | const std::string & | strName, |
double & | fTireRadius, | ||
double & | fTireWidth | ||
) | const |
Get tire dimensions tune parameters.
strName | Name of powertrain or powertrain pair. One of: front left_front right_front rear left_rear right_rear. | |
[out] | fTireRadius | Tire radius (meters). |
[out] | fTireWidth | Tire width (meters). |
Definition at line 382 of file laeTune.cxx.
References laelaps::LaeTunesPowertrain::m_fTireRadius, and laelaps::LaeTunesPowertrain::m_fTireWidth.
Referenced by laelaps::LaePlatform::configure(), and laelaps::LaePowertrain::configure().
void LaeTunes::getTrajectoryParams | ( | LaeNorm & | eNorm, |
double & | fEpsilon | ||
) | const |
Get trajectory tune parameters.
[out] | eNorm | Distance norm. |
[out] | fEpsilon | Waypoint precision (radians) |
Definition at line 344 of file laeTune.cxx.
double LaeTunes::getVelocityDerate | ( | ) | const |
Get derated velocity tune parameter (normalized).
Definition at line 339 of file laeTune.cxx.
void LaeTunes::getVelPidKParams | ( | const std::string & | strName, |
double & | fKp, | ||
double & | fKi, | ||
double & | fKd | ||
) | const |
Get motor velocity PID K tune parameters.
strName | Name of powertrain or powertrain pair. One of: front left_front right_front rear left_rear right_rear. | |
[out] | fKp | Proportional constant. |
[out] | fKi | Integral constant. |
[out] | fKd | Derivative constant. |
Definition at line 356 of file laeTune.cxx.
References laelaps::LaeTunesPowertrain::m_fVelPidKd, laelaps::LaeTunesPowertrain::m_fVelPidKi, and laelaps::LaeTunesPowertrain::m_fVelPidKp.
Referenced by laelaps::LaeKinematics::configMotorVelocityPid().
void LaeTunes::getVL6180Params | ( | const std::string & | strName, |
int & | nTofOffset, | ||
int & | nTofCrossTalk, | ||
double & | fAlsGain, | ||
int & | nAlsIntPeriod | ||
) | const |
Get VL6180 range sensor tune parameters.
strName | Name of range sensor (key) | |
[out] | nTofOffset | ToF part-to-part offset |
[out] | nTofCrossTalk | ToF cross-talk compensation |
[out] | fAlsGain | ALS analog gain |
[out] | nAlsIntPeriod | ALS integration period |
Definition at line 421 of file laeTune.cxx.
References laelaps::LaeTunesVL6180::m_fAlsGain, laelaps::LaeTunesVL6180::m_nAlsIntPeriod, laelaps::LaeTunesVL6180::m_nTofCrossTalk, and laelaps::LaeTunesVL6180::m_nTofOffset.
Referenced by sensor::vl6180::LaeVL6180MuxArray::configure(), and sensor::vl6180::LaeRangeMuxSubproc::configure().
double LaeTunes::getWatchDogTimeout | ( | ) | const |
Get watchdog timeout (seconds).
Definition at line 334 of file laeTune.cxx.
Referenced by laelaps::LaeWd::configure(), and laelaps::LaeRobot::startCoreThreads().
string LaeTunes::mapToPtp | ( | const std::string & | strKey | ) | const |
Map powertrain (pair) key to powertrain pair key.
strKey | Powertrain (pair) key. |
Definition at line 405 of file laeTune.cxx.
References laelaps::LaeKeyFront, laelaps::LaeKeyLeftFront, laelaps::LaeKeyRear, and laelaps::LaeKeyRightFront.
void LaeTunes::print | ( | int | indent = 0 | ) |
Print out tuning parameters to stdout.
indent | Left indentation. |
Definition at line 447 of file laeTune.cxx.
References laelaps::radToDeg().
Referenced by mainInit().