瀏覽代碼

fix(grpc_BS):change arrived judgement condition.

sunjiacheng 3 年之前
父節點
當前提交
19e75c6f30
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/driver/driver_cloud_grpc_client_BS/fsm_unit.cpp

+ 2 - 2
src/driver/driver_cloud_grpc_client_BS/fsm_unit.cpp

@@ -370,7 +370,7 @@ void FSMUnit::arriveCheckLoop_Timeout(void)
         deltaY = localPositionNextY - localPositionY;
         distance = sqrt(deltaX*deltaX + deltaY*deltaY);
 
-        if(distance < 2.0 && currentSpeed < 0.1)
+        if(distance <= 5.0 && currentSpeed < 0.1)
         {
             waitingStationArrived = true;
         }
@@ -399,7 +399,7 @@ void FSMUnit::arriveCheckLoop_Timeout(void)
         deltaY = localPositionNextY - localPositionY;
         distance = sqrt(deltaX*deltaX + deltaY*deltaY);
 
-        if(distance < 2.0 && currentSpeed < 0.1)
+        if(distance <= 5.0 && currentSpeed < 0.1)
         {
             maintainStationArrived = true;
         }