浏览代码

add globalrelocation.not complete.

yuchuli 1 年之前
父节点
当前提交
ccc67e6910

+ 4 - 2
src/detection/detection_ndt_matching/detection_ndt_matching.pro

@@ -29,7 +29,8 @@ SOURCES += main.cpp \
     ../../include/msgtype/imu.pb.cc \
     ../../include/msgtype/imu.pb.cc \
     ../../include/msgtype/gpsimu.pb.cc \
     ../../include/msgtype/gpsimu.pb.cc \
     ../../include/msgtype/gps.pb.cc \
     ../../include/msgtype/gps.pb.cc \
-    ../../include/msgtype/ndtgpspos.pb.cc
+    ../../include/msgtype/ndtgpspos.pb.cc \
+    globalrelocation.cpp
 
 
 HEADERS += \
 HEADERS += \
     ndt_matching.h \
     ndt_matching.h \
@@ -38,7 +39,8 @@ HEADERS += \
     ../../include/msgtype/imu.pb.h \
     ../../include/msgtype/imu.pb.h \
     ../../include/msgtype/gpsimu.pb.h \
     ../../include/msgtype/gpsimu.pb.h \
     ../../include/msgtype/gps.pb.h \
     ../../include/msgtype/gps.pb.h \
-    ../../include/msgtype/ndtgpspos.pb.h
+    ../../include/msgtype/ndtgpspos.pb.h \
+    globalrelocation.h
 
 
 INCLUDEPATH += /opt/ros/melodic/include
 INCLUDEPATH += /opt/ros/melodic/include
 INCLUDEPATH += /opt/ros/kinetic/include
 INCLUDEPATH += /opt/ros/kinetic/include

+ 11 - 0
src/detection/detection_ndt_matching/globalrelocation.cpp

@@ -0,0 +1,11 @@
+#include "globalrelocation.h"
+
+GlobalRelocation::GlobalRelocation()
+{
+
+}
+
+void GlobalRelocation::threadReloc(int nThread,cpu::NormalDistributionsTransform<pcl::PointXYZ, pcl::PointXYZ> * pndt)
+{
+
+}

+ 29 - 0
src/detection/detection_ndt_matching/globalrelocation.h

@@ -0,0 +1,29 @@
+#ifndef GLOBALRELOCATION_H
+#define GLOBALRELOCATION_H
+
+#include <ndt_cpu/NormalDistributionsTransform.h>
+
+#include <thread>
+#include "ndt_matching.h"
+
+#define MAX_NDT 100
+
+class GlobalRelocation
+{
+public:
+    GlobalRelocation();
+
+    void pointreloc(pcl::PointCloud<pcl::PointXYZ>::Ptr raw_scan);
+
+private:
+    cpu::NormalDistributionsTransform<pcl::PointXYZ, pcl::PointXYZ> mndt[MAX_NDT];
+
+    std::vector<iv::ndtmaptrace> mvectorndtmap;
+
+    void threadReloc(int nThread,cpu::NormalDistributionsTransform<pcl::PointXYZ, pcl::PointXYZ> * pndt);
+
+    int mnThreadNum = 8;
+
+};
+
+#endif // GLOBALRELOCATION_H