|
@@ -241,7 +241,8 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
|
|
|
|
|
|
|
if(ServiceCarStatus.speed_control==true){
|
|
|
- Compute00().getDesiredSpeed(gpsMapLine); //add by zj
|
|
|
+ //Compute00().getDesiredSpeed(gpsMapLine); //add by zj
|
|
|
+ Compute00().getPlanSpeed(gpsMapLine);
|
|
|
}
|
|
|
|
|
|
// ServiceCarStatus.carState = 1;
|
|
@@ -967,8 +968,8 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
|
DecideGps00::lastGpsIndex = PathPoint;
|
|
|
//2020-01-03, kkcai
|
|
|
//if(!circleMode && PathPoint>gpsMapLine.size()-200){
|
|
|
- if(!circleMode && PathPoint>gpsMapLine.size()-100){
|
|
|
- minDecelerate=-0.7;
|
|
|
+ if(!circleMode && PathPoint>gpsMapLine.size()-250){
|
|
|
+ minDecelerate=-0.5;
|
|
|
std::cout<<"map finish brake"<<std::endl;
|
|
|
}
|
|
|
|
|
@@ -1109,8 +1110,9 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
|
|
|
|
|
|
|
controlAng= getAngle(gpsTraceNow,now_gps_ins,gps_decition);
|
|
|
- if(!circleMode && PathPoint>(gpsMapLine.size()-100)){
|
|
|
- controlAng=0;
|
|
|
+ if(!circleMode && PathPoint>(gpsMapLine.size()-250)){
|
|
|
+ if(realspeed<0.5)
|
|
|
+ controlAng=0;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1265,7 +1267,7 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
|
|
|
|
|
|
|
|
|
|
- if (gpsMapLine[PathPoint]->roadMode ==0)
|
|
|
+ /*if (gpsMapLine[PathPoint]->roadMode ==0)
|
|
|
{
|
|
|
//dSpeed = min(10.0,dSpeed);
|
|
|
|
|
@@ -1315,16 +1317,16 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
|
{
|
|
|
// dSpeed = min(10.0,dSpeed);
|
|
|
dSpeed = min(ServiceCarStatus.mroadmode_vel.mfmode18,dSpeed);
|
|
|
- /*if(gpsMapLine[PathPoint]->light_left_or_right == 1)
|
|
|
- {
|
|
|
- gps_decition->leftlamp = true;
|
|
|
- gps_decition->rightlamp = false;
|
|
|
- }
|
|
|
- else if(gpsMapLine[PathPoint]->light_left_or_right == 2)
|
|
|
- {
|
|
|
- gps_decition->leftlamp = false;
|
|
|
- gps_decition->rightlamp = true;
|
|
|
- }*/
|
|
|
+// if(gpsMapLine[PathPoint]->light_left_or_right == 1)
|
|
|
+// {
|
|
|
+// gps_decition->leftlamp = true;
|
|
|
+// gps_decition->rightlamp = false;
|
|
|
+// }
|
|
|
+// else if(gpsMapLine[PathPoint]->light_left_or_right == 2)
|
|
|
+// {
|
|
|
+// gps_decition->leftlamp = false;
|
|
|
+// gps_decition->rightlamp = true;
|
|
|
+// }
|
|
|
}else if (gpsMapLine[PathPoint]->roadMode == 1)
|
|
|
{
|
|
|
dSpeed = min(ServiceCarStatus.mroadmode_vel.mfmode1,dSpeed);
|
|
@@ -1345,11 +1347,13 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
|
gps_decition->leftlamp = false;
|
|
|
gps_decition->rightlamp = false;
|
|
|
|
|
|
- }
|
|
|
-
|
|
|
+ }*/
|
|
|
|
|
|
|
|
|
+ dSpeed = min(doubledata[PathPoint][4],dSpeed);
|
|
|
|
|
|
+ givlog->debug("brain_decition_speed","dspeed: %f",
|
|
|
+ dSpeed);
|
|
|
|
|
|
if (gpsMapLine[PathPoint]->speed_mode == 2)
|
|
|
{
|
|
@@ -1616,7 +1620,7 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
|
}*/
|
|
|
static bool avoid_speed_flag=false;
|
|
|
if(obsDistance>0&& (obsDistance<ServiceCarStatus.aocfDis+10)&&(abs(realspeed)>0.5)&&
|
|
|
- (vehState==normalRun) &&(ObsTimeStart==-1)&&(obs_speed_for_avoid<0.6)
|
|
|
+ (vehState==normalRun) &&(ObsTimeStart==-1)//&&(obs_speed_for_avoid<0.6)
|
|
|
&& (gpsMapLine[PathPoint]->runMode==1)&&(gpsMapLine[PathPoint]->mode2!=3000))
|
|
|
{
|
|
|
|
|
@@ -1639,7 +1643,7 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
|
|
|
|
|
|
|
//shiyanbizhang 0929
|
|
|
- if(obsDistance>0&& (obsDistance<ServiceCarStatus.aocfDis)&&(obs_speed_for_avoid<0.6)&& (avoid_speed_flag==true) //&&(abs(realspeed)<5.0)
|
|
|
+ if(obsDistance>0&& (obsDistance<ServiceCarStatus.aocfDis)&& (avoid_speed_flag==true) //&&(obs_speed_for_avoid<0.6)
|
|
|
&&(vehState==normalRun||vehState==backOri || vehState==avoiding) &&(ObsTimeStart==-1)
|
|
|
&& (gpsMapLine[PathPoint]->runMode==1)&&(gpsMapLine[PathPoint]->mode2!=3000)){
|
|
|
ObsTimeStart=GetTickCount();
|