Ver Fonte

添加仓库,plc配准工具

LiuZe há 1 ano atrás
commit
9a1adf5944
12 ficheiros alterados com 1772 adições e 0 exclusões
  1. 79 0
      .gitignore
  2. 75 0
      CMakeLists.txt
  3. 418 0
      CMakeLists.txt.user
  4. 11 0
      main.cpp
  5. 192 0
      mainwindow.cpp
  6. 44 0
      mainwindow.h
  7. 380 0
      mainwindow.ui
  8. 10 0
      proto.sh
  9. 56 0
      proto_tool.cpp
  10. 54 0
      proto_tool.h
  11. 102 0
      velodyne_config.proto
  12. 351 0
      velodyne_manager.prototxt

+ 79 - 0
.gitignore

@@ -0,0 +1,79 @@
+# ---> C++
+# Compiled Object files
+*.slo
+*.lo
+*.o
+*.obj
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Compiled Dynamic libraries
+*.so
+*.dylib
+*.dll
+
+# Fortran module files
+*.mod
+
+# Compiled Static libraries
+*.lai
+*.la
+*.a
+*.lib
+
+# Executables
+*.exe
+*.out
+*.app
+
+# ---> C
+# Object files
+*.o
+*.ko
+*.obj
+*.elf
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Libraries
+*.lib
+*.a
+*.la
+*.lo
+
+# Shared objects (inc. Windows DLLs)
+*.dll
+*.so
+*.so.*
+*.dylib
+
+# Executables
+*.exe
+*.out
+*.app
+*.i*86
+*.x86_64
+*.hex
+
+# Debug files
+*.dSYM/
+
+# -------> build
+*build*
+
+# -------> vscode
+.vscode
+
+# -------> protobuf
+*.pb.cc
+*.pb.h
+
+# -------> 测试数据
+*/etc/data/*
+
+# -------> 缓存数据
+record/*

+ 75 - 0
CMakeLists.txt

@@ -0,0 +1,75 @@
+cmake_minimum_required(VERSION 3.5)
+
+project(PCLRegistrationTool VERSION 0.1 LANGUAGES CXX)
+
+set(CMAKE_AUTOUIC ON)
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+
+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+execute_process(COMMAND bash ${PROJECT_SOURCE_DIR}/proto.sh ${PROJECT_SOURCE_DIR})
+
+add_definitions(-DETC_PATH="${PROJECT_SOURCE_DIR}")
+
+find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets)
+find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)
+find_package(Protobuf REQUIRED)
+
+
+set(PROJECT_SOURCES
+        main.cpp
+        mainwindow.cpp
+        mainwindow.h
+        mainwindow.ui
+        proto_tool.cpp
+        proto_tool.h
+        velodyne_config.pb.h
+        velodyne_config.pb.cc
+)
+
+if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
+    qt_add_executable(PCLRegistrationTool
+        MANUAL_FINALIZATION
+        ${PROJECT_SOURCES}
+    )
+# Define target properties for Android with Qt 6 as:
+#    set_property(TARGET PCLRegistrationTool APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
+#                 ${CMAKE_CURRENT_SOURCE_DIR}/android)
+# For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation
+else()
+    if(ANDROID)
+        add_library(PCLRegistrationTool SHARED
+            ${PROJECT_SOURCES}
+        )
+# Define properties for Android with Qt 5 after find_package() calls as:
+#    set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
+    else()
+        add_executable(PCLRegistrationTool
+            ${PROJECT_SOURCES}
+        )
+    endif()
+endif()
+
+target_link_libraries(PCLRegistrationTool PRIVATE Qt${QT_VERSION_MAJOR}::Widgets
+    ${PROTOBUF_LIBRARIES}
+)
+
+set_target_properties(PCLRegistrationTool PROPERTIES
+    MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
+    MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
+    MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
+    MACOSX_BUNDLE TRUE
+    WIN32_EXECUTABLE TRUE
+)
+
+install(TARGETS PCLRegistrationTool
+    BUNDLE DESTINATION .
+    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+)
+
+if(QT_VERSION_MAJOR EQUAL 6)
+    qt_finalize_executable(PCLRegistrationTool)
+endif()

+ 418 - 0
CMakeLists.txt.user

@@ -0,0 +1,418 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE QtCreatorProject>
+<!-- Written by QtCreator 10.0.2, 2023-08-09T11:28:32. -->
+<qtcreator>
+ <data>
+  <variable>EnvironmentId</variable>
+  <value type="QByteArray">{d5ebf941-d8fd-4018-85ec-3213cde8e469}</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.ActiveTarget</variable>
+  <value type="qlonglong">0</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.EditorSettings</variable>
+  <valuemap type="QVariantMap">
+   <value type="bool" key="EditorConfiguration.AutoIndent">true</value>
+   <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
+   <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
+   <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
+    <value type="QString" key="language">Cpp</value>
+    <valuemap type="QVariantMap" key="value">
+     <value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
+    </valuemap>
+   </valuemap>
+   <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
+    <value type="QString" key="language">QmlJS</value>
+    <valuemap type="QVariantMap" key="value">
+     <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
+    </valuemap>
+   </valuemap>
+   <value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
+   <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
+   <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
+   <value type="int" key="EditorConfiguration.IndentSize">4</value>
+   <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
+   <value type="int" key="EditorConfiguration.MarginColumn">80</value>
+   <value type="bool" key="EditorConfiguration.MouseHiding">true</value>
+   <value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
+   <value type="int" key="EditorConfiguration.PaddingMode">1</value>
+   <value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
+   <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
+   <value type="bool" key="EditorConfiguration.ShowMargin">false</value>
+   <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
+   <value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
+   <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
+   <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
+   <value type="int" key="EditorConfiguration.TabSize">8</value>
+   <value type="bool" key="EditorConfiguration.UseGlobal">true</value>
+   <value type="bool" key="EditorConfiguration.UseIndenter">false</value>
+   <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
+   <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
+   <value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
+   <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
+   <value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
+   <value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
+   <value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
+   <value type="bool" key="EditorConfiguration.tintMarginArea">true</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.PluginSettings</variable>
+  <valuemap type="QVariantMap">
+   <valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
+    <value type="bool" key="AutoTest.Framework.Boost">true</value>
+    <value type="bool" key="AutoTest.Framework.CTest">false</value>
+    <value type="bool" key="AutoTest.Framework.Catch">true</value>
+    <value type="bool" key="AutoTest.Framework.GTest">true</value>
+    <value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
+    <value type="bool" key="AutoTest.Framework.QtTest">true</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
+   <value type="int" key="AutoTest.RunAfterBuild">0</value>
+   <value type="bool" key="AutoTest.UseGlobal">true</value>
+   <valuemap type="QVariantMap" key="ClangTools">
+    <value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
+    <value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
+    <value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
+    <value type="int" key="ClangTools.ParallelJobs">4</value>
+    <valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
+    <valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
+    <valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
+    <value type="bool" key="ClangTools.UseGlobalSettings">true</value>
+   </valuemap>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Target.0</variable>
+  <valuemap type="QVariantMap">
+   <value type="QString" key="DeviceType">Desktop</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.15.2 GCC 64bit</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.15.2 GCC 64bit</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5152.gcc_64_kit</value>
+   <value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
+   <value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
+   <value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
+    <value type="QString" key="CMake.Build.Type">Debug</value>
+    <value type="int" key="CMake.Configure.BaseEnvironment">2</value>
+    <value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
+    <value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja
+-DCMAKE_BUILD_TYPE:STRING=Debug
+-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{buildDir}/.qtc/package-manager/auto-setup.cmake
+-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
+-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
+-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
+-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
+-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value>
+    <value type="int" key="EnableQmlDebugging">0</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/zx/QtProjects/build-PCLRegistrationTool-Desktop_Qt_5_15_2_GCC_64bit-Debug</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">all</value>
+      </valuelist>
+      <value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">clean</value>
+      </valuelist>
+      <value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
+    <value type="QString" key="CMake.Build.Type">Release</value>
+    <value type="int" key="CMake.Configure.BaseEnvironment">2</value>
+    <value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
+    <value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja
+-DCMAKE_BUILD_TYPE:STRING=Release
+-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{buildDir}/.qtc/package-manager/auto-setup.cmake
+-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
+-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
+-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
+-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
+-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/zx/QtProjects/build-PCLRegistrationTool-Desktop_Qt_5_15_2_GCC_64bit-Release</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">all</value>
+      </valuelist>
+      <value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">clean</value>
+      </valuelist>
+      <value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
+    <value type="QString" key="CMake.Build.Type">RelWithDebInfo</value>
+    <value type="int" key="CMake.Configure.BaseEnvironment">2</value>
+    <value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
+    <value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja
+-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
+-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{buildDir}/.qtc/package-manager/auto-setup.cmake
+-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
+-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
+-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
+-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
+-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/zx/QtProjects/build-PCLRegistrationTool-Desktop_Qt_5_15_2_GCC_64bit-RelWithDebInfo</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">all</value>
+      </valuelist>
+      <value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">clean</value>
+      </valuelist>
+      <value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release with Debug Information</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.3">
+    <value type="QString" key="CMake.Build.Type">RelWithDebInfo</value>
+    <value type="int" key="CMake.Configure.BaseEnvironment">2</value>
+    <value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
+    <value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja
+-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
+-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{buildDir}/.qtc/package-manager/auto-setup.cmake
+-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
+-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
+-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
+-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
+-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value>
+    <value type="int" key="EnableQmlDebugging">0</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/zx/QtProjects/build-PCLRegistrationTool-Desktop_Qt_5_15_2_GCC_64bit-Profile</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">all</value>
+      </valuelist>
+      <value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">clean</value>
+      </valuelist>
+      <value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.4">
+    <value type="QString" key="CMake.Build.Type">MinSizeRel</value>
+    <value type="int" key="CMake.Configure.BaseEnvironment">2</value>
+    <value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
+    <value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja
+-DCMAKE_BUILD_TYPE:STRING=MinSizeRel
+-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{buildDir}/.qtc/package-manager/auto-setup.cmake
+-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
+-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
+-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
+-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
+-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/zx/QtProjects/build-PCLRegistrationTool-Desktop_Qt_5_15_2_GCC_64bit-MinSizeRel</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">all</value>
+      </valuelist>
+      <value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">clean</value>
+      </valuelist>
+      <value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Minimum Size Release</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
+   </valuemap>
+   <value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">5</value>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">部署</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">部署</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
+    <value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
+   </valuemap>
+   <value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
+    <value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
+    <value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
+    <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
+    <valuelist type="QVariantList" key="CustomOutputParsers"/>
+    <value type="int" key="PE.EnvironmentAspect.Base">2</value>
+    <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">PCLRegistrationTool</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.PCLRegistrationTool</value>
+    <value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">PCLRegistrationTool</value>
+    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
+    <value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+    <value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/zx/QtProjects/build-PCLRegistrationTool-Desktop_Qt_5_15_2_GCC_64bit-Release</value>
+   </valuemap>
+   <value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.TargetCount</variable>
+  <value type="qlonglong">1</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
+  <value type="int">22</value>
+ </data>
+ <data>
+  <variable>Version</variable>
+  <value type="int">22</value>
+ </data>
+</qtcreator>

+ 11 - 0
main.cpp

@@ -0,0 +1,11 @@
+#include "mainwindow.h"
+
+#include <QApplication>
+
+int main(int argc, char *argv[])
+{
+    QApplication a(argc, argv);
+    MainWindow w;
+    w.show();
+    return a.exec();
+}

+ 192 - 0
mainwindow.cpp

@@ -0,0 +1,192 @@
+#include "mainwindow.h"
+#include "./ui_mainwindow.h"
+
+MainWindow::MainWindow(QWidget *parent)
+    : QMainWindow(parent)
+    , ui(new Ui::MainWindow)
+{
+    ui->setupUi(this);
+
+    this->init(ETC_PATH"/velodyne_manager.prototxt");
+}
+
+MainWindow::~MainWindow()
+{
+    /**************** 作缓存记录 ****************/
+
+    velodyne::velodyneManagerParams velodyne_parameters;
+
+    if (!proto_tool::read_proto_param(ETC_PATH"/velodyne_manager.prototxt", velodyne_parameters)) {
+        std::cout << "失败" << std::endl;
+            return;
+    }
+
+    velodyne_parameters.clear_region();
+    for (auto &region: m_ground_region_map) {
+        velodyne_parameters.add_region()->CopyFrom(region.second);
+    }
+
+    proto_tool::write_proto_param(ETC_PATH"/velodyne_manager.prototxt", velodyne_parameters);
+
+    delete ui;
+}
+
+bool MainWindow::init(const std::string &filename) {
+    velodyne::velodyneManagerParams velodyne_parameters;
+
+    if (!proto_tool::read_proto_param(ETC_PATH"/velodyne_manager.prototxt", velodyne_parameters)) {
+        std::cout << "失败" << std::endl;
+        return false;
+    }
+
+    ui->Forward->setChecked(true);
+    ui->EntranceComboBox->clear();
+
+    m_ground_region_map.clear();
+    for (int i = 0; i < velodyne_parameters.region_size(); ++i) {
+//        std::cout << velodyne_parameters.region(i).region_id() << std::endl;
+        m_ground_region_map.insert(std::pair<int, velodyne::Region>(velodyne_parameters.region(i).region_id(), velodyne_parameters.region(i)));
+        ui->EntranceComboBox->addItem(QString::number(velodyne_parameters.region(i).region_id()));
+    }
+
+    showStatu();
+    return true;
+}
+
+void MainWindow::showStatu() {
+    QString entrance_txt = "入口id: " + ui->EntranceComboBox->currentText();
+
+    QString direction;
+    if (ui->Forward->isChecked()) {
+        direction = "正向";
+    }
+    else if (ui->Reverse->isChecked()) {
+        direction = "反向";
+    }
+
+    QString record_txt = "当前记录id: " + QString::number(record_id) + ", 最大记录id: " + QString::number(record_id_max);
+
+    ui->statusbar->showMessage(entrance_txt + ", " +
+                               direction + ", " +
+                               record_txt);
+}
+
+
+void MainWindow::on_ComputeButton_clicked()
+{
+    auto iter = m_ground_region_map.find(ui->EntranceComboBox->currentText().toInt());
+
+    /**************** 作计算处理 ****************/
+    double left_dis = ui->LeftFrontDIstance->value() - ui->LeftRearDistance->value();
+    double right_dis = ui->RightFrontDistance->value() - ui->RightRearDistance->value();
+    double angle_M = std::asin((left_dis - right_dis) * 0.5 / ui->WheelBase->value());
+    double offset_angle = -(angle_M * 180.0 / M_PI);
+
+    double front_dis = ui->LeftFrontDIstance->value() - ui->RightFrontDistance->value();
+//    double rear_dis = ui->LeftRearDistance->value() - ui->RightRearDistance->value();
+    double offset_x = -((front_dis) * 0.5 - (left_dis - right_dis) * 0.25) / 1000;
+
+    record_id++;
+    record_id_max = record_id;
+
+    velodyne::PlcOffset offset;
+    if (ui->Forward->isChecked()) {
+        offset.CopyFrom(iter->second.plc_forward_offset());
+        offset.set_plc_offsetx(iter->second.plc_forward_offset().plc_offsetx() + offset_x);
+        offset.set_plc_offset_degree(iter->second.plc_forward_offset().plc_offset_degree() + offset_angle);
+
+        iter->second.mutable_plc_forward_offset()->CopyFrom(offset);
+        ui->textEdit->append("*" + QString::number(record_id) + "* " + ui->EntranceComboBox->currentText() + "正向 计算结果: x轴需要调整" + QString::number(offset_x, 'f', 4)  + ", 角度需要调整" + QString::number(offset_angle, 'f', 4) + "度。");
+    }
+    else if (ui->Reverse->isChecked()) {
+        offset.CopyFrom(iter->second.plc_reverse_offset());
+        offset.set_plc_offsetx(iter->second.plc_reverse_offset().plc_offsetx() + offset_x);
+        offset.set_plc_offset_degree(iter->second.plc_reverse_offset().plc_offset_degree() + offset_angle);
+
+        iter->second.mutable_plc_reverse_offset()->CopyFrom(offset);
+        ui->textEdit->append("*" + QString::number(record_id) + "* " + ui->EntranceComboBox->currentText() + "反向 计算结果: x轴需要调整" + QString::number(offset_x, 'f', 4) + ", 角度需要调整" + QString::number(offset_angle, 'f', 4) + "度。");
+    }
+    /**************** 计算参数清零,防止多次误计算 ****************/
+    ui->LeftFrontDIstance->setValue(0);
+    ui->LeftRearDistance->setValue(0);
+    ui->RightFrontDistance->setValue(0);
+    ui->RightRearDistance->setValue(0);
+
+    /**************** 作缓存记录 ****************/
+
+    velodyne::velodyneManagerParams velodyne_parameters;
+
+    if (!proto_tool::read_proto_param(ETC_PATH"/velodyne_manager.prototxt", velodyne_parameters)) {
+        std::cout << "失败" << std::endl;
+            return;
+    }
+
+    velodyne_parameters.clear_region();
+    for (auto &region: m_ground_region_map) {
+            velodyne_parameters.add_region()->CopyFrom(region.second);
+    }
+
+    proto_tool::write_proto_param(ETC_PATH"/record/record_" + std::to_string(record_id) + ".prototxt", velodyne_parameters);
+
+    showStatu();
+}
+
+
+void MainWindow::on_EntranceComboBox_currentTextChanged(const QString &arg1)
+{
+    auto iter = m_ground_region_map.find(arg1.toInt());
+
+    ui->LeftFrontDIstance->setValue(0);
+    ui->LeftRearDistance->setValue(0);
+    ui->RightFrontDistance->setValue(0);
+    ui->RightRearDistance->setValue(0);
+
+    if (ui->Forward->isChecked()) {
+        ui->plc_offsetx->setText(QString::number(iter->second.plc_forward_offset().plc_offsetx(), 'f', 4));
+        ui->plc_offsety->setText(QString::number(iter->second.plc_forward_offset().plc_offsety(), 'f', 4));
+        ui->plc_offset_degree->setText(QString::number(iter->second.plc_forward_offset().plc_offset_degree(), 'f', 4));
+        ui->plc_offset_wheel_base->setText(QString::number(iter->second.plc_forward_offset().plc_offset_wheel_base(), 'f', 4));
+    }
+    else if (ui->Reverse->isChecked()) {
+        ui->plc_offsetx->setText(QString::number(iter->second.plc_reverse_offset().plc_offsetx(), 'f', 4));
+        ui->plc_offsety->setText(QString::number(iter->second.plc_reverse_offset().plc_offsety(), 'f', 4));
+        ui->plc_offset_degree->setText(QString::number(iter->second.plc_reverse_offset().plc_offset_degree(), 'f', 4));
+        ui->plc_offset_wheel_base->setText(QString::number(iter->second.plc_reverse_offset().plc_offset_wheel_base(), 'f', 4));
+    }
+
+    showStatu();
+}
+
+
+void MainWindow::on_Forward_clicked()
+{
+    on_EntranceComboBox_currentTextChanged(ui->EntranceComboBox->currentText());
+}
+
+
+void MainWindow::on_Reverse_clicked()
+{
+    on_EntranceComboBox_currentTextChanged(ui->EntranceComboBox->currentText());
+}
+
+void MainWindow::on_RedoButton_clicked()
+{
+    record_id++;
+    if (record_id <= record_id_max && record_id >= 0) {
+        init(ETC_PATH"/record/record_" + std::to_string(record_id) + ".prototxt");
+    } else {
+        record_id = record_id_max;
+    }
+}
+
+
+void MainWindow::on_QuashButton_clicked()
+{
+    record_id--;
+    if (record_id <= record_id_max && record_id >= 0) {
+        init(ETC_PATH"/record/record_" + std::to_string(record_id) + ".prototxt");
+    } else {
+        record_id = 0;
+    }
+}
+

+ 44 - 0
mainwindow.h

@@ -0,0 +1,44 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include "proto_tool.h"
+#include "velodyne_config.pb.h"
+#include <cmath>
+
+QT_BEGIN_NAMESPACE
+namespace Ui { class MainWindow; }
+QT_END_NAMESPACE
+
+class MainWindow : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+    MainWindow(QWidget *parent = nullptr);
+    ~MainWindow();
+
+private slots:
+    void on_ComputeButton_clicked();
+
+    void on_EntranceComboBox_currentTextChanged(const QString &arg1);
+
+    void on_Forward_clicked();
+
+    void on_Reverse_clicked();
+
+    void on_RedoButton_clicked();
+
+    void on_QuashButton_clicked();
+
+private:
+    bool init(const std::string &filename);
+    void showStatu();
+
+private:
+    Ui::MainWindow *ui;
+    int record_id = 0;
+    int record_id_max = 0;
+    std::map<int, velodyne::Region> m_ground_region_map;            // 区域功能实例指针数组, 内存由本类管理
+};
+#endif // MAINWINDOW_H

+ 380 - 0
mainwindow.ui

@@ -0,0 +1,380 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>600</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <widget class="QTextEdit" name="textEdit">
+    <property name="geometry">
+     <rect>
+      <x>20</x>
+      <y>170</y>
+      <width>601</width>
+      <height>401</height>
+     </rect>
+    </property>
+    <property name="focusPolicy">
+     <enum>Qt::NoFocus</enum>
+    </property>
+   </widget>
+   <widget class="QWidget" name="">
+    <property name="geometry">
+     <rect>
+      <x>630</x>
+      <y>0</y>
+      <width>148</width>
+      <height>585</height>
+     </rect>
+    </property>
+    <layout class="QVBoxLayout" name="verticalLayout_2">
+     <item>
+      <spacer name="verticalSpacer_3">
+       <property name="orientation">
+        <enum>Qt::Vertical</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>20</width>
+         <height>40</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <layout class="QFormLayout" name="formLayout">
+       <item row="0" column="0" colspan="2">
+        <widget class="QComboBox" name="EntranceComboBox"/>
+       </item>
+       <item row="1" column="0" colspan="2">
+        <widget class="QLabel" name="label_9">
+         <property name="text">
+          <string>入口</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignCenter</set>
+         </property>
+        </widget>
+       </item>
+       <item row="2" column="0">
+        <widget class="QRadioButton" name="Forward">
+         <property name="text">
+          <string>正向</string>
+         </property>
+        </widget>
+       </item>
+       <item row="2" column="1">
+        <widget class="QRadioButton" name="Reverse">
+         <property name="text">
+          <string>反向</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <spacer name="verticalSpacer">
+       <property name="orientation">
+        <enum>Qt::Vertical</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>20</width>
+         <height>40</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <layout class="QGridLayout" name="gridLayout">
+       <item row="0" column="0">
+        <layout class="QVBoxLayout" name="verticalLayout">
+         <item>
+          <widget class="QPushButton" name="ComputeButton">
+           <property name="text">
+            <string>计算</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="QuashButton">
+           <property name="text">
+            <string>撤销</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="RedoButton">
+           <property name="text">
+            <string>重做</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item row="1" column="0">
+        <layout class="QVBoxLayout" name="verticalLayout_6">
+         <item>
+          <widget class="QLineEdit" name="plc_offsetx">
+           <property name="focusPolicy">
+            <enum>Qt::NoFocus</enum>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QLabel" name="label_5">
+           <property name="text">
+            <string>X轴偏移(米)</string>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignCenter</set>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item row="2" column="0">
+        <layout class="QVBoxLayout" name="verticalLayout_7">
+         <item>
+          <widget class="QLineEdit" name="plc_offsety">
+           <property name="focusPolicy">
+            <enum>Qt::NoFocus</enum>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QLabel" name="label_6">
+           <property name="text">
+            <string>Y轴偏移(米)</string>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignCenter</set>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item row="3" column="0">
+        <layout class="QVBoxLayout" name="verticalLayout_8">
+         <item>
+          <widget class="QLineEdit" name="plc_offset_degree">
+           <property name="focusPolicy">
+            <enum>Qt::NoFocus</enum>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QLabel" name="label_7">
+           <property name="text">
+            <string>角度偏移(米)</string>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignCenter</set>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item row="4" column="0">
+        <layout class="QVBoxLayout" name="verticalLayout_9">
+         <item>
+          <widget class="QLineEdit" name="plc_offset_wheel_base">
+           <property name="focusPolicy">
+            <enum>Qt::NoFocus</enum>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QLabel" name="label_8">
+           <property name="text">
+            <string>轴距偏移(米)</string>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignCenter</set>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <spacer name="verticalSpacer_2">
+       <property name="orientation">
+        <enum>Qt::Vertical</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>20</width>
+         <height>40</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </widget>
+   <widget class="QWidget" name="">
+    <property name="geometry">
+     <rect>
+      <x>21</x>
+      <y>8</y>
+      <width>581</width>
+      <height>151</height>
+     </rect>
+    </property>
+    <layout class="QGridLayout" name="gridLayout_2">
+     <item row="0" column="0">
+      <layout class="QVBoxLayout" name="verticalLayout_4">
+       <item>
+        <widget class="QDoubleSpinBox" name="LeftFrontDIstance">
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+         <property name="decimals">
+          <number>3</number>
+         </property>
+         <property name="maximum">
+          <double>1000.000000000000000</double>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="label">
+         <property name="text">
+          <string>左前(毫米)</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignCenter</set>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item row="0" column="1">
+      <layout class="QVBoxLayout" name="verticalLayout_5">
+       <item>
+        <widget class="QDoubleSpinBox" name="RightFrontDistance">
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+         <property name="maximum">
+          <double>1000.000000000000000</double>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="label_2">
+         <property name="text">
+          <string>右前(毫米)</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignCenter</set>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item row="1" column="0">
+      <layout class="QVBoxLayout" name="verticalLayout_3">
+       <item>
+        <widget class="QDoubleSpinBox" name="LeftRearDistance">
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+         <property name="maximum">
+          <double>1000.000000000000000</double>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="label_3">
+         <property name="text">
+          <string>左后(毫米)</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignCenter</set>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item row="1" column="1">
+      <layout class="QVBoxLayout" name="verticalLayout_10">
+       <item>
+        <widget class="QDoubleSpinBox" name="RightRearDistance">
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+         <property name="maximum">
+          <double>1000.000000000000000</double>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="label_4">
+         <property name="text">
+          <string>右后(毫米)</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignCenter</set>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item row="1" column="2">
+      <layout class="QVBoxLayout" name="verticalLayout_11">
+       <item>
+        <widget class="QDoubleSpinBox" name="WheelBase">
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+         <property name="minimum">
+          <double>2500.000000000000000</double>
+         </property>
+         <property name="maximum">
+          <double>3200.000000000000000</double>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="label_11">
+         <property name="text">
+          <string>轴距(毫米)</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignCenter</set>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </widget>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>

+ 10 - 0
proto.sh

@@ -0,0 +1,10 @@
+###
+ # @Author: yct 18202736439@163.com
+ # @Date: 2022-07-26 23:01:22
+ # @LastEditors: yct 18202736439@163.com
+ # @LastEditTime: 2022-09-30 18:51:59
+ # @FilePath: /puai_wj_2021/proto.sh
+ # @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+### 
+protoc -I=./ velodyne_config.proto --cpp_out=./
+

+ 56 - 0
proto_tool.cpp

@@ -0,0 +1,56 @@
+
+
+
+#include "proto_tool.h"
+#include <fcntl.h>
+#include<unistd.h>
+#include <google/protobuf/io/zero_copy_stream_impl.h>
+#include <google/protobuf/text_format.h>
+using google::protobuf::io::FileInputStream;
+using google::protobuf::io::FileOutputStream;
+using google::protobuf::io::ZeroCopyInputStream;
+using google::protobuf::io::CodedInputStream;
+using google::protobuf::io::ZeroCopyOutputStream;
+using google::protobuf::io::CodedOutputStream;
+using google::protobuf::Message;
+
+
+//读取protobuf 配置文件,转化为protobuf参数形式
+//input:	prototxt_path :prototxt文件路径
+//ouput:	parameter: protobuf参数,这里是消息基类,实际调用时传入对应的子类即可。
+bool proto_tool::read_proto_param(std::string prototxt_path, ::google::protobuf::Message& protobuf_parameter)
+{
+	int fd = open(prototxt_path.c_str(), O_RDONLY);
+	if (fd == -1) return false;
+	FileInputStream* input = new FileInputStream(fd);
+	bool success = google::protobuf::TextFormat::Parse(input, &protobuf_parameter);
+	delete input;
+	close(fd);
+	return success;
+}
+
+//读取protobuf 配置文件,转化为protobuf参数形式
+//input:	prototxt_path :prototxt文件路径
+//ouput:	parameter: protobuf参数,这里是消息基类,实际调用时传入对应的子类即可。
+bool proto_tool::write_proto_param(std::string prototxt_path, ::google::protobuf::Message& protobuf_parameter)
+{
+    int fd = open(prototxt_path.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0644);
+    if (fd == -1) {
+        std::cout << "open false " << prototxt_path << std::endl;
+        return false;
+    }
+    FileOutputStream* output = new FileOutputStream(fd);
+    bool success = google::protobuf::TextFormat::Print(protobuf_parameter, output);
+    delete output;
+    close(fd);
+    return success;
+}
+
+
+
+
+
+
+
+
+

+ 54 - 0
proto_tool.h

@@ -0,0 +1,54 @@
+
+
+
+
+
+#ifndef __PROTO_TOOL_H
+#define __PROTO_TOOL_H
+
+#include <istream>
+#include <google/protobuf/message.h>
+
+class proto_tool {
+public:
+	// 必须关闭拷贝构造和赋值构造,只能通过 get_instance 函数来进行操作唯一的实例。
+	proto_tool(const proto_tool&)=delete;
+	proto_tool& operator =(const proto_tool&)= delete;
+	~proto_tool()=default;
+private:
+	// 父类的构造函数必须保护,子类的构造函数必须私有。
+	proto_tool()=default;
+
+
+public:
+	//读取protobuf 配置文件,转化为protobuf参数形式
+	//input:	prototxt_path :prototxt文件路径
+	//ouput:	parameter: protobuf参数,这里是消息基类,实际调用时传入对应的子类即可。
+	static bool read_proto_param(std::string prototxt_path, ::google::protobuf::Message& protobuf_parameter);
+
+    static bool write_proto_param(std::string prototxt_path, ::google::protobuf::Message& protobuf_parameter);
+};
+
+
+
+
+#endif //__PROTO_TOOL_H
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 102 - 0
velodyne_config.proto

@@ -0,0 +1,102 @@
+syntax = "proto2";
+package velodyne;
+
+message velodyneManagerParams
+{
+  repeated velodyneLidarParams velodyne_lidars = 1;
+  repeated Region region = 2;
+  optional string fence_data_path = 3 [default = ""];
+  optional string fence_log_path = 4 [default = ""];
+  optional string left_model_path = 5 [default = ""];
+  optional string right_model_path = 6 [default = ""];
+  required bool distribution_mode = 7 [default = false];//是否分布式模式,分布式模式下,各程序仅启动与自身区域相关模块
+}
+
+message velodyneLidarParams
+{
+  required string ip = 1[default = ""];
+  required int32 port = 2[default = 2368];
+  required string model = 3[default = "VLP16"];
+  required string calibrationFile = 4[default = ""];
+  required int32 lidar_id = 5[default = 0];
+  optional float max_range = 6[default = 10.0];
+  optional float min_range = 7[default = 0.15];
+  optional int32 min_angle = 8[default = 0];
+  optional int32 max_angle = 9[default = 360];
+  optional int32 rpm = 10[default = 600];
+  optional CalibParameter calib = 11;
+  optional int32 difop = 12[default = 7788];
+}
+
+message CalibParameter
+{
+  optional float r = 1 [default = 0];
+  optional float p = 2 [default = 0];
+  optional float y = 3 [default = 0];
+  optional float cx = 4 [default = 0];
+  optional float cy = 5 [default = 0];
+  optional float cz = 6 [default = 0];
+}
+
+message lidarExtrinsic
+{
+  required int32 lidar_id = 1;
+  optional CalibParameter calib = 2;
+}
+
+message outOfRangeInfo {
+  required float border_minx = 1; // 最小边界x,左超界提示
+  required float border_maxx = 2; // 最大边界x,右超界提示
+  required float plc_border_miny = 3;// plc后夹持y方向极限值
+  required float plc_border_maxy = 4;// plc后夹持y方向极限值
+  required float car_min_width = 5; // 最小车宽
+  required float car_max_width = 6; // 最大车宽
+  required float car_min_wheelbase = 7; // 最小轴距
+  required float car_max_wheelbase = 8; // 最大轴距
+  required float turnplate_angle_limit_min_clockwise = 9; // 转盘逆时针角度极限
+  required float turnplate_angle_limit_max_clockwise = 10; // 转盘顺时针角度极限
+}
+
+message PlcOffset {
+  required float plc_offsetx = 1; // plc偏移x
+  required float plc_offsety = 2; // plc偏移y
+  required float plc_offset_degree = 3; // plc偏移角度
+  required float plc_offset_wheel_base = 4; // plc偏移角度
+}
+
+message ZXPoint {
+  optional float x = 1   [default = 0];
+  optional float y = 2   [default = 0];
+  optional float z = 3   [default = 0];
+  optional float w = 4   [default = 0];
+}
+message CutBox {
+  repeated ZXPoint cut_points = 1;
+}
+
+message Region
+{
+  // 入口id
+  required int32 region_id = 1;
+  // 裁减区域
+  required float minx = 2;
+  required float maxx = 3;
+  required float miny = 4;
+  required float maxy = 5;
+  required float minz = 6;
+  required float maxz = 7;
+  required CutBox cut_box = 8;
+  // 转盘旋转中心
+  required float turnplate_cx = 9;
+  required float turnplate_cy = 10;
+  // 区域雷达
+  repeated lidarExtrinsic lidar_exts = 11;   // 雷达配置
+  // plc正向校准
+  required PlcOffset plc_forward_offset = 12;
+  // plc反向校准
+  required PlcOffset plc_reverse_offset = 13;
+  // 车辆范围限制
+  required outOfRangeInfo car_range_info = 14;
+  // 终端范围限制
+  required outOfRangeInfo terminal_range_info = 15;
+}

+ 351 - 0
velodyne_manager.prototxt

@@ -0,0 +1,351 @@
+velodyne_lidars {
+  ip: ""
+  port: 2367
+  model: "RSHELIOS16"
+  calibrationFile: "../setting/VLP16db.yaml"
+  lidar_id: 6311
+}
+velodyne_lidars {
+  ip: ""
+  port: 2369
+  model: "RSHELIOS16"
+  calibrationFile: "../setting/VLP16db.yaml"
+  lidar_id: 6312
+}
+velodyne_lidars {
+  ip: ""
+  port: 2370
+  model: "RSHELIOS16"
+  calibrationFile: "../setting/VLP16db.yaml"
+  lidar_id: 6313
+}
+velodyne_lidars {
+  ip: ""
+  port: 2371
+  model: "RSHELIOS16"
+  calibrationFile: "../setting/VLP16db.yaml"
+  lidar_id: 6314
+}
+velodyne_lidars {
+  ip: ""
+  port: 2371
+  model: "RSHELIOS16"
+  calibrationFile: "../setting/VLP16db.yaml"
+  lidar_id: 6315
+}
+velodyne_lidars {
+  ip: ""
+  port: 2371
+  model: "RSHELIOS16"
+  calibrationFile: "../setting/VLP16db.yaml"
+  lidar_id: 6316
+}
+velodyne_lidars {
+  ip: ""
+  port: 2367
+  model: "RSHELIOS16"
+  calibrationFile: "../setting/VLP16db.yaml"
+  lidar_id: 6321
+}
+velodyne_lidars {
+  ip: ""
+  port: 2369
+  model: "RSHELIOS16"
+  calibrationFile: "../setting/VLP16db.yaml"
+  lidar_id: 6322
+}
+velodyne_lidars {
+  ip: ""
+  port: 2370
+  model: "RSHELIOS16"
+  calibrationFile: "../setting/VLP16db.yaml"
+  lidar_id: 6323
+}
+velodyne_lidars {
+  ip: ""
+  port: 2371
+  model: "RSHELIOS16"
+  calibrationFile: "../setting/VLP16db.yaml"
+  lidar_id: 6324
+}
+region {
+  region_id: 3117
+  minx: -3.2
+  maxx: -0.42
+  miny: -2.73
+  maxy: 2.73
+  minz: 0.04
+  maxz: 0.5
+  cut_box {
+    cut_points {
+      x: -3.248
+      y: 1.6974
+    }
+    cut_points {
+      x: -2.876
+      y: 2.974
+    }
+    cut_points {
+      x: -0.381
+      y: 2.9024
+    }
+    cut_points {
+      x: -0.149
+      y: 1.934
+    }
+    cut_points {
+      x: -0.195
+      y: -2.785
+    }
+    cut_points {
+      x: -3.076
+      y: -2.785
+    }
+    cut_points {
+      x: -3.576
+      y: -2.2345
+    }
+  }
+  turnplate_cx: -1.602
+  turnplate_cy: 0.123
+  lidar_exts {
+    lidar_id: 6311
+  }
+  lidar_exts {
+    lidar_id: 6312
+  }
+  lidar_exts {
+    lidar_id: 6313
+  }
+  lidar_exts {
+    lidar_id: 6314
+  }
+  plc_forward_offset {
+    plc_offsetx: 0.033364
+    plc_offsety: -6.35546398
+    plc_offset_degree: -89.32
+    plc_offset_wheel_base: -0.01
+  }
+  plc_reverse_offset {
+    plc_offsetx: 0.013081
+    plc_offsety: -6.35911417
+    plc_offset_degree: -90.13
+    plc_offset_wheel_base: -0.01
+  }
+  car_range_info {
+    border_minx: -1.79
+    border_maxx: -1.41
+    plc_border_miny: 1.49
+    plc_border_maxy: 1.55
+    car_min_width: 1.55
+    car_max_width: 1.95
+    car_min_wheelbase: 2
+    car_max_wheelbase: 3.2
+    turnplate_angle_limit_min_clockwise: -5.3
+    turnplate_angle_limit_max_clockwise: 5.3
+  }
+  terminal_range_info {
+    border_minx: -1.79
+    border_maxx: -1.41
+    plc_border_miny: 1.49
+    plc_border_maxy: 1.55
+    car_min_width: 1.55
+    car_max_width: 1.95
+    car_min_wheelbase: 2
+    car_max_wheelbase: 3.2
+    turnplate_angle_limit_min_clockwise: -5.3
+    turnplate_angle_limit_max_clockwise: 5.3
+  }
+}
+region {
+  region_id: 3118
+  minx: 0.4
+  maxx: 2.8
+  miny: -2.6
+  maxy: 2.7
+  minz: 0.04
+  maxz: 0.5
+  cut_box {
+    cut_points {
+      x: 0.202236
+      y: 1.94702
+    }
+    cut_points {
+      x: 0.611436
+      y: 2.91914
+    }
+    cut_points {
+      x: 2.7929
+      y: 2.853
+    }
+    cut_points {
+      x: 3.4343
+      y: 1.9964
+    }
+    cut_points {
+      x: 3.567
+      y: -1.474
+    }
+    cut_points {
+      x: 3.136
+      y: -2.66
+    }
+    cut_points {
+      x: 0.4147
+      y: -2.7
+    }
+    cut_points {
+      x: 0.455
+      y: -1.46
+    }
+  }
+  turnplate_cx: 1.63245
+  turnplate_cy: 0.065
+  lidar_exts {
+    lidar_id: 6313
+  }
+  lidar_exts {
+    lidar_id: 6314
+  }
+  lidar_exts {
+    lidar_id: 6315
+  }
+  lidar_exts {
+    lidar_id: 6316
+  }
+  plc_forward_offset {
+    plc_offsetx: 0.0405550115
+    plc_offsety: -6.31662941
+    plc_offset_degree: -89.2456
+    plc_offset_wheel_base: -0
+  }
+  plc_reverse_offset {
+    plc_offsetx: 0.00274304
+    plc_offsety: -6.31662941
+    plc_offset_degree: -90.07
+    plc_offset_wheel_base: -0
+  }
+  car_range_info {
+    border_minx: 1.41
+    border_maxx: 1.79
+    plc_border_miny: 1.49
+    plc_border_maxy: 1.55
+    car_min_width: 1.55
+    car_max_width: 1.95
+    car_min_wheelbase: 2.3
+    car_max_wheelbase: 3.15
+    turnplate_angle_limit_min_clockwise: -5.3
+    turnplate_angle_limit_max_clockwise: 5.3
+  }
+  terminal_range_info {
+    border_minx: 1.41
+    border_maxx: 1.79
+    plc_border_miny: 1.49
+    plc_border_maxy: 1.55
+    car_min_width: 1.55
+    car_max_width: 1.95
+    car_min_wheelbase: 2.3
+    car_max_wheelbase: 3.15
+    turnplate_angle_limit_min_clockwise: -5.3
+    turnplate_angle_limit_max_clockwise: 5.3
+  }
+}
+region {
+  region_id: 3219
+  minx: -1.2
+  maxx: 1.12
+  miny: -2.6
+  maxy: 2.9
+  minz: 0.03
+  maxz: 0.5
+  cut_box {
+    cut_points {
+      x: -1.764
+      y: 1.537
+    }
+    cut_points {
+      x: -1.8198
+      y: 1.99788
+    }
+    cut_points {
+      x: -1.31579
+      y: 2.95532
+    }
+    cut_points {
+      x: 1.2329
+      y: 2.89
+    }
+    cut_points {
+      x: 2.01
+      y: 1.959
+    }
+    cut_points {
+      x: 2.01
+      y: -2.629
+    }
+    cut_points {
+      x: -1.269
+      y: -2.726
+    }
+    cut_points {
+      x: -1.96
+      y: -1.3466
+    }
+    cut_points {
+      x: -1.764
+      y: 1.137
+    }
+  }
+  turnplate_cx: -0.09
+  turnplate_cy: 0.18
+  lidar_exts {
+    lidar_id: 6321
+  }
+  lidar_exts {
+    lidar_id: 6322
+  }
+  lidar_exts {
+    lidar_id: 6323
+  }
+  lidar_exts {
+    lidar_id: 6324
+  }
+  plc_forward_offset {
+    plc_offsetx: -1.4842
+    plc_offsety: -6.43046665
+    plc_offset_degree: -89.3703
+    plc_offset_wheel_base: -0.01
+  }
+  plc_reverse_offset {
+    plc_offsetx: -1.4962
+    plc_offsety: -6.43046665
+    plc_offset_degree: -89.6403
+    plc_offset_wheel_base: -0.01
+  }
+  car_range_info {
+    border_minx: -1.79
+    border_maxx: -1.41
+    plc_border_miny: 1.49
+    plc_border_maxy: 1.55
+    car_min_width: 1.55
+    car_max_width: 1.95
+    car_min_wheelbase: 2.3
+    car_max_wheelbase: 3.15
+    turnplate_angle_limit_min_clockwise: -5.3
+    turnplate_angle_limit_max_clockwise: 5.3
+  }
+  terminal_range_info {
+    border_minx: -1.79
+    border_maxx: -1.41
+    plc_border_miny: 1.49
+    plc_border_maxy: 1.55
+    car_min_width: 1.55
+    car_max_width: 1.95
+    car_min_wheelbase: 2.3
+    car_max_wheelbase: 3.15
+    turnplate_angle_limit_min_clockwise: -5.3
+    turnplate_angle_limit_max_clockwise: 5.3
+  }
+}
+fence_data_path: "/home/zx/data/ground_detect/"
+distribution_mode: false