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

change tool/map_lanetoxdr. fix add problem. change autogen_lib.sh. add fastrtps support.

yuchuli пре 3 година
родитељ
комит
4ff0e94647

+ 5 - 2
autogen_lib.sh

@@ -7,8 +7,8 @@ if [ ${#qtmake} -lt 5 ]; then
   optfiles=`find /opt -name 'qmake'` 
   for entry in $optfiles
   do
-     x=${entry:0-10:10}
-     if [ "$x" == "/bin/qmake" ];  then
+     x=${entry:0-17:17}
+     if [ "$x" == "/gcc_64/bin/qmake" ];  then
         qtmake="$entry"
 	echo "  -----find qmake"
 	echo "$qtmake"
@@ -49,6 +49,9 @@ rm Makefile
 rm .qmake.stash
 cd ../../../
 
+cp thirdpartylib/FastRTPS/lib/libamd64/* bin/
+cp thirdpartylib/FastRTPS/lib/libarm64/* bin/
+
 cd src/common/xmlparam/
 $qtmake xmlparam.pro
 make $MAKEOPT

+ 1 - 1
include/common.pri

@@ -41,7 +41,7 @@ system("cd ./../thirdpartylib/FastRTPS/lib ; unzip -x -n libamd64.zip ; cd ../..
 
 
 if(contains(DEFINES,USE_FASTRTPS)){
-LIBS +=  -lfastcdr -lfastrtps
+LIBS +=  -lfastcdr -lfastrtps -ltinyxml2
 }
 
 

+ 6 - 1
src/tool/map_lanetoxodr/mainwindow.cpp

@@ -4502,9 +4502,14 @@ void MainWindow::ChangeXODRJunctionID(OpenDrive *pxodr, int index, int newid)
     char strid[255];
     snprintf(strid,255,"%d",newid);
     pjunction->SetId(strid);
-    for(i=0;i<nsize;i++)
+    for(i=0;i<(int)(pxodr->GetRoadCount());i++)
     {
         Road * proad2  = pxodr->GetRoad(i);
+        if(proad2 == NULL)
+        {
+            qDebug("Road %d is NULL size is %d",i,nsize);
+            continue;
+        }
         if(proad2->GetPredecessor()!= 0)
         {
             RoadLink  * plink = proad2->GetPredecessor();

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

@@ -197,8 +197,9 @@ windows: LIBS += -L$$PWD/../../../thirdpartylib/boost/lib -lboost_system-mgw73-m
 
 QMAKE_CXXFLAGS +=  -g
 
-INCLUDEPATH += $$PWD/../../../include/
-LIBS += -L$$PWD/../../../bin/ -lxmlparam -lmodulecomm -livlog -livfault -livbacktrace
+!include(../../../include/common.pri ) {
+    error( "Couldn't find the common.pri file!" )
+}
 
 INCLUDEPATH += $$PWD/../../include/msgtype
 

BIN
thirdpartylib/FastRTPS/lib/libamd64.zip