Browse Source

change map_lanetoxodr. add parkingspace id.

yuchuli 8 tháng trước cách đây
mục cha
commit
40333e520d

+ 10 - 0
src/test/testmodule2/main.cpp

@@ -4,6 +4,7 @@
 #include "modulecomm.h"
 
 #include <thread>
+#include <iostream>
 
 void threadsend(void * pa)
 {
@@ -33,6 +34,7 @@ int main(int argc, char *argv[])
 
     void * pa1,*pa2,*pa3,*pa4,*pa5;
     void * pb1,*pb2,*pb3,*pb4,*pb5;
+    void * pblambda;
 
     pa1 = iv::modulecomm::RegisterSend("a1",100,1);
     pa2 = iv::modulecomm::RegisterSend("a2",100,1);
@@ -41,6 +43,14 @@ int main(int argc, char *argv[])
     pa5 = iv::modulecomm::RegisterSend("a6",1000000,1);
 
     pb1 = iv::modulecomm::RegisterRecv("b1",ListenPointCloud);
+    pblambda = iv::modulecomm::RegisterRecv("b1",[](const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname){
+        (void)strdata;
+        (void)nSize;
+        (void)index;
+        (void)dt;
+        (void)strmemname;
+        std::cout<<" lisent b1 in lambda."<<std::endl;
+    });
     pb2 = iv::modulecomm::RegisterRecv("b2",ListenPointCloud);
     pb3 = iv::modulecomm::RegisterRecv("b3",ListenPointCloud);
     pb4 = iv::modulecomm::RegisterRecv("b4",ListenPointCloud);

+ 3 - 1
src/tool/map_lanetoxodr/ui/dialogparkingfrompoint.cpp

@@ -26,6 +26,7 @@ DialogParkingFromPoint::DialogParkingFromPoint(Road * pRoad,double flon ,double
     ui->lineEdit_Width->setText("2.3");
     ui->lineEdit_DisOfPointAndFront->setText("2.65");
     ui->lineEdit_DistanceOfPointAndLeft->setText("1.15");
+    ui->lineEdit_id->setText("A001");
 
     mLon0 = glon0;
     mLat0 = glat0;
@@ -47,6 +48,7 @@ void DialogParkingFromPoint::on_pushButton_addparkingspace_clicked()
     double flen = ui->lineEdit_Length->text().toDouble();
     double fdistofront = ui->lineEdit_DisOfPointAndFront->text().toDouble();
     double fdistoleft = ui->lineEdit_DistanceOfPointAndLeft->text().toDouble();
+    QString strid = ui->lineEdit_id->text();
 
     double fx1,fy1;
     GaussProjCal(fLon,fLat,&fx1,&fy1);
@@ -106,7 +108,7 @@ void DialogParkingFromPoint::on_pushButton_addparkingspace_clicked()
         if(fhdgdiff > M_PI)fneart = fneart * (-1);
 
     }
-    pRoad->AddObject("0",fs,fneart,0);
+    pRoad->AddObject(strid.toStdString(),fs,fneart,0);
     Object * pObj = pRoad->GetLastAddedObject();
     pObj->Settype("parkingSpace");
     pObj->Sethdg(fhdg);

+ 24 - 1
src/tool/map_lanetoxodr/ui/dialogparkingfrompoint.ui

@@ -177,7 +177,7 @@
   <widget class="QPushButton" name="pushButton_addparkingspace">
    <property name="geometry">
     <rect>
-     <x>240</x>
+     <x>400</x>
      <y>390</y>
      <width>171</width>
      <height>41</height>
@@ -187,6 +187,29 @@
     <string>Add  ParkingSpace</string>
    </property>
   </widget>
+  <widget class="QLineEdit" name="lineEdit_id">
+   <property name="geometry">
+    <rect>
+     <x>133</x>
+     <y>390</y>
+     <width>141</width>
+     <height>41</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_8">
+   <property name="geometry">
+    <rect>
+     <x>20</x>
+     <y>390</y>
+     <width>101</width>
+     <height>41</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>id:</string>
+   </property>
+  </widget>
  </widget>
  <resources/>
  <connections/>

+ 9 - 0
src/tool/simple_planning_simulator/simple_planning_simulator.pro

@@ -6,6 +6,15 @@ CONFIG += c++17
 
 QMAKE_LFLAGS += -no-pie
 
+
+#DEFINES += SHOW_ONLY
+
+if(contains(DEFINES,SHOW_ONLY)){
+TARGET = simple_planning_simulator11
+}
+
+
+
 # You can make your code fail to compile if it uses deprecated APIs.
 # In order to do so, uncomment the following line.
 #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0