Browse Source

change tool_xodrobj % map_lanetoxodr. fix 2 bugs.

yuchuli 1 year ago
parent
commit
906aadd667

+ 3 - 0
src/common/common/xodr/OpenDrive/OpenDrive.cpp

@@ -280,6 +280,7 @@ OpenDrive::OpenDrive (const OpenDrive& openDrive)
     }
 }
 
+//#include <iostream>
 const OpenDrive& OpenDrive::operator=(const OpenDrive& rhs)
 {
     mRoadVector = rhs.mRoadVector;
@@ -301,6 +302,8 @@ const OpenDrive& OpenDrive::operator=(const OpenDrive& rhs)
     {
         mHeader = NULL;
     }
+
+    return *this;
 }
 
 /**

+ 3 - 1
src/tool/map_lanetoxodr/map_lanetoxodr.pro

@@ -13,6 +13,8 @@ TEMPLATE = app
 
 CONFIG+= c++11
 
+#QMAKE_CXXFLAGS +=  -g
+
 # The following define makes your compiler emit warnings if you use
 # any feature of Qt which has been marked as deprecated (the exact warnings
 # depend on your compiler). Please consult the documentation of the
@@ -226,7 +228,7 @@ win32:LIBS += -L$$PWD/../../../thirdpartylib/protobuf/lib -lprotobuf
 win32:INCLUDEPATH += $$PWD/../../../thirdpartylib/boost/include/boost-1_66
 windows: LIBS += -L$$PWD/../../../thirdpartylib/boost/lib -lboost_system-mgw73-mt-x64-1_66 -lboost_thread-mgw73-mt-x64-1_66 -lboost_serialization-mgw73-mt-x64-1_66
 
-QMAKE_CXXFLAGS +=  -g
+#QMAKE_CXXFLAGS +=  -g
 
 
 #DEFINES += INPILOT

+ 15 - 2
src/tool/tool_xodrobj/mainwindow.cpp

@@ -63,12 +63,16 @@ public:
     int lane;
 };
 
-static bool LoadXODR(std::string strpath,OpenDrive & mxodr)
+static void LoadXODR(std::string & strpath,OpenDrive & mxodr)
 {
     OpenDriveXmlParser xp(&mxodr);
     xp.ReadFile(strpath);
+
+
 }
 
+
+
 static int getmnfac(OpenDrive & mxodr,double & fmovex,double & fmovey)
 {
     int nrtn = 1;
@@ -179,10 +183,15 @@ MainWindow::MainWindow(QWidget *parent) :
 
     std::string strmapth;
     strmapth = getenv("HOME");
-    strmapth = strmapth + "/map/map.xodr";
+    strmapth = strmapth + std::string("/map/map.xodr");
+
+
+
+    std::cout<<"map path: "<<strmapth<<std::endl;
 
     LoadXODR(strmapth,mxodr);
 
+
     double fmovex,fmovey;
     mnfac = getmnfac(mxodr,fmovex,fmovey);
 
@@ -196,6 +205,8 @@ MainWindow::MainWindow(QWidget *parent) :
     mnDefMoveX = mnMoveX;
     mnDefMoveY = mnMoveY;
 
+
+
 //    mnfac = 100;
 //    mnfac = 20;
 
@@ -244,6 +255,8 @@ MainWindow::MainWindow(QWidget *parent) :
 
     setWindowTitle("ADC OpenDrive View And Set Global Plan Destination");
 
+
+
     mpasrc = iv::modulecomm::RegisterSend("xodrsrc",1000,1);
     mpadst = iv::modulecomm::RegisterSend("xodrreq",1000,1);
 

+ 2 - 0
src/tool/tool_xodrobj/tool_xodrobj.pro

@@ -11,6 +11,8 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
 TARGET = tool_xodrobj
 TEMPLATE = app
 
+#QMAKE_CXXFLAGS +=  -g
+
 
 # The following define makes your compiler emit warnings if you use
 # any feature of Qt which has been marked as deprecated (the exact warnings