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 #include <cob_undercarriage_ctrl/UndercarriageCtrlGeom.h>
00055 #include <string>
00056 #include <sstream>
00057
00058 FILE * pFile_WheelRadS;
00059 FILE * pFile_SteerRad;
00060
00061
00062 UndercarriageCtrlGeom::UndercarriageCtrlGeom(std::string sIniDirectory)
00063 {
00064 m_sIniDirectory = sIniDirectory;
00065
00066
00067 m_bEMStopActive = false;
00068 IniFile iniFile;
00069 iniFile.SetFileName(m_sIniDirectory + "Platform.ini", "UnderCarriageCtrlGeom.cpp");
00070 iniFile.GetKeyInt("Config", "NumberOfWheels", &m_iNumberOfDrives, true);
00071
00072
00073 m_vdVelGearDriveRadS.assign(m_iNumberOfDrives,0);
00074 m_vdVelGearSteerRadS.assign(m_iNumberOfDrives,0);
00075 m_vdDltAngGearDriveRad.assign(m_iNumberOfDrives,0);
00076 m_vdAngGearSteerRad.assign(m_iNumberOfDrives,0);
00077
00078
00079
00080
00081
00082
00083
00084 m_vdVelGearDriveCmdRadS.assign(m_iNumberOfDrives,0);
00085 m_vdVelGearSteerCmdRadS.assign(m_iNumberOfDrives,0);
00086 m_vdAngGearSteerCmdRad.assign(m_iNumberOfDrives,0);
00087
00088 m_vdWheelXPosMM.assign(m_iNumberOfDrives,0);
00089 m_vdWheelYPosMM.assign(m_iNumberOfDrives,0);
00090 m_vdWheelDistMM.assign(m_iNumberOfDrives,0);
00091 m_vdWheelAngRad.assign(m_iNumberOfDrives,0);
00092
00093 m_vdExWheelXPosMM.assign(m_iNumberOfDrives,0);
00094 m_vdExWheelYPosMM.assign(m_iNumberOfDrives,0);
00095 m_vdExWheelDistMM.assign(m_iNumberOfDrives,0);
00096 m_vdExWheelAngRad.assign(m_iNumberOfDrives,0);
00097
00098 m_vdAngGearSteerTarget1Rad.assign(m_iNumberOfDrives,0);
00099 m_vdVelGearDriveTarget1RadS.assign(m_iNumberOfDrives,0);
00100 m_vdAngGearSteerTarget2Rad.assign(m_iNumberOfDrives,0);
00101 m_vdVelGearDriveTarget2RadS.assign(m_iNumberOfDrives,0);
00102 m_vdAngGearSteerTargetRad.assign(m_iNumberOfDrives,0);
00103 m_vdVelGearDriveTargetRadS.assign(m_iNumberOfDrives,0);
00104
00105 m_dCmdVelLongMMS = 0;
00106 m_dCmdVelLatMMS = 0;
00107 m_dCmdRotRobRadS = 0;
00108 m_dCmdRotVelRadS = 0;
00109
00110 m_UnderCarriagePrms.WheelNeutralPos.assign(m_iNumberOfDrives,0);
00111 m_UnderCarriagePrms.vdSteerDriveCoupling.assign(m_iNumberOfDrives,0);
00112 m_UnderCarriagePrms.vdFactorVel.assign(m_iNumberOfDrives,0);
00113
00114 m_vdCtrlVal.assign( m_iNumberOfDrives, std::vector<double> (2,0.0) );
00115
00116
00117
00118
00119
00120
00121
00122 m_dSpring = 10.0;
00123 m_dDamp = 2.5;
00124 m_dVirtM = 0.1;
00125 m_dDPhiMax = 12.0;
00126 m_dDDPhiMax = 100.0;
00127 }
00128
00129
00130 UndercarriageCtrlGeom::~UndercarriageCtrlGeom(void)
00131 {
00132
00133 }
00134
00135
00136 void UndercarriageCtrlGeom::InitUndercarriageCtrl(void)
00137 {
00138
00139 IniFile iniFile;
00140
00141 iniFile.SetFileName(m_sIniDirectory + "Platform.ini", "UnderCarriageCtrlGeom.cpp");
00142 iniFile.GetKeyInt("Geom", "DistWheels", &m_UnderCarriagePrms.iDistWheels, true);
00143 iniFile.GetKeyInt("Geom", "RadiusWheel", &m_UnderCarriagePrms.iRadiusWheelMM, true);
00144 iniFile.GetKeyInt("Geom", "DistSteerAxisToDriveWheelCenter", &m_UnderCarriagePrms.iDistSteerAxisToDriveWheelMM, true);
00145
00146 iniFile.GetKeyDouble("Geom", "Wheel1XPos", &m_vdWheelXPosMM[0], true);
00147 iniFile.GetKeyDouble("Geom", "Wheel1YPos", &m_vdWheelYPosMM[0], true);
00148
00149 iniFile.GetKeyDouble("DrivePrms", "MaxDriveRate", &m_UnderCarriagePrms.dMaxDriveRateRadpS, true);
00150 iniFile.GetKeyDouble("DrivePrms", "MaxSteerRate", &m_UnderCarriagePrms.dMaxSteerRateRadpS, true);
00151
00152 iniFile.GetKeyDouble("DrivePrms", "Wheel1SteerDriveCoupling", &m_UnderCarriagePrms.vdSteerDriveCoupling[0], true);
00153
00154 iniFile.GetKeyDouble("DrivePrms", "Wheel1NeutralPosition", &m_UnderCarriagePrms.WheelNeutralPos[0], true);
00155
00156 for(int i = 0; i<m_iNumberOfDrives; i++)
00157 {
00158 m_UnderCarriagePrms.WheelNeutralPos[i] = MathSup::convDegToRad(m_UnderCarriagePrms.WheelNeutralPos[i]);
00159
00160 }
00161
00162 iniFile.GetKeyDouble("Thread", "ThrUCarrCycleTimeS", &m_UnderCarriagePrms.dCmdRateS, true);
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174 iniFile.SetFileName(m_sIniDirectory + "MotionCtrl.ini", "PltfHardwareCoB3.h");
00175
00176 iniFile.GetKeyDouble("SteerCtrl", "Spring", &m_dSpring, true);
00177 iniFile.GetKeyDouble("SteerCtrl", "Damp", &m_dDamp, true);
00178 iniFile.GetKeyDouble("SteerCtrl", "VirtMass", &m_dVirtM, true);
00179 iniFile.GetKeyDouble("SteerCtrl", "DPhiMax", &m_dDPhiMax, true);
00180 iniFile.GetKeyDouble("SteerCtrl", "DDPhiMax", &m_dDDPhiMax, true);
00181
00182
00183 for(int i = 0; i<m_iNumberOfDrives; i++)
00184 {
00185 m_vdWheelDistMM[i] = sqrt( (m_vdWheelXPosMM[i] * m_vdWheelXPosMM[i]) + (m_vdWheelYPosMM[i] * m_vdWheelYPosMM[i]) );
00186 m_vdWheelAngRad[i] = 0;
00187 }
00188
00189 pFile_WheelRadS = fopen ("Radgeschw_regler.txt","w");
00190 if (pFile_WheelRadS != NULL)
00191 {
00192
00193
00194 }
00195
00196 pFile_SteerRad = fopen ("Lenkwinkel_regler.txt","w");
00197 if (pFile_SteerRad != NULL)
00198 {
00199
00200
00201 }
00202 }
00203
00204 void UndercarriageCtrlGeom::CalcExWheelPos(void)
00205 {
00206 }
00207
00208
00209 void UndercarriageCtrlGeom::SetDesiredPltfVelocity(double dCmdVelLongMMS, double dCmdVelLatMMS, double dCmdRotRobRadS, double dCmdRotVelRadS)
00210 {
00211
00212 m_dCmdVelLongMMS = dCmdVelLongMMS;
00213 m_dCmdVelLatMMS = 0;
00214 m_dCmdRotRobRadS = dCmdRotRobRadS;
00215 m_dCmdRotVelRadS = 0;
00216
00217
00218
00219 CalcInverse();
00220 }
00221
00222
00223 void UndercarriageCtrlGeom::SetActualWheelValues(std::vector<double> vdVelGearDriveRadS, std::vector<double> vdVelGearSteerRadS, std::vector<double> vdDltAngGearDriveRad, std::vector<double> vdAngGearSteerRad)
00224 {
00225
00226
00227 m_vdVelGearDriveRadS = vdVelGearDriveRadS;
00228 m_vdVelGearSteerRadS = vdVelGearSteerRadS;
00229 m_vdDltAngGearDriveRad = vdDltAngGearDriveRad;
00230 m_vdAngGearSteerRad = vdAngGearSteerRad;
00231
00232
00233 CalcDirect();
00234 }
00235
00236
00237 void UndercarriageCtrlGeom::GetSteerDriveSetValues(std::vector<double> & vdVelGearDriveRadS, std::vector<double> & vdAngGearSteerRad)
00238 {
00239
00240 }
00241
00242
00243 void UndercarriageCtrlGeom::GetNewCtrlStateSteerDriveSetValues(std::vector<double> & vdVelGearDriveRadS, std::vector<double> & vdVelGearSteerRadS, std::vector<double> & vdAngGearSteerRad,
00244 double & dVelLongMMS, double & dVelLatMMS, double & dRotRobRadS, double & dRotVelRadS)
00245 {
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262 if(m_bEMStopActive == false)
00263 {
00264
00265 CalcControlStep();
00266 }
00267
00268 vdVelGearDriveRadS = m_vdVelGearDriveCmdRadS;
00269 vdAngGearSteerRad = m_vdAngGearSteerCmdRad;
00270 vdVelGearSteerRadS = m_vdVelGearSteerCmdRadS;
00271
00272
00273 dVelLongMMS = m_dCmdVelLongMMS;
00274 dVelLatMMS = 0;
00275 dRotRobRadS = m_dCmdRotRobRadS;
00276 dRotVelRadS = m_dCmdRotVelRadS;
00277 }
00278
00279
00280 void UndercarriageCtrlGeom::GetActualPltfVelocity(double & dDeltaLongMM, double & dDeltaLatMM, double & dDeltaRotRobRad, double & dDeltaRotVelRad,
00281 double & dVelLongMMS, double & dVelLatMMS, double & dRotRobRadS, double & dRotVelRadS)
00282 {
00283 dVelLongMMS = m_dVelLongMMS;
00284 dVelLatMMS = m_dVelLatMMS;
00285 dRotRobRadS = m_dRotRobRadS;
00286 dRotVelRadS = m_dRotVelRadS;
00287
00288
00289 dDeltaLongMM = dVelLongMMS * m_UnderCarriagePrms.dCmdRateS;
00290 dDeltaLatMM = dVelLatMMS * m_UnderCarriagePrms.dCmdRateS;
00291 dDeltaRotRobRad = dRotRobRadS * m_UnderCarriagePrms.dCmdRateS;
00292 dDeltaRotVelRad = dRotVelRadS * m_UnderCarriagePrms.dCmdRateS;
00293 }
00294
00295
00296 void UndercarriageCtrlGeom::CalcInverse(void)
00297 {
00298
00299 double dtempAxVelXRobMMS, dtempAxVelYRobMMS;
00300
00301
00302 if((m_dCmdVelLongMMS == 0) && (m_dCmdVelLatMMS == 0) && (m_dCmdRotRobRadS == 0) && (m_dCmdRotVelRadS == 0))
00303 {
00304 for(int i = 0; i<m_iNumberOfDrives; i++)
00305 {
00306 m_vdAngGearSteerTarget1Rad[i] = m_vdAngGearSteerRad[i];
00307 m_vdVelGearDriveTarget1RadS[i] = 0;
00308 m_vdAngGearSteerTarget2Rad[i] = m_vdAngGearSteerRad[i];
00309 m_vdVelGearDriveTarget2RadS[i] = 0;
00310 }
00311 return;
00312 }
00313
00314
00315 for(int i = 0; i<m_iNumberOfDrives; i++)
00316 {
00317
00318
00319 dtempAxVelXRobMMS = m_dCmdVelLongMMS;
00320 dtempAxVelYRobMMS = 0;
00321
00322
00323 dtempAxVelYRobMMS = m_dCmdRotRobRadS * m_vdWheelXPosMM[0];
00324
00325
00326
00327 m_vdAngGearSteerTarget1Rad[i] = MathSup::atan4quad(dtempAxVelYRobMMS, dtempAxVelXRobMMS);
00328
00329
00330 m_vdAngGearSteerTarget2Rad[i] = m_vdAngGearSteerTarget1Rad[i] + MathSup::PI;
00331 MathSup::normalizePi(m_vdAngGearSteerTarget2Rad[i]);
00332
00333
00334 m_vdVelGearDriveTarget1RadS[i] = sqrt( (dtempAxVelXRobMMS * dtempAxVelXRobMMS) + (dtempAxVelYRobMMS * dtempAxVelYRobMMS) ) / (double)m_UnderCarriagePrms.iRadiusWheelMM;
00335
00336 m_vdVelGearDriveTarget2RadS[i] = - m_vdVelGearDriveTarget1RadS[i];
00337 }
00338 }
00339
00340
00341 void UndercarriageCtrlGeom::CalcDirect(void)
00342 {
00343
00344 double dtempVelXRobMMS = 0;
00345 double dtempVelYRobMMS = 0;
00346 double dtempRotRobRADPS = 0;
00347 double dtempRelPhiWheel1RAD;
00348 std::vector<double> vdtempVelWheelMMS(m_iNumberOfDrives);
00349
00350
00351 for(int i = 0; i<m_iNumberOfDrives; i++)
00352 {
00353
00354
00355 vdtempVelWheelMMS[i] = m_UnderCarriagePrms.iRadiusWheelMM * m_vdVelGearDriveRadS[i];
00356 }
00357
00358
00359 dtempRelPhiWheel1RAD = m_vdAngGearSteerRad[0];
00360
00361
00362 for(int i = 0; i<m_iNumberOfDrives; i++)
00363 {
00364 dtempVelXRobMMS += vdtempVelWheelMMS[i]*cos(m_vdAngGearSteerRad[i]);
00365 dtempVelYRobMMS += vdtempVelWheelMMS[i]*sin(m_vdAngGearSteerRad[i]);
00366 }
00367
00368 dtempRotRobRADPS = dtempVelYRobMMS / m_vdWheelXPosMM[0];
00369
00370
00371 m_dRotRobRadS = dtempRotRobRADPS;
00372 m_dRotVelRadS = 0;
00373
00374
00375 m_dVelLongMMS = dtempVelXRobMMS;
00376 m_dVelLatMMS = 0;
00377
00378 }
00379
00380
00381 void UndercarriageCtrlGeom::CalcControlStep(void)
00382 {
00383
00384 double kP = 0.1;
00385 double kI = 0.1;
00386 double kP1 = 0.1;
00387 double kI1 = 0;
00388 double u, e;
00389 static double u1k_1=0, e1k_1=0;
00390 static double u2k_1=0, e2k_1=0;
00391 static bool bDebug = false;
00392 static int counter = 0;
00393 int temp = 0;
00394 double dDeltaPhi1=0, dDeltaPhi2=0;
00395
00396
00397
00398 if ((m_dCmdVelLongMMS == 0) && (m_dCmdVelLatMMS == 0) && (m_dCmdRotRobRadS == 0) && (m_dCmdRotVelRadS == 0))
00399 {
00400
00401 m_vdVelGearDriveCmdRadS.assign(m_iNumberOfDrives,0.0);
00402 m_vdVelGearSteerCmdRadS.assign(m_iNumberOfDrives,0.0);
00403
00404 u1k_1=0; u2k_1 = 0;
00405 e1k_1 = 0; e2k_1 = 0;
00406
00407 return;
00408 }
00409
00410
00411
00412
00413
00414
00415
00416
00417 e = fabs(m_vdVelGearDriveTarget1RadS[0]) - fabs(m_vdVelGearDriveRadS[0]);
00418
00419
00420
00421 u = u1k_1 + kP*e - kP*kI*e1k_1;
00422
00423 if(bDebug == true)
00424 {
00425 char s1[20] = {0};
00426 sprintf(s1,"%i", counter);
00427 fputs(s1, pFile_WheelRadS);
00428 fputs(" ", pFile_WheelRadS);
00429 sprintf(s1,"%lf", u );
00430 fputs(s1, pFile_WheelRadS);
00431 fputs(" ", pFile_WheelRadS);
00432 sprintf(s1,"%lf", m_vdVelGearDriveTarget1RadS[0] );
00433 fputs(s1, pFile_WheelRadS);
00434 fputs(" ", pFile_WheelRadS);
00435 sprintf(s1,"%lf", m_vdVelGearDriveRadS[0] );
00436 fputs(s1, pFile_WheelRadS);
00437 fputs(" ", pFile_WheelRadS);
00438 sprintf(s1,"%lf", e );
00439 fputs(s1, pFile_WheelRadS);
00440 fputs("\n", pFile_WheelRadS);
00441 }
00442 if((counter > 1000) && (bDebug == true))
00443 {
00444 fclose (pFile_WheelRadS);
00445 fclose (pFile_SteerRad);
00446 bDebug = false;
00447 }
00448
00449 if(fabs(u) > m_UnderCarriagePrms.dMaxDriveRateRadpS)
00450 {
00451 if (u > 0)
00452 u = m_UnderCarriagePrms.dMaxDriveRateRadpS;
00453 else
00454 u = m_UnderCarriagePrms.dMaxDriveRateRadpS;
00455 }
00456
00457
00458 e1k_1 = e;
00459
00460 m_vdVelGearDriveCmdRadS[0] = u;
00461 u1k_1 = u;
00462
00463
00464
00465
00466
00467 e = m_vdAngGearSteerTarget1Rad[0] - m_vdAngGearSteerRad[0];
00468 MathSup::normalizePi(e);
00469
00470 u = u2k_1 - kP1*e - kP1*kI1*e2k_1;
00471 MathSup::normalizePi(u);
00472
00473 if(bDebug == true)
00474 {
00475 char s1[20] = {0};
00476 sprintf(s1,"%i", counter);
00477 fputs(s1, pFile_SteerRad);
00478 fputs(" ", pFile_SteerRad);
00479 sprintf(s1,"%lf", u );
00480 fputs(s1, pFile_SteerRad);
00481 fputs(" ", pFile_SteerRad);
00482 sprintf(s1,"%lf", m_vdAngGearSteerTarget1Rad[0] );
00483 fputs(s1, pFile_SteerRad);
00484 fputs(" ", pFile_SteerRad);
00485 sprintf(s1,"%lf", m_vdAngGearSteerRad[0] );
00486 fputs(s1, pFile_SteerRad);
00487 fputs(" ", pFile_SteerRad);
00488 sprintf(s1,"%lf", e );
00489 fputs(s1, pFile_SteerRad);
00490 fputs("\n", pFile_SteerRad);
00491 }
00492
00493 u2k_1 = u;
00494 e2k_1 = e;
00495
00496 m_vdAngGearSteerCmdRad[0] = u;
00497
00498
00499
00500
00501 dDeltaPhi1 = m_vdAngGearSteerTarget1Rad[0] - m_vdAngGearSteerRad[0];
00502 dDeltaPhi2 = m_vdAngGearSteerTarget2Rad[0] - m_vdAngGearSteerRad[0];
00503 MathSup::normalizePi(dDeltaPhi1);
00504 MathSup::normalizePi(dDeltaPhi2);
00505
00506 if((dDeltaPhi1 <= dDeltaPhi2))
00507 {
00508 temp = -1;
00509
00510 }
00511 else
00512 {
00513 temp = 1;
00514
00515 }
00516
00517 if(fabs(e2k_1) > 0.0175)
00518 {
00519
00520 if(fabs(e2k_1) > 0.3)
00521 m_vdVelGearSteerCmdRadS[0] = 3*temp;
00522 else
00523 m_vdVelGearSteerCmdRadS[0] = 0.3*temp;
00524
00525 if(fabs(e) > 2)
00526 {
00527 m_vdVelGearDriveCmdRadS[0] = 0;
00528 }
00529 }
00530 else
00531 {
00532 m_vdVelGearSteerCmdRadS[0] = 0;
00533 }
00534
00535
00536 if(fabs(m_vdVelGearDriveCmdRadS[0]) > m_UnderCarriagePrms.dMaxSteerRateRadpS)
00537 {
00538 if (m_vdVelGearDriveCmdRadS[0] > 0)
00539 m_vdVelGearDriveCmdRadS[0] = m_UnderCarriagePrms.dMaxSteerRateRadpS;
00540 else
00541 m_vdVelGearDriveCmdRadS[0] = m_UnderCarriagePrms.dMaxSteerRateRadpS;
00542 }
00543 counter++;
00544
00545 }
00546
00547
00548
00549
00550 void UndercarriageCtrlGeom::operator=(const UndercarriageCtrlGeom & GeomCtrl)
00551 {
00552
00553 m_dVelLongMMS = GeomCtrl.m_dVelLongMMS;
00554 m_dVelLatMMS = GeomCtrl.m_dVelLatMMS;
00555 m_dRotRobRadS = GeomCtrl.m_dRotRobRadS;
00556 m_dRotVelRadS = GeomCtrl.m_dRotVelRadS;
00557
00558
00559 m_vdVelGearDriveRadS = GeomCtrl.m_vdVelGearDriveRadS;
00560 m_vdVelGearSteerRadS = GeomCtrl.m_vdVelGearSteerRadS;
00561 m_vdDltAngGearDriveRad = GeomCtrl.m_vdDltAngGearDriveRad;
00562 m_vdAngGearSteerRad = GeomCtrl.m_vdAngGearSteerRad;
00563
00564
00565 m_dCmdVelLongMMS = GeomCtrl.m_dCmdVelLongMMS;
00566 m_dCmdVelLatMMS = GeomCtrl.m_dCmdVelLatMMS;
00567 m_dCmdRotRobRadS = GeomCtrl.m_dCmdRotRobRadS;
00568 m_dCmdRotVelRadS = GeomCtrl.m_dCmdRotVelRadS;
00569
00570
00571 m_vdVelGearDriveCmdRadS = GeomCtrl.m_vdVelGearDriveCmdRadS;
00572 m_vdVelGearSteerCmdRadS = GeomCtrl.m_vdVelGearSteerCmdRadS;
00573 m_vdAngGearSteerCmdRad = GeomCtrl.m_vdAngGearSteerCmdRad;
00574
00575
00576
00577 m_vdAngGearSteerTarget1Rad = GeomCtrl.m_vdAngGearSteerTarget1Rad;
00578 m_vdVelGearDriveTarget1RadS = GeomCtrl.m_vdVelGearDriveTarget1RadS;
00579
00580 m_vdAngGearSteerTarget2Rad = GeomCtrl.m_vdAngGearSteerTarget2Rad;
00581 m_vdVelGearDriveTarget2RadS = GeomCtrl.m_vdVelGearDriveTarget2RadS;
00582
00583
00584 m_vdWheelXPosMM = GeomCtrl.m_vdWheelXPosMM;
00585 m_vdWheelYPosMM = GeomCtrl.m_vdWheelYPosMM;
00586 m_vdWheelDistMM = GeomCtrl.m_vdWheelDistMM;
00587 m_vdWheelAngRad = GeomCtrl.m_vdWheelAngRad;
00588
00589
00590 m_vdExWheelXPosMM = GeomCtrl.m_vdExWheelXPosMM;
00591 m_vdExWheelYPosMM = GeomCtrl.m_vdExWheelYPosMM;
00592 m_vdExWheelDistMM = GeomCtrl.m_vdExWheelDistMM;
00593 m_vdExWheelAngRad = GeomCtrl.m_vdExWheelAngRad;
00594
00595
00596 m_UnderCarriagePrms = GeomCtrl.m_UnderCarriagePrms;
00597
00598
00599
00600 m_dSpring = GeomCtrl.m_dSpring;
00601 m_dDamp = GeomCtrl.m_dDamp;
00602 m_dVirtM = GeomCtrl.m_dDPhiMax;
00603 m_dDPhiMax = GeomCtrl.m_dDPhiMax;
00604 m_dDDPhiMax = GeomCtrl.m_dDDPhiMax;
00605
00606 m_vdCtrlVal = GeomCtrl.m_vdCtrlVal;
00607 }
00608
00609
00610 void UndercarriageCtrlGeom::setEMStopActive(bool bEMStopActive)
00611 {
00612 m_bEMStopActive = bEMStopActive;
00613
00614
00615 if(m_bEMStopActive)
00616 {
00617
00618 for (int i = 0; i<m_iNumberOfDrives; i++)
00619 {
00620 for(int j=0; j< 2; j++)
00621 {
00622 m_vdCtrlVal[i][j] = 0.0;
00623 }
00624 }
00625
00626 for (int i = 0; i<m_iNumberOfDrives; i++)
00627 {
00628 m_vdVelGearDriveCmdRadS[i] = 0.0;
00629 m_vdVelGearSteerCmdRadS[i] = 0.0;
00630 }
00631 }
00632
00633 }