|
@@ -357,9 +357,25 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
obstacle_avoid_flag=0;
|
|
obstacle_avoid_flag=0;
|
|
avoidXNew=0;
|
|
avoidXNew=0;
|
|
|
|
|
|
|
|
+ ServiceCarStatus.mbReceiveTask =true; //JS状态机
|
|
|
|
+ ServiceCarStatus.mnReceiveTaskCnt=0;
|
|
|
|
+
|
|
|
|
+ ServiceCarStatus.mbFulfilTask = false;
|
|
|
|
+ ServiceCarStatus.mbCloseToPath = false;
|
|
|
|
+ ServiceCarStatus.mbAwayFromPath = false;
|
|
givlog->debug("decition_brain_bool","DoorTimeStart: %d,current: %d",
|
|
givlog->debug("decition_brain_bool","DoorTimeStart: %d,current: %d",
|
|
0,0);
|
|
0,0);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if(ServiceCarStatus.mnReceiveTaskCnt<=100)
|
|
|
|
+ {
|
|
|
|
+ ServiceCarStatus.mnReceiveTaskCnt++;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ ServiceCarStatus.mbReceiveTask=false;
|
|
|
|
+ }
|
|
|
|
+
|
|
ServiceCarStatus.mvehState=vehState;
|
|
ServiceCarStatus.mvehState=vehState;
|
|
ServiceCarStatus.mavoidX=avoidXNew;
|
|
ServiceCarStatus.mavoidX=avoidXNew;
|
|
|
|
|
|
@@ -1028,12 +1044,18 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
|
|
|
|
if (PathPoint<0)
|
|
if (PathPoint<0)
|
|
{
|
|
{
|
|
-
|
|
|
|
|
|
+ ServiceCarStatus.mbCloseToPath = false;
|
|
|
|
+ ServiceCarStatus.mbAwayFromPath = true;
|
|
minDecelerate=-1.0;
|
|
minDecelerate=-1.0;
|
|
phaseSpeedDecition(gps_decition, secSpeed, -1, 0,now_gps_ins);
|
|
phaseSpeedDecition(gps_decition, secSpeed, -1, 0,now_gps_ins);
|
|
return gps_decition;
|
|
return gps_decition;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ ServiceCarStatus.mbCloseToPath = true; //JS状态机
|
|
|
|
+ ServiceCarStatus.mbAwayFromPath = false;
|
|
|
|
+ }
|
|
|
|
|
|
DecideGps00::lastGpsIndex = PathPoint;
|
|
DecideGps00::lastGpsIndex = PathPoint;
|
|
|
|
|
|
@@ -1103,7 +1125,8 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
final_brake_lock=true;
|
|
final_brake_lock=true;
|
|
brake_mode=true;
|
|
brake_mode=true;
|
|
if(distance_to_end<0.8){
|
|
if(distance_to_end<0.8){
|
|
- minDecelerate=-0.7;
|
|
|
|
|
|
+ minDecelerate=-0.7;
|
|
|
|
+ ServiceCarStatus.mbFulfilTask = true;
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -2285,24 +2308,52 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
if(obsDistance>0 && obsDistance<8){
|
|
if(obsDistance>0 && obsDistance<8){
|
|
dSpeed=0;
|
|
dSpeed=0;
|
|
}
|
|
}
|
|
- }else if(obsDistance>0 && obsDistance<15){ //均胜跑腿车距离可以适当减小
|
|
|
|
|
|
+ }
|
|
|
|
+ else if(obsDistance>0 && obsDistance<15)
|
|
|
|
+ { //均胜跑腿车距离可以适当减小
|
|
|
|
|
|
if(ServiceCarStatus.msysparam.mvehtype=="haomo")
|
|
if(ServiceCarStatus.msysparam.mvehtype=="haomo")
|
|
{
|
|
{
|
|
- if(obsDistance>ServiceCarStatus.socfDis && obsDistance<15)
|
|
|
|
|
|
+// if(obsDistance>ServiceCarStatus.socfDis && obsDistance<15)
|
|
|
|
+// {
|
|
|
|
+// dSpeed = min(3.0,dSpeed);
|
|
|
|
+// }
|
|
|
|
+// else
|
|
|
|
+ if((obsDistance>ServiceCarStatus.socfDis-4) &&obsDistance<ServiceCarStatus.socfDis) //
|
|
{
|
|
{
|
|
- dSpeed = min(3.0,dSpeed);
|
|
|
|
|
|
+// dSpeed=0;
|
|
|
|
+ dSpeed = min(3.0,dSpeed);
|
|
}
|
|
}
|
|
- else if(obsDistance<ServiceCarStatus.socfDis)
|
|
|
|
|
|
+ else
|
|
{
|
|
{
|
|
- dSpeed=0;
|
|
|
|
|
|
+ dSpeed=0;
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
else
|
|
else
|
|
|
|
+ {
|
|
dSpeed=0;
|
|
dSpeed=0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //JS 车辆被obs阻挡无路可走
|
|
|
|
+ if((obsDistance>0) &&obsDistance<(ServiceCarStatus.socfDis-4))
|
|
|
|
+ {
|
|
|
|
+ if(dSpeed==0)
|
|
|
|
+ {
|
|
|
|
+ ServiceCarStatus.mbNoPathCnt++;
|
|
|
|
+ }
|
|
|
|
+ if(ServiceCarStatus.mbNoPathCnt>100)
|
|
|
|
+ {
|
|
|
|
+ ServiceCarStatus.mbNoPath=true;
|
|
|
|
+ ServiceCarStatus.mbNoPathCnt=ServiceCarStatus.mbNoPathCnt;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ ServiceCarStatus.mbNoPath=false;
|
|
|
|
+ ServiceCarStatus.mbNoPathCnt=0;
|
|
|
|
+ }
|
|
|
|
+//
|
|
|
|
|
|
if(ServiceCarStatus.group_control){
|
|
if(ServiceCarStatus.group_control){
|
|
dSpeed = ServiceCarStatus.group_comm_speed;
|
|
dSpeed = ServiceCarStatus.group_comm_speed;
|