Browse Source

change driver_map_xodrload. fix some problem in side stop.

yuchuli 3 years ago
parent
commit
4461c2930e

+ 2 - 0
src/decition/decition_brain_sf/decition/brain.cpp

@@ -1181,6 +1181,8 @@ void iv::decition::BrainDecition::SideMove(iv::GPS_INS &x)
     rel_x1 = rel_x + fmove * cos(fhdg + M_PI/2.0);
     rel_y1 = rel_y + fmove * sin(fhdg + M_PI/2.0);
     GaussProjInvCal(rel_x1,rel_y1,&x.gps_lng,&x.gps_lat);
+    x.gps_x = rel_x1;
+    x.gps_y = rel_y1;
 }
 
 void iv::decition::BrainDecition::UpdateMap(const char *mapdata, const int mapdatasize)

+ 4 - 0
src/driver/driver_camera_ioctl/main.cpp

@@ -193,6 +193,10 @@ void threadcapture()
         camx.grab_image(strbuf,&nLen,10000000);
         qDebug("time %ld len: %ld",QDateTime::currentMSecsSinceEpoch(),nLen);
 
+
+        iv::modulecomm::ModuleSendMsg(gpa,strbuf,nLen);
+        continue;
+
         iv::vision::rawpic pic;
 
         qint64 time = QDateTime::currentMSecsSinceEpoch();

+ 3 - 1
src/driver/driver_h264_dec/driver_h264_dec.pro

@@ -34,7 +34,7 @@ qnx: target.path = /tmp/$${TARGET}/bin
 else: unix:!android: target.path = /opt/$${TARGET}/bin
 !isEmpty(target.path): INSTALLS += target
 
-DEFINES += USE_QSV
+#DEFINES += USE_QSV
 
 LIBS +=  -lavcodec -lavformat -lavutil
 #if(contains(DEFINES,USE_QSV)){
@@ -54,6 +54,8 @@ LIBS +=  -lavcodec -lavformat -lavutil
 #LIBS +=  -lavcodec -lavformat -lavutil
 #}
 
+INCLUDEPATH += /usr/include/x86_64-linux-gnu
+
 HEADERS += \
     ../../include/msgtype/rawpic.pb.h
 

+ 2 - 0
src/driver/driver_map_xodrload/main.cpp

@@ -501,6 +501,7 @@ void CalcSide(std::vector<PlanPoint> & xPlan)
         double yold = xPlan[i].y;
         xPlan[i].x = xold + fMove*cos(xPlan[i].hdg - M_PI/2.0);
         xPlan[i].y = yold + fMove*sin(xPlan[i].hdg - M_PI/2.0);
+        xPlan[i].mfDisToLaneLeft = xPlan[i].mfDisToLaneLeft + fMove;
     }
 
     for(i=(nsize-nStopPoint-1);i>=(nsize - nChangePoint);i--)
@@ -511,6 +512,7 @@ void CalcSide(std::vector<PlanPoint> & xPlan)
         double fRatio = 1.0 - ((nsize-nStopPoint) -i )*1.0/(nChangePoint-nStopPoint);
         xPlan[i].x = xold + fRatio*fMove*cos(xPlan[i].hdg - M_PI/2.0);
         xPlan[i].y = yold + fRatio*fMove*sin(xPlan[i].hdg - M_PI/2.0);
+        xPlan[i].mfDisToLaneLeft = xPlan[i].mfDisToLaneLeft + fRatio*fMove;
     }
     return;
 }

+ 4 - 1
src/tool/picview/mainwindow.cpp

@@ -174,10 +174,11 @@ MainWindow::MainWindow(QWidget *parent) :
     pa[3] =iv::modulecomm::RegisterRecv(strxmlmsgname3.data(),Listenpics3);
 
     connect(&mTimer,SIGNAL(timeout()),this,SLOT(onTimer()));
+    connect(this,SIGNAL(updatepic()),this,SLOT(onTimer()));
 #ifdef Q_OS_WIN32
     mTimer.start(1000);
 #else
-    mTimer.start(100);
+    mTimer.start(300);
 #endif
 
     setWindowTitle("picview");
@@ -225,6 +226,8 @@ void MainWindow::UpdatePic(iv::vision::rawpic pic,int index)
     }
     mnlidarcount++;
 
+    emit updatepic();
+
 
 
 }

+ 3 - 0
src/tool/picview/mainwindow.h

@@ -202,6 +202,9 @@ private:
 
      qint64 mrectime;
 
+signals:
+     void updatepic();
+
 
 public slots:
      void onSaveOnePCD();