瀏覽代碼

change adapi_driver_lidar. add api for get lidar pointcloud.

yuchuli 5 月之前
父節點
當前提交
f185aa25a8

+ 74 - 0
src/api/adapi_driver_lidar/.gitignore

@@ -0,0 +1,74 @@
+# This file is used to ignore files which are generated
+# ----------------------------------------------------------------------------
+
+*~
+*.autosave
+*.a
+*.core
+*.moc
+*.o
+*.obj
+*.orig
+*.rej
+*.so
+*.so.*
+*_pch.h.cpp
+*_resource.rc
+*.qm
+.#*
+*.*#
+core
+!core/
+tags
+.DS_Store
+.directory
+*.debug
+Makefile*
+*.prl
+*.app
+moc_*.cpp
+ui_*.h
+qrc_*.cpp
+Thumbs.db
+*.res
+*.rc
+/.qmake.cache
+/.qmake.stash
+
+# qtcreator generated files
+*.pro.user*
+CMakeLists.txt.user*
+
+# xemacs temporary files
+*.flc
+
+# Vim temporary files
+.*.swp
+
+# Visual Studio generated files
+*.ib_pdb_index
+*.idb
+*.ilk
+*.pdb
+*.sln
+*.suo
+*.vcproj
+*vcproj.*.*.user
+*.ncb
+*.sdf
+*.opensdf
+*.vcxproj
+*vcxproj.*
+
+# MinGW generated files
+*.Debug
+*.Release
+
+# Python byte code
+*.pyc
+
+# Binaries
+# --------
+*.dll
+*.exe
+

+ 25 - 0
src/api/adapi_driver_lidar/adapi_driver_lidar.pro

@@ -0,0 +1,25 @@
+QT = core
+
+CONFIG += c++17 cmdline
+
+# 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
+
+SOURCES += \
+        main.cpp
+
+# Default rules for deployment.
+qnx: target.path = /tmp/$${TARGET}/bin
+else: unix:!android: target.path = /opt/$${TARGET}/bin
+!isEmpty(target.path): INSTALLS += target
+
+
+INCLUDEPATH += /usr/include/pcl-1.7
+INCLUDEPATH += /usr/include/pcl-1.8
+INCLUDEPATH += /usr/include/pcl-1.10
+INCLUDEPATH += /usr/include/pcl-1.12
+INCLUDEPATH += /usr/include/pcl-1.14
+INCLUDEPATH += /usr/include/eigen3
+
+LIBS += -L$$PWD -lmodulecomm

+ 58 - 0
src/api/adapi_driver_lidar/main.cpp

@@ -0,0 +1,58 @@
+#include <QCoreApplication>
+
+#include "modulecomm.h"
+
+#include <pcl/point_types.h>
+#include <pcl/point_cloud.h>
+
+static void * gpa;
+
+
+void ListenPointCloud(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname)
+{
+    (void)index;(void)dt;(void)strmemname;
+    if(nSize <=16)return;
+    unsigned int * pHeadSize = (unsigned int *)strdata;
+    if(*pHeadSize > nSize)
+    {
+        std::cout<<"ListenPointCloud data is small headsize ="<<*pHeadSize<<"  data size is"<<nSize<<std::endl;
+    }
+
+    pcl::PointCloud<pcl::PointXYZI>::Ptr point_cloud(
+        new pcl::PointCloud<pcl::PointXYZI>());
+    int nNameSize;
+    nNameSize = *pHeadSize - 4-4-8;
+    char * strName = new char[nNameSize+1];strName[nNameSize] = 0;
+    memcpy(strName,(char *)((char *)strdata +4),nNameSize);
+    point_cloud->header.frame_id = strName;
+    memcpy(&point_cloud->header.seq,(char *)strdata+4+nNameSize,4);
+    memcpy(&point_cloud->header.stamp,(char *)strdata+4+nNameSize+4,8);
+    int nPCount = (nSize - *pHeadSize)/sizeof(pcl::PointXYZI);
+    int i;
+    pcl::PointXYZI * p;
+    p = (pcl::PointXYZI *)((char *)strdata + *pHeadSize);
+    for(i=0;i<nPCount;i++)
+    {
+        pcl::PointXYZI xp;
+
+        memcpy(&xp,p,sizeof(pcl::PointXYZI));
+        point_cloud->push_back(xp);
+        p++;
+    }
+
+
+    //Call Your Funcion at this
+    // DectectOnePCD(point_cloud);
+
+
+}
+
+
+int main(int argc, char *argv[])
+{
+    QCoreApplication a(argc, argv);
+
+    gpa = iv::modulecomm::RegisterRecv("lidar_pc",ListenPointCloud);
+
+    return a.exec();
+}

文件差異過大導致無法顯示
+ 1261 - 1336
src/detection/detection_lidar_cnn_segmentation/caffe/proto/caffe.pb.cc


文件差異過大導致無法顯示
+ 242 - 228
src/detection/detection_lidar_cnn_segmentation/caffe/proto/caffe.pb.h


+ 52 - 52
src/tool/map_lanetoxodr/map_lanetoxodr.ts

@@ -1808,265 +1808,265 @@
     <message>
         <location filename="mainwindow.ui" line="80"/>
         <source>Help</source>
-        <translation>帮助</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="100"/>
         <source>&amp;Load</source>
-        <translation>&amp;加载</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="103"/>
         <source>Load XODR File</source>
-        <translation>加载XODR文件</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="108"/>
         <source>&amp;Save</source>
-        <translation>&amp;保存</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="111"/>
         <source>Save XODR File</source>
-        <translation>保存XODR文件</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="116"/>
         <source>&amp;AutoConnect</source>
-        <translation>&amp;自动连接</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="121"/>
         <source>&amp;Set Speed</source>
-        <translation>&amp;设置速度</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="126"/>
         <source>&amp;Edit Traffic Light</source>
-        <translation>&amp;编辑交通灯</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="131"/>
         <source>&amp;Edit Road</source>
-        <translation>&amp;编辑道路</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="134"/>
         <source>编辑道路</source>
-        <translation>编辑道路</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="139"/>
         <source>&amp;Add Road From RTK</source>
-        <translation>&amp;使用RTK数据增加道路</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="144"/>
         <source>&amp;Summary Road</source>
-        <translation>&amp;统计道路</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="149"/>
         <source>&amp;Calc Road S</source>
-        <translation>&amp;计算道路S值</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="154"/>
         <source>Back</source>
-        <translation>回退</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="157"/>
         <source>回退</source>
-        <translation>回退</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="162"/>
         <source>Edit &amp;Road Borrow</source>
-        <translation>&amp;编辑借道</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="167"/>
         <source>&amp;Make All Road Contact</source>
-        <translation>&amp;生成所有连接道路</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="172"/>
         <source>&amp;Hide Road</source>
-        <translation>&amp;隐藏道路</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="177"/>
         <source>Road Optimize</source>
-        <translation>道路优化</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="182"/>
         <source>Hide &amp;Selected</source>
-        <translation>&amp;隐藏选中道路</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="187"/>
         <source>&amp;Draw Road</source>
-        <translation>&amp;绘制道路</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="192"/>
         <source>Edit Road &amp;Noavoid</source>
-        <translation>&amp;编辑禁止避障道路</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="197"/>
         <source>Add &amp;Road From NDS</source>
-        <translation>&amp;从NDS数据增加道路</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="202"/>
         <source>CreateBefore</source>
-        <translation>在道路前段增加</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="205"/>
         <source>Create A road Before this road</source>
-        <translation>在当前道路前面增加延长道路</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="210"/>
         <source>CreateAfter</source>
-        <translation>在道路后端增加</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="213"/>
         <source>Create a road after this road</source>
-        <translation>在当前道路后面增加延长道路</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="218"/>
         <source>Add Road From Label</source>
-        <translation>从Label增加道路</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="223"/>
         <source>Draw Road From Label</source>
-        <translation>从Label绘制道路</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="228"/>
         <source>Add Roads From Labels</source>
-        <translation>从Labels绘制道路</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="233"/>
         <source>Edit Road Priority</source>
-        <translation>编辑道路优先级</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="238"/>
         <source>Export Current Road</source>
-        <translation>输出当前道路</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="243"/>
         <location filename="mainwindow.cpp" line="6169"/>
         <source>Optimize Road</source>
-        <translation>优化道路</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="248"/>
         <source>Add ParkSpace</source>
-        <translation>增加车位</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="478"/>
         <source>View Mode</source>
-        <translation>视图模式</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="483"/>
         <source>Line</source>
-        <translation>线段</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="484"/>
         <source>Scene</source>
-        <translation>实景</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="494"/>
         <source>Lat0</source>
-        <translation>原点纬度</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="499"/>
         <source>Lon0</source>
-        <translation>原点经度</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="504"/>
         <source>Head0</source>
-        <translation>原点航向</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="533"/>
         <source>ViewMove</source>
-        <translation>移动视图</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="553"/>
         <source>Restore Default View</source>
-        <translation>恢复默认</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="559"/>
         <source>Zoom One</source>
-        <translation>一比一缩放</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="567"/>
         <source>Scale</source>
-        <translation>缩放</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="633"/>
         <location filename="mainwindow.cpp" line="745"/>
         <location filename="mainwindow.cpp" line="808"/>
         <source>Mark</source>
-        <translation>标识</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="655"/>
         <source>SelLon</source>
-        <translation>经度选择</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="660"/>
         <source>SelLat</source>
-        <translation>纬度选择</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="707"/>
         <source>Set Move</source>
-        <translation>设置移动</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="714"/>
         <source>Reset Move</source>
-        <translation>重置移动</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="724"/>
         <source>Load Lane</source>
-        <translation>加载Lane数据</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="739"/>
         <source>Remove</source>
-        <translation>删除</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="751"/>
         <source>Clear Road Lane</source>
-        <translation>清除Lane</translation>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="761"/>

部分文件因文件數量過多而無法顯示