Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 #ifndef UndercarriageCtrlGeom_INCLUDEDEF_H
00055 #define UndercarriageCtrlGeom_INCLUDEDEF_H
00056
00057
00058
00059 #include <cob_utilities/IniFile.h>
00060 #include <cob_utilities/MathSup.h>
00061 #include <cob_utilities/TimeStamp.h>
00062
00063 class UndercarriageCtrlGeom
00064 {
00065 private:
00066
00067 bool m_bEMStopActive;
00068
00069 int m_iNumberOfDrives;
00070
00071 std::string m_sIniDirectory;
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085 double m_dVelLongMMS;
00086 double m_dVelLatMMS;
00087 double m_dRotRobRadS;
00088 double m_dRotVelRadS;
00089
00090
00091 std::vector<double> m_vdVelGearDriveRadS;
00092 std::vector<double> m_vdVelGearSteerRadS;
00093 std::vector<double> m_vdDltAngGearDriveRad;
00094 std::vector<double> m_vdAngGearSteerRad;
00095
00096
00097 double m_dCmdVelLongMMS;
00098 double m_dCmdVelLatMMS;
00099 double m_dCmdRotRobRadS;
00100 double m_dCmdRotVelRadS;
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112 std::vector<double> m_vdVelGearDriveCmdRadS;
00113 std::vector<double> m_vdVelGearSteerCmdRadS;
00114 std::vector<double> m_vdAngGearSteerCmdRad;
00115
00116
00117
00118 std::vector<double> m_vdAngGearSteerTarget1Rad;
00119 std::vector<double> m_vdVelGearDriveTarget1RadS;
00120 std::vector<double> m_vdAngGearSteerTarget2Rad;
00121 std::vector<double> m_vdVelGearDriveTarget2RadS;
00122 std::vector<double> m_vdAngGearSteerTargetRad;
00123 std::vector<double> m_vdVelGearDriveTargetRadS;
00124
00129 std::vector<double> m_vdWheelXPosMM;
00130 std::vector<double> m_vdWheelYPosMM;
00131 std::vector<double> m_vdWheelDistMM;
00132 std::vector<double> m_vdWheelAngRad;
00133
00138 std::vector<double> m_vdExWheelXPosMM;
00139 std::vector<double> m_vdExWheelYPosMM;
00140 std::vector<double> m_vdExWheelDistMM;
00141 std::vector<double> m_vdExWheelAngRad;
00142
00143 struct ParamType
00144 {
00145 int iDistWheels;
00146 int iRadiusWheelMM;
00147
00148 int iDistSteerAxisToDriveWheelMM;
00149
00150 double dMaxDriveRateRadpS;
00151 double dMaxSteerRateRadpS;
00152 double dCmdRateS;
00153 std::vector<double> WheelNeutralPos;
00154 std::vector<double> vdSteerDriveCoupling;
00159 std::vector<double> vdFactorVel;
00160 };
00161
00162 ParamType m_UnderCarriagePrms;
00163
00174 double m_dSpring, m_dDamp, m_dVirtM, m_dDPhiMax, m_dDDPhiMax;
00183 std::vector< std::vector<double> > m_vdCtrlVal;
00184
00185
00186
00187
00188
00189 void CalcInverse(void);
00190
00191
00192 void CalcDirect(void);
00193
00194
00195 void CalcExWheelPos(void);
00196
00197
00198 void CalcControlStep(void);
00199
00200 public:
00201
00202
00203 UndercarriageCtrlGeom(std::string sIniDirectory);
00204
00205
00206 ~UndercarriageCtrlGeom(void);
00207
00208
00209 void InitUndercarriageCtrl(void);
00210
00211
00212 void SetDesiredPltfVelocity(double dCmdVelLongMMS, double dCmdVelLatMMS, double dCmdRotRobRadS, double dCmdRotVelRadS);
00213
00214
00215 void SetActualWheelValues(std::vector<double> vdVelGearDriveRadS, std::vector<double> vdVelGearSteerRadS, std::vector<double> vdDltAngGearDriveRad, std::vector<double> vdAngGearSteerRad);
00216
00217
00218 void GetSteerDriveSetValues(std::vector<double> & vdVelGearDriveRadS, std::vector<double> & vdAngGearSteerRad);
00219
00220
00221 void GetNewCtrlStateSteerDriveSetValues(std::vector<double> & vdVelGearDriveRadS, std::vector<double> & vdVelGearSteerRadS, std::vector<double> & vdAngGearSteerRad,
00222 double & dVelLongMMS, double & dVelLatMMS, double & dRotRobRadS, double & dRotVelRadS);
00223
00224
00225 void GetActualPltfVelocity(double & dDeltaLongMM, double & dDeltaLatMM, double & dDeltaRotRobRad, double & dDeltaRotVelRad,
00226 double & dVelLongMMS, double & dVelLatMMS, double & dRotRobRadS, double & dRotVelRadS);
00227
00228
00229 void setEMStopActive(bool bEMStopActive);
00230
00231
00232 void operator=(const UndercarriageCtrlGeom & GeomCtrl);
00233 };
00234 #endif
00235