|
@@ -334,6 +334,7 @@ void iv::decition::BrainDecition::run() {
|
|
|
std::string gpsOffset_x = xp.GetParam("gpsOffset_X","0");
|
|
|
std::string gpsOffset_y = xp.GetParam("gpsOffset_Y","0");
|
|
|
std::string strexternmpc = xp.GetParam("ExternMPC","false"); //If Use MPC set true
|
|
|
+ std::string lidar_per_predict = xp.GetParam("lidarPP","false"); //If Use MPC set true
|
|
|
|
|
|
|
|
|
adjuseGpsLidarPosition();
|
|
@@ -343,6 +344,10 @@ void iv::decition::BrainDecition::run() {
|
|
|
mbUseExternMPC = true;
|
|
|
}
|
|
|
|
|
|
+ if(lidar_per_predict == "true"){
|
|
|
+ ServiceCarStatus.useLidarPerPredict = true;
|
|
|
+ }
|
|
|
+
|
|
|
ServiceCarStatus.msysparam.lidarGpsXiuzheng = atof(lidarGpsXiuzheng.data());
|
|
|
ServiceCarStatus.msysparam.radarGpsXiuzheng = atof(radarGpsXiuzheng.data());
|
|
|
ServiceCarStatus.msysparam.rearRadarGpsXiuzheng = atof(rearRadarGpsXiuzheng.data());
|
|
@@ -466,34 +471,59 @@ void iv::decition::BrainDecition::run() {
|
|
|
|
|
|
eyes->getSensorObstacle(obs_radar_, obs_camera_,gps_data_, obs_lidar_grid_); //从传感器线程临界区交换数据
|
|
|
|
|
|
-/*
|
|
|
- if(obs_lidar_grid_!= NULL)
|
|
|
- {
|
|
|
- std::cout<<"receive fusion date"<<std::endl;
|
|
|
- int i,j;
|
|
|
- for(i=0;i<iv::grx;i++)
|
|
|
- {
|
|
|
- for(j=0;j<iv::gry;j++)
|
|
|
- {
|
|
|
- if(obs_lidar_grid_[i*iv::gry+j].ob == 2){
|
|
|
- std::cout<<"ok"<<std::endl;
|
|
|
- if(obs_lidar_grid_[i*iv::gry+j].id > 10)
|
|
|
- {
|
|
|
- int xx = obs_lidar_grid_[i*iv::gry+j].id;
|
|
|
- xx++;
|
|
|
- }
|
|
|
- std::cout<<obs_lidar_grid_[i*iv::gry+j].id<<std::endl;
|
|
|
- }
|
|
|
+
|
|
|
+// if(obs_lidar_grid_!= NULL)
|
|
|
+// {
|
|
|
+// std::cout<<"receive fusion date"<<std::endl;
|
|
|
+// int i,j;
|
|
|
+// for(i=0;i<iv::grx;i++)
|
|
|
+// {
|
|
|
+// for(j=0;j<iv::gry;j++)
|
|
|
+// {
|
|
|
+// if(obs_lidar_grid_[i*iv::gry+j].ob == 2){
|
|
|
+// std::cout<<"ok"<<std::endl;
|
|
|
+// if(obs_lidar_grid_[i*iv::gry+j].id > 10)
|
|
|
+// {
|
|
|
+// int xx = obs_lidar_grid_[i*iv::gry+j].id;
|
|
|
+// xx++;
|
|
|
+// }
|
|
|
+// std::cout<<obs_lidar_grid_[i*iv::gry+j].id<<std::endl;
|
|
|
+// }
|
|
|
|
|
|
|
|
|
- }
|
|
|
- }
|
|
|
- std::cout<<"print fusion date end"<<std::endl;
|
|
|
- }
|
|
|
-*/
|
|
|
+// }
|
|
|
+// }
|
|
|
+// std::cout<<"print fusion date end"<<std::endl;
|
|
|
+// }
|
|
|
+
|
|
|
|
|
|
ServiceLidar.copylidarperto(lidar_per);
|
|
|
|
|
|
+// if(lidar_per->size() >0)
|
|
|
+// {
|
|
|
+// int i;
|
|
|
+// for(i=0;i<lidar_per->size();i++)
|
|
|
+// {
|
|
|
+// if(lidar_per->at(i).label>0)
|
|
|
+// {
|
|
|
+// std::cout<<"label is"<<lidar_per->at(i).label<<" vy = "<<lidar_per->at(i).velocity.y<<std::endl;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// //if size > 0, have perception result;
|
|
|
+// }
|
|
|
+
|
|
|
+
|
|
|
+ if(lidar_per->empty()){
|
|
|
+ miss_lidar_per_count++;
|
|
|
+ miss_lidar_per_count=min(miss_lidar_per_limit,miss_lidar_per_count);
|
|
|
+ if(miss_lidar_per_count<miss_lidar_per_limit && old_lidar_per!=NULL){
|
|
|
+ lidar_per=old_lidar_per;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ old_lidar_per=lidar_per;
|
|
|
+ miss_lidar_per_count=0;
|
|
|
+ }
|
|
|
+
|
|
|
// if(lidar_per->size() >0)
|
|
|
// {
|
|
|
// int i;
|
|
@@ -566,6 +596,12 @@ void iv::decition::BrainDecition::run() {
|
|
|
}
|
|
|
//useMobileEye chuku end;
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if (gps_data_ &&!handPark && !ServiceCarStatus.m_bOutGarage){// && obs_lidar_grid_) { //处理GPS数据
|
|
|
//todo gps_data_为当前读到的gps位置信息
|
|
|
//decition_gps = iv::decition::Decition(new iv::decition::DecitionBasic);
|
|
@@ -619,6 +655,36 @@ void iv::decition::BrainDecition::run() {
|
|
|
if(templidar == NULL)templidar = old_obs_lidar_grid_;
|
|
|
// GaussProjCal(gps_data_->gps_lng,gps_data_->gps_lat,&gps_data_->gps_x,&gps_data_->gps_y);
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+// if(templidar!= NULL)
|
|
|
+// {
|
|
|
+// std::cout<<"receive fusion date"<<std::endl;
|
|
|
+// int i,j;
|
|
|
+// for(i=0;i<iv::grx;i++)
|
|
|
+// {
|
|
|
+// for(j=0;j<iv::gry;j++)
|
|
|
+// {
|
|
|
+// if(templidar[i*iv::gry+j].ob == 2){
|
|
|
+// std::cout<<"ok"<<std::endl;
|
|
|
+// if(templidar[i*iv::gry+j].id > 10)
|
|
|
+// {
|
|
|
+// int xx = templidar[i*iv::gry+j].id;
|
|
|
+// xx++;
|
|
|
+// }
|
|
|
+// std::cout<<templidar[i*iv::gry+j].id<<std::endl;
|
|
|
+// }
|
|
|
+
|
|
|
+
|
|
|
+// }
|
|
|
+// }
|
|
|
+// std::cout<<"print fusion date end"<<std::endl;
|
|
|
+// }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
mMutexMap.lock();
|
|
|
decition_gps = decitionGps00->getDecideFromGPS(*gps_data_, navigation_data, templidar,*lidar_per,trafficLight); // my dicition=============================
|
|
|
mMutexMap.unlock();
|