2 Commits d77d7cbc6f ... 158a8f001b

Auteur SHA1 Bericht Datum
  liyupeng 158a8f001b Merge branch 'master' of http://116.63.46.168:3000/ADPilot/modularization 4 maanden geleden
  liyupeng 6722e40c65 add speed3 4 maanden geleden
1 gewijzigde bestanden met toevoegingen van 68 en 0 verwijderingen
  1. 68 0
      src/decition/decition_brain_sf_changan_shenlan/decition/brain.cpp

+ 68 - 0
src/decition/decition_brain_sf_changan_shenlan/decition/brain.cpp

@@ -1369,6 +1369,8 @@ void iv::decition::BrainDecition::UpdateTrafficSign(std::shared_ptr<iv::vision::
         flag=4;
     else if(mvision_obs_->obj(objectID).type()=="Park")
         flag=5;
+    else if(mvision_obs_->obj(objectID).type()=="Speed3")
+        flag=6;
     else
         flag =200;
 
@@ -1382,6 +1384,11 @@ void iv::decition::BrainDecition::UpdateTrafficSign(std::shared_ptr<iv::vision::
         ServiceCarStatus.iTrafficsignSpeed=5.0;
         ServiceCarStatus.itrafficsignTurn=200;
     }
+    else if(flag==6)
+    {
+        ServiceCarStatus.iTrafficsignSpeed=3.0;
+        ServiceCarStatus.itrafficsignTurn=200;
+    }
     else if(flag==4)
     {
         ServiceCarStatus.iTrafficsignSpeed=0.0;
@@ -1408,6 +1415,67 @@ void iv::decition::BrainDecition::UpdateTrafficSign(std::shared_ptr<iv::vision::
         ServiceCarStatus.itrafficsignTurn=200;
     }
 
+
+
+////********************* add any speed limit****************************////
+//    std::string subStr = "Speed";
+//    std::string typeStr = mvision_obs_->obj(objectID).type();
+//    float speedValue = 0.0;
+//    if(typeStr.find(subStr) != std::string::npos)
+//    {
+//        size_t pos=typeStr.find_first_of("0123456789");
+//        std::string speed = typeStr.substr(0,pos);
+//        std::string numberStr = typeStr.substr(pos);
+//        speedValue = std::stof(numberStr);
+//        if(speedValue>10.0)  speedValue == 10.0;
+//        flag = 0;
+//    }
+//    else if(mvision_obs_->obj(objectID).type()=="Left")
+//        flag=2;
+//    else if(mvision_obs_->obj(objectID).type()=="Right")
+//        flag=3;
+//    else if(mvision_obs_->obj(objectID).type()=="Nopassing")
+//        flag=4;
+//    else if(mvision_obs_->obj(objectID).type()=="Park")
+//        flag=5;
+//    else
+//        flag =200;
+
+//    if(flag==0)
+//    {
+//        ServiceCarStatus.iTrafficsignSpeed=speedValue;
+//        ServiceCarStatus.itrafficsignTurn=200;
+//    }
+//    else if(flag==4)
+//    {
+//        ServiceCarStatus.iTrafficsignSpeed=0.0;
+//        ServiceCarStatus.itrafficsignTurn=200;
+//    }
+//    else if(flag==5)
+//    {
+//        ServiceCarStatus.iTrafficsignSpeed=0.0;
+//        ServiceCarStatus.itrafficsignTurn=200;
+//    }
+//    else if(flag==2)
+//    {
+//        ServiceCarStatus.iTrafficsignSpeed=200.0;
+//        ServiceCarStatus.itrafficsignTurn=2;
+//    }
+//    else if(flag==3)
+//    {
+//        ServiceCarStatus.iTrafficsignSpeed=200.0;
+//        ServiceCarStatus.itrafficsignTurn=3;
+//    }
+//    else
+//    {
+//        ServiceCarStatus.iTrafficsignSpeed=200.0;
+//        ServiceCarStatus.itrafficsignTurn=200;
+//    }
+
+////********************* add any speed limit****************************////
+
+
+
 //      if((flag==0)||(flag==1)||(flag==4)|(flag==5))
 //      {
 //          switch(flag)