Browse Source

simple_planning_simulator. can running. not complete.

yuchuli 1 year ago
parent
commit
1d9ccfe33c

+ 147 - 11
src/tool/simple_planning_simulator/mainwindow.cpp

@@ -63,10 +63,24 @@ MainWindow::MainWindow(QWidget *parent)
     connect(mpTimerShowSelObj,SIGNAL(timeout()),this,SLOT(onTimerShowSelObj()));
     mpTimerShowSelObj->start(100);
 
+    mpsimmodel = new simmodel_shenlan();
+    mpsimmodel->SetLon0Lat0(glon0,glat0);
+
+    mpTimerUpdateCarPos = new QTimer(this);
+    connect(mpTimerUpdateCarPos,SIGNAL(timeout()),this,SLOT(onTimerUpdateCarPos()));
+    mpTimerUpdateCarPos->start(50);
+
+    ModuleFun fundecition =std::bind(&MainWindow::UpdateDecition,this,std::placeholders::_1,std::placeholders::_2,std::placeholders::_3,std::placeholders::_4,std::placeholders::_5);
+
+    //    mpaDecition = iv::modulecomm::RegisterRecvPlus("decition",fundecition);
+    mpaDecition = iv::modulecomm::RegisterRecvPlus("deciton",fundecition);
+
+
 }
 
 MainWindow::~MainWindow()
 {
+    delete mpsimmodel;
     delete ui;
 }
 
@@ -92,6 +106,7 @@ void MainWindow::CreateTab1View(QTabWidget * p)
     QPushButton * pPB;
     QSlider * pSlider;
     QComboBox * pCB;
+    QCheckBox * pCheck;
 
 
 
@@ -208,6 +223,33 @@ void MainWindow::CreateTab1View(QTabWidget * p)
 
     connect(mpPBDelObj,SIGNAL(clicked(bool)),this,SLOT(onClickDelObj()));
 
+    nYPos = nYPos + mnFontHeight * 2;
+
+    nXPos = 10;
+    nYPos = nYPos + mnFontHeight * 2;
+
+    pCB = new QComboBox(pGroup);
+    pCB->setGeometry(nXPos,nYPos,nLEWidth,nLEHeight*3/2);
+    mpCBShift = pCB;
+    pCB->addItem("Park");
+    pCB->addItem("Reverse");
+    pCB->addItem("Drive");
+    connect(mpCBShift,SIGNAL(currentIndexChanged(int)),this,SLOT(onCurrentShiftChanged(int)));
+    pCB->setEnabled(true);
+
+    nXPos = nXPos + nSpace * 2;
+
+    pCheck = new QCheckBox(pGroup);
+    pCheck->setGeometry(nXPos,nYPos,nLEWidth,nLEHeight*3/2);
+    pCheck->setChecked(false);
+    pCheck->setText("Simulate");
+    mpCBSim = pCheck;
+    connect(mpCBSim,SIGNAL(stateChanged(int)),this,SLOT(onSimStateChanged(int)));
+
+
+
+
+
     QScrollArea * pScroll = new QScrollArea();
     pScroll->setWidget(pGroup);
 
@@ -228,6 +270,9 @@ void MainWindow::onClickXY(double x,double y)
     (void)x;
     (void)y;
 
+    static double fx_dis1,fy_dis1,fx_dis2,fy_dis2;
+
+
     mfClickX = x - mfMoveX;
     mfClickY = y - mfMoveY;
 
@@ -237,6 +282,27 @@ void MainWindow::onClickXY(double x,double y)
     selx = mfClickX;
     sely = mfClickY * (-1);
 
+    if(mnMeasure == 1)
+    {
+        mnMeasure = 2;
+        fx_dis1 = selx;
+        fy_dis1 = sely;
+        ui->statusbar->showMessage(tr("请选择第二个点"),3000);
+        return ;
+    }
+
+    if(mnMeasure == 2)
+    {
+        mnMeasure = 0;
+        fx_dis2 = selx;
+        fy_dis2 = sely;
+        double fdis = sqrt(pow(fx_dis2 - fx_dis1,2)+pow(fy_dis2 - fy_dis1,2));
+        char strout[100];
+        snprintf(strout,100,"Distance: %6.3f",fdis);
+        ui->statusbar->showMessage(strout,10000);
+        return ;
+    }
+
     mpLE_SelX->setText(QString::number(selx,'f',3));
     mpLE_SelY->setText(QString::number(sely,'f',3));
 
@@ -282,6 +348,8 @@ void MainWindow::on_actionLoad_triggered()
     glat0 = lat0;
     glon0 = lon0;
 
+    mpsimmodel->SetLon0Lat0(glon0,glat0);
+
     mxodr = *pxodr;
 
     UpdateScene();
@@ -423,20 +491,12 @@ void MainWindow::CreateCar()
 
 void MainWindow::SetCarPos(double x,double y, double fhdg)
 {
-    double fhead = fhdg * 180.0/M_PI *(-1.0);
-
-    double x0,y0;
-    x0 = mfvehlen/2.0;
-    y0 = mfvehwidth/2.0 *(-1.0);
-    double x1,y1;
-    double hdgrt = fhdg;//法 fhead *M_PI/180.0;
-    x1 = x0 * cos(hdgrt) - y0 * sin(hdgrt);
-    y1 = x0 * sin(hdgrt) + y0 * cos(hdgrt);
 
-    mppixcar->setRotation(fhead);
+    mpsimmodel->SetX(x);
+    mpsimmodel->SetY(y);
+    mpsimmodel->Sethdg(fhdg);
 
 
-    mppixcar->setPos(mfViewMoveX +VIEW_WIDTH/2.0 + x - x1 ,-mfViewMoveY+VIEW_HEIGHT/2.0 - y + y1);
 
 }
 
@@ -695,3 +755,79 @@ void MainWindow::normalhdg(double & fhdg)
     while(fhdg > (2.0*M_PI))fhdg = fhdg - 2.0*M_PI;
 }
 
+
+void MainWindow::on_actionMeasuring_Distance_triggered()
+{
+    ui->statusbar->showMessage(tr("选择第一个点"),3000);
+    mnMeasure = 1;
+}
+
+void MainWindow::onCurrentShiftChanged(int index)
+{
+    switch(index)
+    {
+    case 0:
+        mpsimmodel->SetShift(simmodel::SHIFT_GEER::PARK);
+        break;
+    case 1:
+        mpsimmodel->SetShift(simmodel::SHIFT_GEER::REVERSE);
+        break;
+    case 2:
+        mpsimmodel->SetShift(simmodel::SHIFT_GEER::DRIVE);
+        break;
+    default:
+        mpsimmodel->SetShift(simmodel::SHIFT_GEER::PARK);
+        break;
+    }
+
+
+}
+
+void MainWindow::onSimStateChanged(int nState)
+{
+    if(nState == Qt::Checked)
+    {
+        mpCBShift->setEnabled(false);
+    }
+    else
+    {
+        mpCBShift->setEnabled(true);
+    }
+}
+
+void MainWindow::onTimerUpdateCarPos()
+{
+    double x,y,fhdg;
+    x = mpsimmodel->GetX();
+    y = mpsimmodel->GetY();
+    fhdg = mpsimmodel->Gethdg();
+    double fhead = fhdg * 180.0/M_PI *(-1.0);
+
+    double x0,y0;
+    x0 = mfvehlen/2.0;
+    y0 = mfvehwidth/2.0 *(-1.0);
+    double x1,y1;
+    double hdgrt = fhdg;// fhead *M_PI/180.0;
+    x1 = x0 * cos(hdgrt) - y0 * sin(hdgrt);
+    y1 = x0 * sin(hdgrt) + y0 * cos(hdgrt);
+
+    mppixcar->setRotation(fhead);
+
+
+    mppixcar->setPos(mfViewMoveX +VIEW_WIDTH/2.0 + x - x1 ,-mfViewMoveY+VIEW_HEIGHT/2.0 - y + y1);
+}
+
+void MainWindow::UpdateDecition(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname)
+{
+
+    iv::brain::decition xdecition;
+    if(!xdecition.ParseFromArray(strdata,nSize))
+    {
+        std::cout<<"MainWindow::UpdateDecition parse errror. nSize is %d"<<std::endl;
+        return;
+    }
+    //ServiceCarStatus.mfAcc = xdecition.accelerator();   //
+
+    mpsimmodel->SetCMD(xdecition.accelerator(),xdecition.torque(),xdecition.brake(),xdecition.wheelangle());
+}
+

+ 27 - 0
src/tool/simple_planning_simulator/mainwindow.h

@@ -10,12 +10,18 @@
 #include <QComboBox>
 #include <QPushButton>
 #include <QTimer>
+#include <QCheckBox>
 
 #include "OpenDrive/OpenDrive.h"
 #include "OpenDrive/OpenDriveXmlParser.h"
 
 #include "myview.h"
 
+#include "simmodel_shenlan.h"
+
+
+#include "decition.pb.h"
+
 QT_BEGIN_NAMESPACE
 namespace Ui { class MainWindow; }
 QT_END_NAMESPACE
@@ -55,11 +61,17 @@ private slots:
     void onClickAddCustomObj();
     void onClickDelObj();
     void onTimerShowSelObj();
+    void onSimStateChanged(int nState);
 
     void onCurrentIndexChanged(int index);
+    void onCurrentShiftChanged(int index);
 
     void on_actionLoad_triggered();
 
+    void on_actionMeasuring_Distance_triggered();
+
+    void onTimerUpdateCarPos();
+
 private:
     Ui::MainWindow *ui;
 
@@ -86,8 +98,14 @@ private:
 
     QComboBox * mpCBObj;
 
+    QComboBox * mpCBShift;
+
+    QCheckBox * mpCBSim;
+
     QTimer * mpTimerShowSelObj;
 
+    QTimer * mpTimerUpdateCarPos;
+
 
     QTabWidget * mTabMain;
     void CreateTab1View(QTabWidget * p);
@@ -98,6 +116,9 @@ private:
     double mfvehwidth;
     double mfvehlen;
 
+    int mnMeasure = 0;
+
+
 private:
     int mnFontHeight;
 
@@ -118,6 +139,10 @@ private:
     int mnSelObj = 0;
     int mnSelShowCount = 0;
 
+    simmodel * mpsimmodel;
+
+    void * mpaDecition;
+
 
 public:
     void resizeEvent(QResizeEvent *event);
@@ -134,5 +159,7 @@ private:
 
     void normalhdg(double & fhdg);
 
+    void UpdateDecition(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname);
+
 };
 #endif // MAINWINDOW_H

+ 12 - 0
src/tool/simple_planning_simulator/mainwindow.ui

@@ -33,7 +33,14 @@
     </property>
     <addaction name="actionLoad"/>
    </widget>
+   <widget class="QMenu" name="menuTool">
+    <property name="title">
+     <string>Tool</string>
+    </property>
+    <addaction name="actionMeasuring_Distance"/>
+   </widget>
    <addaction name="menuFile"/>
+   <addaction name="menuTool"/>
   </widget>
   <widget class="QStatusBar" name="statusbar"/>
   <action name="actionLoad">
@@ -41,6 +48,11 @@
     <string>Load</string>
    </property>
   </action>
+  <action name="actionMeasuring_Distance">
+   <property name="text">
+    <string>Measuring Distance</string>
+   </property>
+  </action>
  </widget>
  <resources>
   <include location="sim.qrc"/>

+ 198 - 0
src/tool/simple_planning_simulator/simmodel.cpp

@@ -0,0 +1,198 @@
+#include "simmodel.h"
+
+#include "gnss_coordinate_convert.h"
+
+simmodel::simmodel()
+{
+    mx = 0;
+    my = 0;
+    mhdg = 0;
+    mshift = SHIFT_GEER::PARK;
+    mhdg = 0;
+    macc = 0;
+    mwheelsteer = 0;
+    mvel = 0;
+
+    mpa = iv::modulecomm::RegisterSend("hcp2_gpsimu",100000,1);
+
+    mpthread = new std::thread(&simmodel::threadupdate,this);
+    mpthreadstate = new std::thread(&simmodel::threadstate,this);
+
+}
+
+simmodel::~simmodel()
+{
+    mbrun = false;
+    mpthread->join();
+    mpthreadstate->join();
+}
+
+void simmodel::SetCMD(double facc,double ftorque,double fbrake,double fwheelangle)
+{
+    mfcmd_acc = facc;
+    mfcmd_torque = ftorque;
+    mfcmd_brake = fbrake;
+    mfcmd_wheelangle = fwheelangle;
+    mlastcmdtime = std::chrono::system_clock::now().time_since_epoch().count();
+}
+
+void simmodel::SetX(double fx)
+{
+    mx  = fx;
+}
+
+void simmodel::SetY(double fy)
+{
+    my = fy;
+}
+
+void simmodel::Sethdg(double fhdg)
+{
+    mhdg = fhdg;
+}
+
+void simmodel::SetShift(SHIFT_GEER sg)
+{
+    mshift = sg;
+}
+
+void simmodel::Setacc(double facc)
+{
+    macc = facc;
+}
+
+void simmodel::Setwheelsteer(double fwheelsteer)
+{
+    mwheelsteer = fwheelsteer;
+}
+
+void simmodel::Setvel(double fvel)
+{
+    mvel = fvel;
+}
+
+double simmodel::GetX()
+{
+    return mx;
+}
+
+double simmodel::GetY()
+{
+    return my;
+}
+
+double simmodel::Gethdg()
+{
+    return mhdg;
+}
+
+simmodel::SHIFT_GEER simmodel::GetShift()
+{
+    return mshift;
+}
+
+double simmodel::Getacc()
+{
+    return macc;
+}
+
+double simmodel::Getwheelsteer()
+{
+    return mwheelsteer;
+}
+
+double simmodel::Getvel()
+{
+    return mvel;
+}
+
+void simmodel::SetLon0Lat0(double flon0,double flat0)
+{
+    mlon0 = flon0;
+    mlat0 = flat0;
+}
+
+void simmodel::threadupdate()
+{
+
+    while(mbrun)
+    {
+        if(mbInitOK)CalcModel();
+        std::this_thread::sleep_for(std::chrono::milliseconds(1));
+    }
+}
+
+
+
+void simmodel::threadstate()
+{
+    while(mbrun)
+    {
+
+        double fLon;
+        double fLat;
+        double fHeading;
+
+        double x0,y0;
+        GaussProjCal(mlon0,mlat0,&x0,&y0);
+        double x1,y1;
+        x1 = x0 + mx;
+        y1 = y0 + my;
+        GaussProjInvCal(x1,y1,&fLon,&fLat);
+
+        fHeading = (M_PI/2.0 - mhdg) * 180/M_PI;
+        while(fHeading< 0)fHeading = fHeading + 360.0;
+        while(fHeading>= 360)fHeading = fHeading - 360.0;
+
+        double vn = mvel * sin(mhdg);
+        double ve = mvel * cos(mhdg);
+
+        iv::gps::gpsimu xgpsimu;
+
+        xgpsimu.set_vd(0);
+        xgpsimu.set_ve(ve);
+        xgpsimu.set_vn(vn);
+        xgpsimu.set_speed(mvel);
+        xgpsimu.set_lat(fLat);
+        xgpsimu.set_lon(fLon);
+        xgpsimu.set_heading(fHeading);
+        xgpsimu.set_state(4);
+        xgpsimu.set_msgtime(QDateTime::currentMSecsSinceEpoch());
+        xgpsimu.set_roll(0);
+        xgpsimu.set_pitch(0);
+
+        xgpsimu.set_rtk_state(6);
+        xgpsimu.set_ins_state(4);
+
+        xgpsimu.set_height(0);
+        xgpsimu.set_satnum1(30);
+        xgpsimu.set_satnum2(30);
+        xgpsimu.set_gpsweek(0);
+        xgpsimu.set_gpstime(0);
+        xgpsimu.set_gyro_x(0);
+        xgpsimu.set_gyro_y(0);
+        xgpsimu.set_gyro_z(0);
+        xgpsimu.set_acce_x(macc);
+        xgpsimu.set_acce_y(0);
+        xgpsimu.set_acce_z(0);
+        xgpsimu.set_acc_calc(macc);
+
+        char * strser;
+        bool bser;
+        int nbytesize;
+        nbytesize = xgpsimu.ByteSize();
+        strser = new char[nbytesize];
+        bser = xgpsimu.SerializeToArray(strser,nbytesize);
+        if(bser)
+            iv::modulecomm::ModuleSendMsg(mpa,strser,nbytesize);
+        else
+        {
+            std::cout<<"gpsimu serialize error."<<std::endl;
+        }
+        delete[] strser;
+
+        std::this_thread::sleep_for(std::chrono::milliseconds(20));
+    }
+}
+
+

+ 82 - 0
src/tool/simple_planning_simulator/simmodel.h

@@ -0,0 +1,82 @@
+#ifndef SIMMODEL_H
+#define SIMMODEL_H
+
+#include <chrono>
+#include <thread>
+
+#include "gpsimu.pb.h"
+
+#include "modulecomm.h"
+
+class simmodel
+{
+public:
+    simmodel();
+    ~simmodel();
+
+    enum SHIFT_GEER
+    {
+        PARK = 0,
+        REVERSE = 1,
+        DRIVE = 2
+    };
+
+protected:
+    double mx;
+    double my;
+    double mhdg;
+    SHIFT_GEER mshift;
+    double macc;
+    double mwheelsteer;
+    double mvel;
+
+    double mlon0,mlat0;
+
+    bool mbInitOK = false;
+
+public:
+    double GetX();
+    double GetY();
+    double Gethdg();
+    SHIFT_GEER GetShift();
+    double Getacc();
+    double Getwheelsteer();
+    double Getvel();
+
+
+    virtual void CalcModel() = 0;
+
+protected:
+    double mfcmd_acc;
+    double mfcmd_torque;
+    double mfcmd_brake;
+    double mfcmd_wheelangle;
+    int64_t mlastcmdtime = 0;  //chrono ns
+
+public:
+    void SetCMD(double facc,double ftorque,double fbrake,double fwheelangle);
+
+    void SetX(double fx);
+    void SetY(double fy);
+    void Sethdg(double fhdg);
+    void SetShift(SHIFT_GEER sg);
+    void Setacc(double facc);
+    void Setwheelsteer(double fwheelsteer);
+    void Setvel(double fvel);
+    void SetLon0Lat0(double flon0,double flat0);
+
+
+private:
+    std::thread * mpthread;
+    bool mbrun = true;
+    void threadupdate();
+
+    std::thread * mpthreadstate;
+    void threadstate();
+
+    void * mpa;
+
+
+};
+
+#endif // SIMMODEL_H

+ 124 - 0
src/tool/simple_planning_simulator/simmodel_shenlan.cpp

@@ -0,0 +1,124 @@
+#include "simmodel_shenlan.h"
+
+#include "math.h"
+#include <iostream>
+
+simmodel_shenlan::simmodel_shenlan()
+{
+    mbInitOK = true;
+}
+
+void simmodel_shenlan::CalcModel()
+{
+    int64_t ncmdtime = mlastcmdtime;
+    const double maxnocmdtime = 1000;
+    int64_t nnow = std::chrono::system_clock::now().time_since_epoch().count();
+    if((abs(nnow - ncmdtime)/1000000)>maxnocmdtime)
+    {
+        std::cout<<" more than 1 seconds no cmd. not calc."<<std::endl;
+        mvel = 0;
+        mwheelsteer = 0;
+        return;
+    }
+
+    static int64_t nlastcalctime = 0;
+
+    double fdifftime = 0;
+    if((abs(nnow - nlastcalctime)/1000000)>100)
+    {
+        fdifftime = 0;
+    }
+    else
+    {
+        fdifftime = (nnow - nlastcalctime)/1000000.0;
+        fdifftime = fdifftime/1000.0; //seconds
+        if(fdifftime <0)fdifftime=0;
+    }
+
+    if(fabs(fdifftime) > 0.000000001)
+    {
+
+
+
+        if(mshift == SHIFT_GEER::DRIVE)
+        {
+        mx = mx + mvel*fdifftime * cos(mhdg);
+        my = my + mvel*fdifftime * sin(mhdg);
+        mhdg = mhdg + mvel *fdifftime* tan(mwheelsteer)/mfwheelbase;
+        }
+        if(mshift == SHIFT_GEER::REVERSE)
+        {
+        mx = mx - mvel*fdifftime * cos(mhdg);
+        my = my - mvel*fdifftime * sin(mhdg);
+        mhdg = mhdg - mvel * tan(mwheelsteer)/mfwheelbase;
+        }
+
+        if(mshift == SHIFT_GEER::PARK)
+        {
+
+        }
+
+        double facc;
+
+        double fVehWeight = 1800;
+        double fg = 9.8;
+        double fRollForce = 50;
+        const double fRatio = 2.5;
+
+        if(mfcmd_brake<0)
+        {
+        facc = mfcmd_brake;
+        if((mvel<=0) &&(mshift == SHIFT_GEER::DRIVE))
+        {
+            mvel = 0;
+            facc = 0;
+        }
+        }
+        else
+        {
+        facc = (mfcmd_torque * fRatio - fRollForce)/fVehWeight;
+        if((facc<0)&&(mvel == 0))
+        {
+            facc = 0;
+        }
+        }
+
+        if(mshift == SHIFT_GEER::PARK)
+        {
+            facc = 0;
+        }
+
+        macc = facc;
+
+        if(mshift == SHIFT_GEER::PARK)
+        {
+            mvel = 0;
+            macc = 0;
+        }
+        mvel = mvel + facc * fdifftime;
+
+        double fwheelsteer = mwheelsteer;
+
+        fwheelsteer = mfwheelratio * fwheelsteer *180.0/M_PI;
+
+        if(fwheelsteer < mfcmd_wheelangle)
+        {
+            fwheelsteer = fwheelsteer + mfWHEELSPEED * fdifftime;
+            if(fwheelsteer > mfcmd_wheelangle)fwheelsteer = mfcmd_wheelangle;
+        }
+        if(fwheelsteer > mfcmd_wheelangle){
+            fwheelsteer = fwheelsteer - mfWHEELSPEED * fdifftime;
+            if(fwheelsteer < mfcmd_wheelangle)fwheelsteer = mfcmd_wheelangle;
+        }
+
+        fwheelsteer = fwheelsteer *(M_PI/180.0) /mfwheelratio;
+        mwheelsteer = fwheelsteer;
+
+
+
+
+    }
+
+
+    nlastcalctime = nnow;
+}

+ 20 - 0
src/tool/simple_planning_simulator/simmodel_shenlan.h

@@ -0,0 +1,20 @@
+#ifndef SIMMODEL_SHENLAN_H
+#define SIMMODEL_SHENLAN_H
+
+#include "simmodel.h"
+
+class simmodel_shenlan : public simmodel
+{
+public:
+    simmodel_shenlan();
+
+    void CalcModel();
+
+private:
+    double mfWHEELSPEED = 300;
+    double mfwheelbase = 2.9;
+    double mfwheelratio = 13.6;
+
+};
+
+#endif // SIMMODEL_SHENLAN_H

+ 20 - 2
src/tool/simple_planning_simulator/simple_planning_simulator.pro

@@ -13,6 +13,8 @@ QMAKE_LFLAGS += -no-pie
 SOURCES += \
     ../../common/common/math/gnss_coordinate_convert.cpp \
     ../../common/common/xodr/xodrfunc/roadsample.cpp \
+    ../../include/msgtype/decition.pb.cc \
+    ../../include/msgtype/gpsimu.pb.cc \
     ../map_lanetoxodr/TinyXML/tinystr.cpp \
     ../map_lanetoxodr/TinyXML/tinyxml.cpp \
     ../map_lanetoxodr/TinyXML/tinyxmlerror.cpp \
@@ -29,11 +31,15 @@ SOURCES += \
     ../map_lanetoxodr/view/xodrscenfunc.cpp \
     dialogcustomobj.cpp \
     main.cpp \
-    mainwindow.cpp
+    mainwindow.cpp \
+    simmodel.cpp \
+    simmodel_shenlan.cpp
 
 HEADERS += \
     ../../common/common/math/gnss_coordinate_convert.h \
     ../../common/common/xodr/xodrfunc/roadsample.h \
+    ../../include/msgtype/decition.pb.h \
+    ../../include/msgtype/gpsimu.pb.h \
     ../map_lanetoxodr/TinyXML/tinystr.h \
     ../map_lanetoxodr/TinyXML/tinyxml.h \
     ../map_lanetoxodr/function/circlefitting.h \
@@ -44,7 +50,9 @@ HEADERS += \
     ../map_lanetoxodr/view/viewcreate.h \
     ../map_lanetoxodr/view/xodrscenfunc.h \
     dialogcustomobj.h \
-    mainwindow.h
+    mainwindow.h \
+    simmodel.h \
+    simmodel_shenlan.h
 
 FORMS += \
     dialogcustomobj.ui \
@@ -61,6 +69,16 @@ INCLUDEPATH += $$PWD/../map_lanetoxodr/view
 INCLUDEPATH += $$PWD/../map_lanetoxodr/function
 INCLUDEPATH += $$PWD/../map_lanetoxodr/TinyXML
 
+
+!include(../../../include/common.pri ) {
+    error( "Couldn't find the common.pri file!" )
+}
+
+!include(../../../include/ivprotobuf.pri ) {
+    error( "Couldn't find the ivprotobuf.pri file!" )
+}
+
+
 !include(../../common/common/xodr/OpenDrive/OpenDrive.pri ) {
     error( "Couldn't find the OpenDrive.pri file!" )
 }