Browse Source

add obstacle person speed

zhangjia 3 years ago
parent
commit
35ee8e31d2

+ 1 - 1
src/decition/common/common/obstacle_type.h

@@ -41,7 +41,7 @@ namespace iv {
         double speed_x;
         double speed_y;
         double yaw;
-        int type;
+        int type;      //1:vehicle  2:person  3:others
         double high;
         double low;
         double obshight;

+ 5 - 0
src/decition/decition_brain_sf/decition/decide_gps_00.cpp

@@ -3168,6 +3168,7 @@ void iv::decition::DecideGps00::computeObsOnRoad(iv::LidarGridPtr lidarGridPtr,
         obsSpeed=obsSd;
     }
 
+
     if(obsDistance<500&&obsDistance>0){
      std::cout <<ServiceCarStatus.mRunTime.elapsed()<<"ms:"<< "obsDistance<500:" << obsDistance << std::endl;
     }
@@ -3259,6 +3260,10 @@ void iv::decition::DecideGps00::computeObsOnRoadXY(iv::LidarGridPtr lidarGridPtr
         obsSpeed=obsSd;
     }
 
+    if(obsPoint.obs_type==2){
+        obsSpeed=-secSpeed;
+    }
+
     if(obsDistance<500&&obsDistance>0){
      std::cout <<ServiceCarStatus.mRunTime.elapsed()<<"ms:"<< "obsDistance<500:" << obsDistance << std::endl;
     }