Browse Source

change some code in shenlan.

pilot 1 year ago
parent
commit
90fbc0239e

File diff suppressed because it is too large
+ 5414 - 5565
src/detection/detection_lidar_cnn_segmentation/caffe/proto/caffe.pb.cc


File diff suppressed because it is too large
+ 181 - 476
src/detection/detection_lidar_cnn_segmentation/caffe/proto/caffe.pb.h


+ 8 - 0
src/detection/detection_lidar_cnn_segmentation/main.cpp

@@ -36,6 +36,8 @@ std::thread * gpthread;
 std::string gstrinput;
 std::string gstroutput;
 
+double g_intensityajust = 0;
+
 bool gbUseMultiCNN = false;
 
 static iv::lidar::PointXYZ pcltoprotopoint(pcl::PointXYZ x)
@@ -404,6 +406,9 @@ void ListenPointCloud(const char * strdata,const unsigned int nSize,const unsign
 //        {
             memcpy(&xp,p,sizeof(pcl::PointXYZI));
             xp.z = xp.z;
+            xp.intensity = xp.intensity + g_intensityajust;
+            if(xp.intensity>255)xp.intensity = 255;
+            if(xp.intensity<0)xp.intensity = 0;
             point_cloud->push_back(xp);
 
 //        }
@@ -576,12 +581,15 @@ int main(int argc, char *argv[])
     gstrinput = xparam.GetParam("input","lidar_pc");
     gstroutput = xparam.GetParam("output","lidar_cnn_dectect");
 
+
     double range,width,height;
     range = xparam.GetParam("range",60.0);
     width = xparam.GetParam("width",1024);
     height = xparam.GetParam("height",1024);
     int ncnn = xparam.GetParam("ncnn",2);
 
+    g_intensityajust = xparam.GetParam("intensityajust",0.0);
+
 //    std::string protofile = "/home/yuchuli/qt/bq/models/lidar/model.prototxt";
 //    std::string weightfile = "/home/yuchuli/qt/bq/models/lidar/model.caffemodel";
     gcnn.init(protofile,weightfile,range,0.6,width,height,false,true,0);

+ 2 - 2
src/detection/detection_radar_conti_sr308/main.cpp

@@ -193,8 +193,8 @@ int main(int argc, char *argv[])
 
     iv::xmlparam::Xmlparam xp(strpath.toStdString());
 
-    std::string strmemcan = xp.GetParam("canrecv","canrecv0_01910000829");
-    std::string strmemsend = xp.GetParam("cansend","cansend0_01910000829");
+    std::string strmemcan = xp.GetParam("canrecv","canrecv1");
+    std::string strmemsend = xp.GetParam("cansend","cansend1");
     std::string strmemradar = xp.GetParam("radar","radar4");
 
     gTime.start();

+ 6 - 2
src/driver/driver_service_maintain/service_maintain.cpp

@@ -17,6 +17,8 @@ service_maintain::service_maintain(iv::service_maintain_param & param)
 
     connect(mpServer,SIGNAL(readyRead()),this,SLOT(onRecvData()));
 
+    mhost.setAddress("255.255.255.0");
+
  //   StartService();
 
 
@@ -31,6 +33,7 @@ void service_maintain::onRecvData()
         QHostAddress host;
         quint16 port;
         mpServer->readDatagram(ba.data(),ba.size(),&host,&port);
+        mhost = host;
         std::cout<<" recevive data from "<<host.toString().toLatin1().data()<<":"<<port<<" data size: "<<ba.size()<<std::endl;
         ProcessData(ba);
     }
@@ -303,8 +306,9 @@ void service_maintain::BroadStatus()
         }
     }
 
-    mpBroad->writeDatagram(strout,nsize,QHostAddress::Broadcast,mnBroadPort);
-//    mpBroad->writeDatagram(strout,nsize,QHostAddress("10.16.1.239"),mnBroadPort);
+//    mpBroad->writeDatagram(strout,nsize,QHostAddress::Broadcast,mnBroadPort);
+    mpBroad->writeDatagram(strout,nsize,mhost,mnBroadPort);
+    mpBroad->flush();
     //Broad Data;
 }
 

+ 2 - 0
src/driver/driver_service_maintain/service_maintain.h

@@ -69,6 +69,8 @@ private:
     std::string mstrIniFile;
 
     QProcess * mpfrpProcess;
+
+    QHostAddress mhost;
 };
 
 #endif // SERVICE_MAINTAIN_H

+ 7 - 3
src/tool/pointcloudviewer/main.cpp

@@ -120,9 +120,13 @@ void ListenPointCloud(const char * strdata,const unsigned int nSize,const unsign
         xp.y = p->y;
         xp.z = p->z;
         xp.intensity = p->intensity;
+        if(xp.intensity>10)
+        {
         point_cloud->push_back(xp);
-        p++;
+
         ++point_cloud->width;
+        }
+         p++;
 
   //      std::cout<<" x is "<<xp.x<<" y is "<<xp.y<<std::endl;
     }
@@ -189,9 +193,9 @@ int main(int argc, char *argv[])
     showversion("pointcloudviewer");
     QCoreApplication a(argc, argv);
 
-//    snprintf(gstr_memname,255,"lidar_pc");
+    snprintf(gstr_memname,255,"lidar_pc");
 //    snprintf(gstr_memname,255,"lidar_pc_filter");
-    snprintf(gstr_memname,255,"lidarpc_center");
+//    snprintf(gstr_memname,255,"lidarpc_center");
 
 
     int nRtn = GetOptLong(argc,argv);

+ 4 - 4
src/tool/pointcloudviewer/pointcloudviewer.pro

@@ -63,9 +63,9 @@ LIBS += -lboost_system
 #LIBS += -lvtkCommonExecutionModel-9.1 -lvtkCommonCore-9.1 -lvtkRenderingLOD-9.1 -lvtkRenderingCore-9.1 \
 #       -lvtkFiltersSources-9.1
 
-LIBS += -lvtkCommonExecutionModel-7.1 -lvtkCommonCore-7.1 -lvtkRenderingLOD-7.1 -lvtkRenderingCore-7.1 \
-        -lvtkFiltersSources-7.1
+#LIBS += -lvtkCommonExecutionModel-7.1 -lvtkCommonCore-7.1 -lvtkRenderingLOD-7.1 -lvtkRenderingCore-7.1 \
+#        -lvtkFiltersSources-7.1
 
 
-#LIBS += -lvtkCommonExecutionModel-6.3 -lvtkCommonCore-6.3 -lvtkRenderingLOD-6.3 -lvtkRenderingCore-6.3 \
-#        -lvtkFiltersSources-6.3
+LIBS += -lvtkCommonExecutionModel-6.3 -lvtkCommonCore-6.3 -lvtkRenderingLOD-6.3 -lvtkRenderingCore-6.3 \
+        -lvtkFiltersSources-6.3

+ 2 - 0
src/v2x/v2xpc5/v2xpc5.pro

@@ -10,6 +10,8 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
 # deprecated API in order to know how to port your code away from it.
 DEFINES += QT_DEPRECATED_WARNINGS
 
+QMAKE_LFLAGS += -no-pie
+
 # You can also make your code fail to compile if you use deprecated APIs.
 # In order to do so, uncomment the following line.
 # You can also select to disable deprecated APIs only up to a certain version of Qt.

Some files were not shown because too many files changed in this diff