Преглед изворни кода

change driver_map_xodrload. fix bug in 1 road curvature.

yuchuli пре 2 година
родитељ
комит
ec4b472bcc

+ 2 - 2
src/driver/driver_h264_dec/ivh264framedecode.cpp

@@ -130,7 +130,7 @@ void ivh264framedecode::decode(AVCodecContext *dec_ctx, AVFrame *frame, AVPacket
             return;
         }
 
-        printf("saving frame %3d\n", dec_ctx->frame_number);
+ //       printf("saving frame %3d\n", dec_ctx->frame_number);
         fflush(stdout);
 
         /* the picture is allocated by the decoder. no need to
@@ -290,7 +290,7 @@ void ivh264framedecode::threaddecode()
         pkt->size = xraw.ndatasize;
         if (pkt->size)
         {
-            std::cout<<"decode ."<<std::endl;
+ //           std::cout<<"decode ."<<std::endl;
             decode(c, frame, pkt);
         }
 

+ 5 - 0
src/driver/driver_map_xodrload/globalplan.cpp

@@ -2876,6 +2876,11 @@ int MakePlan(xodrdijkstra * pxd,OpenDrive * pxodr,const double x_now,const doubl
                 }
             }
 
+            for(i=0;i<(int)xvectorPP.size();i++)
+            {
+                xvectorPP[i].mfCurvature = pRoad->GetRoadCurvature(xvectorPP[i].mS);
+            }
+
             pathsection xps;
             xps.mbStartToMainChange = false;
             xps.mbMainToEndChange = false;

+ 1 - 1
src/driver/driver_map_xodrload/main.cpp

@@ -1110,7 +1110,7 @@ int main(int argc, char *argv[])
 
     std::string strextendmap = xp.GetParam("extendmap","false");
 
-    std::string strsideenable = xp.GetParam("sideenable","true");
+    std::string strsideenable = xp.GetParam("sideenable","false");
 
 
     glat0 = atof(strlat0.data());

+ 2 - 2
src/tool/RemoteCtrl_h264/grpcpc.cpp

@@ -443,7 +443,7 @@ void grpcpc::threadpicdownload(int nCamPos)
 
             if(reply.nres() == 1)
             {
-                std::cout<<nCamPos<<":pic time is "<<reply.npictime()<<std::endl;
+//                std::cout<<nCamPos<<":pic time is "<<reply.npictime()<<std::endl;
                 mnPicUpLatency[nCamPos] = reply.npicuplatency();
                 mnFrameRate[nCamPos] = reply.npicframerate();
                 mnPicDownLatency[nCamPos] = QDateTime::currentMSecsSinceEpoch() - time1;
@@ -456,7 +456,7 @@ void grpcpc::threadpicdownload(int nCamPos)
                     npos = npos + sizeof(int);
                     iv::h264rawframedata xframe;
                     int ndatasize = *pnowsize;
-                    std::cout<<" i "<<i<<" size: "<<ndatasize<<std::endl;
+//                    std::cout<<" i "<<i<<" size: "<<ndatasize<<std::endl;
                     xframe.mdatasize = ndatasize;
                     xframe.mpstr_ptr = std::shared_ptr<char>(new char[ndatasize]);
                     memcpy(xframe.mpstr_ptr.get(),pstrdata + npos,xframe.mdatasize);

+ 5 - 5
src/tool/RemoteCtrl_h264/mainwindow.cpp

@@ -887,7 +887,7 @@ void MainWindow::onTimerUpdateView()
         time_gps = gTimeGPSIMUUpdate;
         char strscript[256];
         snprintf(strscript,255,"theLocation(%11.7f,%11.7f,%11.3f);",ggpsimu.lon(),ggpsimu.lat(),ggpsimu.heading());
-        mMapview->page()->runJavaScript(strscript);
+//        mMapview->page()->runJavaScript(strscript);
 
         iv::gps::gpsimu xgpsimu;
         xgpsimu.CopyFrom(ggpsimu);
@@ -920,7 +920,7 @@ void MainWindow::paintEvent(QPaintEvent *)
         if(mbCamUpdate[i])
         {
  //           xTime.start();
-            std::cout<<" copy image. "<<std::endl;
+ //           std::cout<<" copy image. "<<std::endl;
             mMutexCam[i].lock();
 //            QImage image = mpImageCam[i]->copy();
             mbCamUpdate[i] = false;
@@ -1188,7 +1188,7 @@ void MainWindow::threadinfo()
                     gTimeGPSIMUUpdate = QDateTime::currentMSecsSinceEpoch();
                 }
             }
-            std::cout<<" receive info msg. "<<std::endl;
+ //           std::cout<<" receive info msg. "<<std::endl;
         }
     }
 }
@@ -1204,7 +1204,7 @@ void MainWindow::threadframe(int ncamppos)
         nrtn = mgrpcpc->Consumeh264frame(ncamppos,xframe,10);
         if(nrtn == 1)
         {
-            std::cout<<"recv a frame."<<std::endl;
+//            std::cout<<"recv a frame."<<std::endl;
             iv::rawframedata xrawframe;
             xrawframe.mpstr_ptr = xframe.mpstr_ptr;
             xrawframe.ndatasize = xframe.mdatasize;
@@ -1220,7 +1220,7 @@ void MainWindow::threadpic(int ncampos)
     {
         int nindex = mph264decode[ncampos]->GetUpdatedIndex(10);
         if(nindex<0)continue;
-        std::cout<<" recv a yuv."<<std::endl;
+//        std::cout<<" recv a yuv."<<std::endl;
         iv::framedecodebuf * pbuf =  mph264decode[ncampos]->LockReadBuff(nindex);
         int cy = pbuf->frameheight;
         int cx = pbuf->framewidth;