Browse Source

5-28 现场 外点校核功能debug,万集测量结果发布用于比对

yct 4 years ago
parent
commit
040318f9bc

+ 5 - 3
CMakeLists.txt

@@ -5,7 +5,8 @@ project(LidarMeasure)
 add_compile_options(-std=c++11)
 
 #add_definitions(-std=c++11 -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2)
-
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(nanomsg REQUIRED nanomsg)
 FIND_PACKAGE(OpenCV REQUIRED)
 FIND_PACKAGE(PCL REQUIRED)
 FIND_PACKAGE(Protobuf REQUIRED)
@@ -24,6 +25,7 @@ include_directories(
         plc
         src
         Locate
+        msg
         /usr/local/include
         /usr/local/include/modbus
         /usr/local/include/snap7
@@ -43,7 +45,7 @@ aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/terminor TERMINOR_SRC )
 aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/verify VERIFY_SRC )
 aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/system_manager SYS_SRC )
 aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/wj_lidar WJLIDAR_SRC )
-
+aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/msg MSG_SRC )
 
 
 add_executable(locate_sample  test/locate_sample.cpp ${LOCATE_SRC}  ${TASK_MANAGER_SRC} ${ERROR_SRC}
@@ -59,7 +61,7 @@ target_link_libraries(fence_debug ${GLOG_LIBRARIES} ${PROTOBUF_LIBRARIES} /usr/l
 
 
 add_executable(locate  main.cpp ${LOCATE_SRC} ${PLC_SRC} ${TERMINOR_SRC} ${TASK_MANAGER_SRC} ${LASER_SRC} ${ERROR_SRC}
-        ${TOOL_SRC} ${SYS_SRC} ${VERIFY_SRC} ${WJLIDAR_SRC})
+        ${TOOL_SRC} ${SYS_SRC} ${VERIFY_SRC} ${WJLIDAR_SRC} ${MSG_SRC})
 target_link_libraries(locate ${OpenCV_LIBS} ${CERES_LIBRARIES}
         ${GLOG_LIBRARIES} ${PCL_LIBRARIES} ${PROTOBUF_LIBRARIES} ipopt libtensorflow_cc.so
         tf_3dcnn_api.so pointSIFT_API.so dark.so /usr/local/lib/libmodbus.so /usr/local/lib/libglog.a

+ 664 - 0
msg/ground_measure_msg.pb.cc

@@ -0,0 +1,664 @@
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: ground_measure_msg.proto
+
+#include "ground_measure_msg.pb.h"
+
+#include <algorithm>
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/port.h>
+#include <google/protobuf/stubs/once.h>
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/wire_format_lite_inl.h>
+#include <google/protobuf/descriptor.h>
+#include <google/protobuf/generated_message_reflection.h>
+#include <google/protobuf/reflection_ops.h>
+#include <google/protobuf/wire_format.h>
+// This is a temporary google only hack
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+#include "third_party/protobuf/version.h"
+#endif
+// @@protoc_insertion_point(includes)
+namespace message {
+class Ground_measure_statu_msgDefaultTypeInternal {
+ public:
+  ::google::protobuf::internal::ExplicitlyConstructed<Ground_measure_statu_msg>
+      _instance;
+} _Ground_measure_statu_msg_default_instance_;
+}  // namespace message
+namespace protobuf_ground_5fmeasure_5fmsg_2eproto {
+void InitDefaultsGround_measure_statu_msgImpl() {
+  GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+  ::google::protobuf::internal::InitProtobufDefaults();
+#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  protobuf_message_5fbase_2eproto::InitDefaultsBase_info();
+  protobuf_message_5fbase_2eproto::InitDefaultsLocate_information();
+  {
+    void* ptr = &::message::_Ground_measure_statu_msg_default_instance_;
+    new (ptr) ::message::Ground_measure_statu_msg();
+    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
+  }
+  ::message::Ground_measure_statu_msg::InitAsDefaultInstance();
+}
+
+void InitDefaultsGround_measure_statu_msg() {
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsGround_measure_statu_msgImpl);
+}
+
+::google::protobuf::Metadata file_level_metadata[1];
+const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[2];
+
+const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Ground_measure_statu_msg, _has_bits_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Ground_measure_statu_msg, _internal_metadata_),
+  ~0u,  // no _extensions_
+  ~0u,  // no _oneof_case_
+  ~0u,  // no _weak_field_map_
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Ground_measure_statu_msg, base_info_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Ground_measure_statu_msg, id_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Ground_measure_statu_msg, laser_statu_vector_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Ground_measure_statu_msg, ground_statu_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Ground_measure_statu_msg, locate_information_realtime_),
+  0,
+  2,
+  ~0u,
+  3,
+  1,
+};
+static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+  { 0, 10, sizeof(::message::Ground_measure_statu_msg)},
+};
+
+static ::google::protobuf::Message const * const file_default_instances[] = {
+  reinterpret_cast<const ::google::protobuf::Message*>(&::message::_Ground_measure_statu_msg_default_instance_),
+};
+
+void protobuf_AssignDescriptors() {
+  AddDescriptors();
+  ::google::protobuf::MessageFactory* factory = NULL;
+  AssignDescriptors(
+      "ground_measure_msg.proto", schemas, file_default_instances, TableStruct::offsets, factory,
+      file_level_metadata, file_level_enum_descriptors, NULL);
+}
+
+void protobuf_AssignDescriptorsOnce() {
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
+}
+
+void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
+void protobuf_RegisterTypes(const ::std::string&) {
+  protobuf_AssignDescriptorsOnce();
+  ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1);
+}
+
+void AddDescriptorsImpl() {
+  InitDefaults();
+  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+      "\n\030ground_measure_msg.proto\022\007message\032\022mes"
+      "sage_base.proto\"\356\001\n\030Ground_measure_statu"
+      "_msg\022%\n\tbase_info\030\001 \002(\0132\022.message.Base_i"
+      "nfo\022\n\n\002id\030\002 \002(\005\0220\n\022laser_statu_vector\030\003 "
+      "\003(\0162\024.message.Laser_statu\022+\n\014ground_stat"
+      "u\030\004 \002(\0162\025.message.Ground_statu\022@\n\033locate"
+      "_information_realtime\030\005 \001(\0132\033.message.Lo"
+      "cate_information*U\n\013Laser_statu\022\024\n\020LASER"
+      "_DISCONNECT\020\000\022\017\n\013LASER_READY\020\001\022\016\n\nLASER_"
+      "BUSY\020\002\022\017\n\013LASER_FAULT\020\003*\201\001\n\014Ground_statu"
+      "\022\013\n\007Nothing\020\000\022\t\n\005Noise\020\001\022\017\n\013Car_correct\020"
+      "\002\022\020\n\014Car_left_out\020\003\022\021\n\rCar_right_out\020\004\022\017"
+      "\n\013Car_top_out\020\005\022\022\n\016Car_bottom_out\020\006"
+  };
+  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
+      descriptor, 515);
+  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
+    "ground_measure_msg.proto", &protobuf_RegisterTypes);
+  ::protobuf_message_5fbase_2eproto::AddDescriptors();
+}
+
+void AddDescriptors() {
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
+}
+// Force AddDescriptors() to be called at dynamic initialization time.
+struct StaticDescriptorInitializer {
+  StaticDescriptorInitializer() {
+    AddDescriptors();
+  }
+} static_descriptor_initializer;
+}  // namespace protobuf_ground_5fmeasure_5fmsg_2eproto
+namespace message {
+const ::google::protobuf::EnumDescriptor* Laser_statu_descriptor() {
+  protobuf_ground_5fmeasure_5fmsg_2eproto::protobuf_AssignDescriptorsOnce();
+  return protobuf_ground_5fmeasure_5fmsg_2eproto::file_level_enum_descriptors[0];
+}
+bool Laser_statu_IsValid(int value) {
+  switch (value) {
+    case 0:
+    case 1:
+    case 2:
+    case 3:
+      return true;
+    default:
+      return false;
+  }
+}
+
+const ::google::protobuf::EnumDescriptor* Ground_statu_descriptor() {
+  protobuf_ground_5fmeasure_5fmsg_2eproto::protobuf_AssignDescriptorsOnce();
+  return protobuf_ground_5fmeasure_5fmsg_2eproto::file_level_enum_descriptors[1];
+}
+bool Ground_statu_IsValid(int value) {
+  switch (value) {
+    case 0:
+    case 1:
+    case 2:
+    case 3:
+    case 4:
+    case 5:
+    case 6:
+      return true;
+    default:
+      return false;
+  }
+}
+
+
+// ===================================================================
+
+void Ground_measure_statu_msg::InitAsDefaultInstance() {
+  ::message::_Ground_measure_statu_msg_default_instance_._instance.get_mutable()->base_info_ = const_cast< ::message::Base_info*>(
+      ::message::Base_info::internal_default_instance());
+  ::message::_Ground_measure_statu_msg_default_instance_._instance.get_mutable()->locate_information_realtime_ = const_cast< ::message::Locate_information*>(
+      ::message::Locate_information::internal_default_instance());
+}
+void Ground_measure_statu_msg::clear_base_info() {
+  if (base_info_ != NULL) base_info_->Clear();
+  clear_has_base_info();
+}
+void Ground_measure_statu_msg::clear_locate_information_realtime() {
+  if (locate_information_realtime_ != NULL) locate_information_realtime_->Clear();
+  clear_has_locate_information_realtime();
+}
+#if !defined(_MSC_VER) || _MSC_VER >= 1900
+const int Ground_measure_statu_msg::kBaseInfoFieldNumber;
+const int Ground_measure_statu_msg::kIdFieldNumber;
+const int Ground_measure_statu_msg::kLaserStatuVectorFieldNumber;
+const int Ground_measure_statu_msg::kGroundStatuFieldNumber;
+const int Ground_measure_statu_msg::kLocateInformationRealtimeFieldNumber;
+#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
+
+Ground_measure_statu_msg::Ground_measure_statu_msg()
+  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+    ::protobuf_ground_5fmeasure_5fmsg_2eproto::InitDefaultsGround_measure_statu_msg();
+  }
+  SharedCtor();
+  // @@protoc_insertion_point(constructor:message.Ground_measure_statu_msg)
+}
+Ground_measure_statu_msg::Ground_measure_statu_msg(const Ground_measure_statu_msg& from)
+  : ::google::protobuf::Message(),
+      _internal_metadata_(NULL),
+      _has_bits_(from._has_bits_),
+      _cached_size_(0),
+      laser_statu_vector_(from.laser_statu_vector_) {
+  _internal_metadata_.MergeFrom(from._internal_metadata_);
+  if (from.has_base_info()) {
+    base_info_ = new ::message::Base_info(*from.base_info_);
+  } else {
+    base_info_ = NULL;
+  }
+  if (from.has_locate_information_realtime()) {
+    locate_information_realtime_ = new ::message::Locate_information(*from.locate_information_realtime_);
+  } else {
+    locate_information_realtime_ = NULL;
+  }
+  ::memcpy(&id_, &from.id_,
+    static_cast<size_t>(reinterpret_cast<char*>(&ground_statu_) -
+    reinterpret_cast<char*>(&id_)) + sizeof(ground_statu_));
+  // @@protoc_insertion_point(copy_constructor:message.Ground_measure_statu_msg)
+}
+
+void Ground_measure_statu_msg::SharedCtor() {
+  _cached_size_ = 0;
+  ::memset(&base_info_, 0, static_cast<size_t>(
+      reinterpret_cast<char*>(&ground_statu_) -
+      reinterpret_cast<char*>(&base_info_)) + sizeof(ground_statu_));
+}
+
+Ground_measure_statu_msg::~Ground_measure_statu_msg() {
+  // @@protoc_insertion_point(destructor:message.Ground_measure_statu_msg)
+  SharedDtor();
+}
+
+void Ground_measure_statu_msg::SharedDtor() {
+  if (this != internal_default_instance()) delete base_info_;
+  if (this != internal_default_instance()) delete locate_information_realtime_;
+}
+
+void Ground_measure_statu_msg::SetCachedSize(int size) const {
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* Ground_measure_statu_msg::descriptor() {
+  ::protobuf_ground_5fmeasure_5fmsg_2eproto::protobuf_AssignDescriptorsOnce();
+  return ::protobuf_ground_5fmeasure_5fmsg_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
+}
+
+const Ground_measure_statu_msg& Ground_measure_statu_msg::default_instance() {
+  ::protobuf_ground_5fmeasure_5fmsg_2eproto::InitDefaultsGround_measure_statu_msg();
+  return *internal_default_instance();
+}
+
+Ground_measure_statu_msg* Ground_measure_statu_msg::New(::google::protobuf::Arena* arena) const {
+  Ground_measure_statu_msg* n = new Ground_measure_statu_msg;
+  if (arena != NULL) {
+    arena->Own(n);
+  }
+  return n;
+}
+
+void Ground_measure_statu_msg::Clear() {
+// @@protoc_insertion_point(message_clear_start:message.Ground_measure_statu_msg)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  // Prevent compiler warnings about cached_has_bits being unused
+  (void) cached_has_bits;
+
+  laser_statu_vector_.Clear();
+  cached_has_bits = _has_bits_[0];
+  if (cached_has_bits & 3u) {
+    if (cached_has_bits & 0x00000001u) {
+      GOOGLE_DCHECK(base_info_ != NULL);
+      base_info_->Clear();
+    }
+    if (cached_has_bits & 0x00000002u) {
+      GOOGLE_DCHECK(locate_information_realtime_ != NULL);
+      locate_information_realtime_->Clear();
+    }
+  }
+  if (cached_has_bits & 12u) {
+    ::memset(&id_, 0, static_cast<size_t>(
+        reinterpret_cast<char*>(&ground_statu_) -
+        reinterpret_cast<char*>(&id_)) + sizeof(ground_statu_));
+  }
+  _has_bits_.Clear();
+  _internal_metadata_.Clear();
+}
+
+bool Ground_measure_statu_msg::MergePartialFromCodedStream(
+    ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
+  ::google::protobuf::uint32 tag;
+  // @@protoc_insertion_point(parse_start:message.Ground_measure_statu_msg)
+  for (;;) {
+    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    tag = p.first;
+    if (!p.second) goto handle_unusual;
+    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+      // required .message.Base_info base_info = 1;
+      case 1: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+               input, mutable_base_info()));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // required int32 id = 2;
+      case 2: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
+          set_has_id();
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+                 input, &id_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // repeated .message.Laser_statu laser_statu_vector = 3;
+      case 3: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
+          int value;
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+                 input, &value)));
+          if (::message::Laser_statu_IsValid(value)) {
+            add_laser_statu_vector(static_cast< ::message::Laser_statu >(value));
+          } else {
+            mutable_unknown_fields()->AddVarint(
+                3, static_cast< ::google::protobuf::uint64>(value));
+          }
+        } else if (
+            static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
+          DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(
+                 input,
+                 3,
+                 ::message::Laser_statu_IsValid,
+                 mutable_unknown_fields(),
+                 this->mutable_laser_statu_vector())));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // required .message.Ground_statu ground_statu = 4;
+      case 4: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
+          int value;
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+                 input, &value)));
+          if (::message::Ground_statu_IsValid(value)) {
+            set_ground_statu(static_cast< ::message::Ground_statu >(value));
+          } else {
+            mutable_unknown_fields()->AddVarint(
+                4, static_cast< ::google::protobuf::uint64>(value));
+          }
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // optional .message.Locate_information locate_information_realtime = 5;
+      case 5: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+               input, mutable_locate_information_realtime()));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      default: {
+      handle_unusual:
+        if (tag == 0) {
+          goto success;
+        }
+        DO_(::google::protobuf::internal::WireFormat::SkipField(
+              input, tag, _internal_metadata_.mutable_unknown_fields()));
+        break;
+      }
+    }
+  }
+success:
+  // @@protoc_insertion_point(parse_success:message.Ground_measure_statu_msg)
+  return true;
+failure:
+  // @@protoc_insertion_point(parse_failure:message.Ground_measure_statu_msg)
+  return false;
+#undef DO_
+}
+
+void Ground_measure_statu_msg::SerializeWithCachedSizes(
+    ::google::protobuf::io::CodedOutputStream* output) const {
+  // @@protoc_insertion_point(serialize_start:message.Ground_measure_statu_msg)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  cached_has_bits = _has_bits_[0];
+  // required .message.Base_info base_info = 1;
+  if (cached_has_bits & 0x00000001u) {
+    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+      1, *this->base_info_, output);
+  }
+
+  // required int32 id = 2;
+  if (cached_has_bits & 0x00000004u) {
+    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->id(), output);
+  }
+
+  // repeated .message.Laser_statu laser_statu_vector = 3;
+  for (int i = 0, n = this->laser_statu_vector_size(); i < n; i++) {
+    ::google::protobuf::internal::WireFormatLite::WriteEnum(
+      3, this->laser_statu_vector(i), output);
+  }
+
+  // required .message.Ground_statu ground_statu = 4;
+  if (cached_has_bits & 0x00000008u) {
+    ::google::protobuf::internal::WireFormatLite::WriteEnum(
+      4, this->ground_statu(), output);
+  }
+
+  // optional .message.Locate_information locate_information_realtime = 5;
+  if (cached_has_bits & 0x00000002u) {
+    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+      5, *this->locate_information_realtime_, output);
+  }
+
+  if (_internal_metadata_.have_unknown_fields()) {
+    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+        _internal_metadata_.unknown_fields(), output);
+  }
+  // @@protoc_insertion_point(serialize_end:message.Ground_measure_statu_msg)
+}
+
+::google::protobuf::uint8* Ground_measure_statu_msg::InternalSerializeWithCachedSizesToArray(
+    bool deterministic, ::google::protobuf::uint8* target) const {
+  (void)deterministic; // Unused
+  // @@protoc_insertion_point(serialize_to_array_start:message.Ground_measure_statu_msg)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  cached_has_bits = _has_bits_[0];
+  // required .message.Base_info base_info = 1;
+  if (cached_has_bits & 0x00000001u) {
+    target = ::google::protobuf::internal::WireFormatLite::
+      InternalWriteMessageToArray(
+        1, *this->base_info_, deterministic, target);
+  }
+
+  // required int32 id = 2;
+  if (cached_has_bits & 0x00000004u) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->id(), target);
+  }
+
+  // repeated .message.Laser_statu laser_statu_vector = 3;
+  target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+    3, this->laser_statu_vector_, target);
+
+  // required .message.Ground_statu ground_statu = 4;
+  if (cached_has_bits & 0x00000008u) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+      4, this->ground_statu(), target);
+  }
+
+  // optional .message.Locate_information locate_information_realtime = 5;
+  if (cached_has_bits & 0x00000002u) {
+    target = ::google::protobuf::internal::WireFormatLite::
+      InternalWriteMessageToArray(
+        5, *this->locate_information_realtime_, deterministic, target);
+  }
+
+  if (_internal_metadata_.have_unknown_fields()) {
+    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+        _internal_metadata_.unknown_fields(), target);
+  }
+  // @@protoc_insertion_point(serialize_to_array_end:message.Ground_measure_statu_msg)
+  return target;
+}
+
+size_t Ground_measure_statu_msg::RequiredFieldsByteSizeFallback() const {
+// @@protoc_insertion_point(required_fields_byte_size_fallback_start:message.Ground_measure_statu_msg)
+  size_t total_size = 0;
+
+  if (has_base_info()) {
+    // required .message.Base_info base_info = 1;
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::MessageSize(
+        *this->base_info_);
+  }
+
+  if (has_id()) {
+    // required int32 id = 2;
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::Int32Size(
+        this->id());
+  }
+
+  if (has_ground_statu()) {
+    // required .message.Ground_statu ground_statu = 4;
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::EnumSize(this->ground_statu());
+  }
+
+  return total_size;
+}
+size_t Ground_measure_statu_msg::ByteSizeLong() const {
+// @@protoc_insertion_point(message_byte_size_start:message.Ground_measure_statu_msg)
+  size_t total_size = 0;
+
+  if (_internal_metadata_.have_unknown_fields()) {
+    total_size +=
+      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+        _internal_metadata_.unknown_fields());
+  }
+  if (((_has_bits_[0] & 0x0000000d) ^ 0x0000000d) == 0) {  // All required fields are present.
+    // required .message.Base_info base_info = 1;
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::MessageSize(
+        *this->base_info_);
+
+    // required int32 id = 2;
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::Int32Size(
+        this->id());
+
+    // required .message.Ground_statu ground_statu = 4;
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::EnumSize(this->ground_statu());
+
+  } else {
+    total_size += RequiredFieldsByteSizeFallback();
+  }
+  // repeated .message.Laser_statu laser_statu_vector = 3;
+  {
+    size_t data_size = 0;
+    unsigned int count = static_cast<unsigned int>(this->laser_statu_vector_size());for (unsigned int i = 0; i < count; i++) {
+      data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
+        this->laser_statu_vector(static_cast<int>(i)));
+    }
+    total_size += (1UL * count) + data_size;
+  }
+
+  // optional .message.Locate_information locate_information_realtime = 5;
+  if (has_locate_information_realtime()) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::MessageSize(
+        *this->locate_information_realtime_);
+  }
+
+  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = cached_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
+  return total_size;
+}
+
+void Ground_measure_statu_msg::MergeFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_merge_from_start:message.Ground_measure_statu_msg)
+  GOOGLE_DCHECK_NE(&from, this);
+  const Ground_measure_statu_msg* source =
+      ::google::protobuf::internal::DynamicCastToGenerated<const Ground_measure_statu_msg>(
+          &from);
+  if (source == NULL) {
+  // @@protoc_insertion_point(generalized_merge_from_cast_fail:message.Ground_measure_statu_msg)
+    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+  } else {
+  // @@protoc_insertion_point(generalized_merge_from_cast_success:message.Ground_measure_statu_msg)
+    MergeFrom(*source);
+  }
+}
+
+void Ground_measure_statu_msg::MergeFrom(const Ground_measure_statu_msg& from) {
+// @@protoc_insertion_point(class_specific_merge_from_start:message.Ground_measure_statu_msg)
+  GOOGLE_DCHECK_NE(&from, this);
+  _internal_metadata_.MergeFrom(from._internal_metadata_);
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  laser_statu_vector_.MergeFrom(from.laser_statu_vector_);
+  cached_has_bits = from._has_bits_[0];
+  if (cached_has_bits & 15u) {
+    if (cached_has_bits & 0x00000001u) {
+      mutable_base_info()->::message::Base_info::MergeFrom(from.base_info());
+    }
+    if (cached_has_bits & 0x00000002u) {
+      mutable_locate_information_realtime()->::message::Locate_information::MergeFrom(from.locate_information_realtime());
+    }
+    if (cached_has_bits & 0x00000004u) {
+      id_ = from.id_;
+    }
+    if (cached_has_bits & 0x00000008u) {
+      ground_statu_ = from.ground_statu_;
+    }
+    _has_bits_[0] |= cached_has_bits;
+  }
+}
+
+void Ground_measure_statu_msg::CopyFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_copy_from_start:message.Ground_measure_statu_msg)
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+void Ground_measure_statu_msg::CopyFrom(const Ground_measure_statu_msg& from) {
+// @@protoc_insertion_point(class_specific_copy_from_start:message.Ground_measure_statu_msg)
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+bool Ground_measure_statu_msg::IsInitialized() const {
+  if ((_has_bits_[0] & 0x0000000d) != 0x0000000d) return false;
+  if (has_base_info()) {
+    if (!this->base_info_->IsInitialized()) return false;
+  }
+  return true;
+}
+
+void Ground_measure_statu_msg::Swap(Ground_measure_statu_msg* other) {
+  if (other == this) return;
+  InternalSwap(other);
+}
+void Ground_measure_statu_msg::InternalSwap(Ground_measure_statu_msg* other) {
+  using std::swap;
+  laser_statu_vector_.InternalSwap(&other->laser_statu_vector_);
+  swap(base_info_, other->base_info_);
+  swap(locate_information_realtime_, other->locate_information_realtime_);
+  swap(id_, other->id_);
+  swap(ground_statu_, other->ground_statu_);
+  swap(_has_bits_[0], other->_has_bits_[0]);
+  _internal_metadata_.Swap(&other->_internal_metadata_);
+  swap(_cached_size_, other->_cached_size_);
+}
+
+::google::protobuf::Metadata Ground_measure_statu_msg::GetMetadata() const {
+  protobuf_ground_5fmeasure_5fmsg_2eproto::protobuf_AssignDescriptorsOnce();
+  return ::protobuf_ground_5fmeasure_5fmsg_2eproto::file_level_metadata[kIndexInFileMessages];
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+}  // namespace message
+
+// @@protoc_insertion_point(global_scope)

+ 482 - 0
msg/ground_measure_msg.pb.h

@@ -0,0 +1,482 @@
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: ground_measure_msg.proto
+
+#ifndef PROTOBUF_ground_5fmeasure_5fmsg_2eproto__INCLUDED
+#define PROTOBUF_ground_5fmeasure_5fmsg_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 3005000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers.  Please update
+#error your headers.
+#endif
+#if 3005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers.  Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/arena.h>
+#include <google/protobuf/arenastring.h>
+#include <google/protobuf/generated_message_table_driven.h>
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/metadata.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>  // IWYU pragma: export
+#include <google/protobuf/extension_set.h>  // IWYU pragma: export
+#include <google/protobuf/generated_enum_reflection.h>
+#include <google/protobuf/unknown_field_set.h>
+#include "message_base.pb.h"
+// @@protoc_insertion_point(includes)
+
+namespace protobuf_ground_5fmeasure_5fmsg_2eproto {
+// Internal implementation detail -- do not use these members.
+struct TableStruct {
+  static const ::google::protobuf::internal::ParseTableField entries[];
+  static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
+  static const ::google::protobuf::internal::ParseTable schema[1];
+  static const ::google::protobuf::internal::FieldMetadata field_metadata[];
+  static const ::google::protobuf::internal::SerializationTable serialization_table[];
+  static const ::google::protobuf::uint32 offsets[];
+};
+void AddDescriptors();
+void InitDefaultsGround_measure_statu_msgImpl();
+void InitDefaultsGround_measure_statu_msg();
+inline void InitDefaults() {
+  InitDefaultsGround_measure_statu_msg();
+}
+}  // namespace protobuf_ground_5fmeasure_5fmsg_2eproto
+namespace message {
+class Ground_measure_statu_msg;
+class Ground_measure_statu_msgDefaultTypeInternal;
+extern Ground_measure_statu_msgDefaultTypeInternal _Ground_measure_statu_msg_default_instance_;
+}  // namespace message
+namespace message {
+
+enum Laser_statu {
+  LASER_DISCONNECT = 0,
+  LASER_READY = 1,
+  LASER_BUSY = 2,
+  LASER_FAULT = 3
+};
+bool Laser_statu_IsValid(int value);
+const Laser_statu Laser_statu_MIN = LASER_DISCONNECT;
+const Laser_statu Laser_statu_MAX = LASER_FAULT;
+const int Laser_statu_ARRAYSIZE = Laser_statu_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* Laser_statu_descriptor();
+inline const ::std::string& Laser_statu_Name(Laser_statu value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    Laser_statu_descriptor(), value);
+}
+inline bool Laser_statu_Parse(
+    const ::std::string& name, Laser_statu* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<Laser_statu>(
+    Laser_statu_descriptor(), name, value);
+}
+enum Ground_statu {
+  Nothing = 0,
+  Noise = 1,
+  Car_correct = 2,
+  Car_left_out = 3,
+  Car_right_out = 4,
+  Car_top_out = 5,
+  Car_bottom_out = 6
+};
+bool Ground_statu_IsValid(int value);
+const Ground_statu Ground_statu_MIN = Nothing;
+const Ground_statu Ground_statu_MAX = Car_bottom_out;
+const int Ground_statu_ARRAYSIZE = Ground_statu_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* Ground_statu_descriptor();
+inline const ::std::string& Ground_statu_Name(Ground_statu value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    Ground_statu_descriptor(), value);
+}
+inline bool Ground_statu_Parse(
+    const ::std::string& name, Ground_statu* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<Ground_statu>(
+    Ground_statu_descriptor(), name, value);
+}
+// ===================================================================
+
+class Ground_measure_statu_msg : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:message.Ground_measure_statu_msg) */ {
+ public:
+  Ground_measure_statu_msg();
+  virtual ~Ground_measure_statu_msg();
+
+  Ground_measure_statu_msg(const Ground_measure_statu_msg& from);
+
+  inline Ground_measure_statu_msg& operator=(const Ground_measure_statu_msg& from) {
+    CopyFrom(from);
+    return *this;
+  }
+  #if LANG_CXX11
+  Ground_measure_statu_msg(Ground_measure_statu_msg&& from) noexcept
+    : Ground_measure_statu_msg() {
+    *this = ::std::move(from);
+  }
+
+  inline Ground_measure_statu_msg& operator=(Ground_measure_statu_msg&& from) noexcept {
+    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
+      if (this != &from) InternalSwap(&from);
+    } else {
+      CopyFrom(from);
+    }
+    return *this;
+  }
+  #endif
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _internal_metadata_.unknown_fields();
+  }
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return _internal_metadata_.mutable_unknown_fields();
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const Ground_measure_statu_msg& default_instance();
+
+  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
+  static inline const Ground_measure_statu_msg* internal_default_instance() {
+    return reinterpret_cast<const Ground_measure_statu_msg*>(
+               &_Ground_measure_statu_msg_default_instance_);
+  }
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
+    0;
+
+  void Swap(Ground_measure_statu_msg* other);
+  friend void swap(Ground_measure_statu_msg& a, Ground_measure_statu_msg& b) {
+    a.Swap(&b);
+  }
+
+  // implements Message ----------------------------------------------
+
+  inline Ground_measure_statu_msg* New() const PROTOBUF_FINAL { return New(NULL); }
+
+  Ground_measure_statu_msg* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void CopyFrom(const Ground_measure_statu_msg& from);
+  void MergeFrom(const Ground_measure_statu_msg& from);
+  void Clear() PROTOBUF_FINAL;
+  bool IsInitialized() const PROTOBUF_FINAL;
+
+  size_t ByteSizeLong() const PROTOBUF_FINAL;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
+  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
+      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const PROTOBUF_FINAL;
+  void InternalSwap(Ground_measure_statu_msg* other);
+  private:
+  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+    return NULL;
+  }
+  inline void* MaybeArenaPtr() const {
+    return NULL;
+  }
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // repeated .message.Laser_statu laser_statu_vector = 3;
+  int laser_statu_vector_size() const;
+  void clear_laser_statu_vector();
+  static const int kLaserStatuVectorFieldNumber = 3;
+  ::message::Laser_statu laser_statu_vector(int index) const;
+  void set_laser_statu_vector(int index, ::message::Laser_statu value);
+  void add_laser_statu_vector(::message::Laser_statu value);
+  const ::google::protobuf::RepeatedField<int>& laser_statu_vector() const;
+  ::google::protobuf::RepeatedField<int>* mutable_laser_statu_vector();
+
+  // required .message.Base_info base_info = 1;
+  bool has_base_info() const;
+  void clear_base_info();
+  static const int kBaseInfoFieldNumber = 1;
+  const ::message::Base_info& base_info() const;
+  ::message::Base_info* release_base_info();
+  ::message::Base_info* mutable_base_info();
+  void set_allocated_base_info(::message::Base_info* base_info);
+
+  // optional .message.Locate_information locate_information_realtime = 5;
+  bool has_locate_information_realtime() const;
+  void clear_locate_information_realtime();
+  static const int kLocateInformationRealtimeFieldNumber = 5;
+  const ::message::Locate_information& locate_information_realtime() const;
+  ::message::Locate_information* release_locate_information_realtime();
+  ::message::Locate_information* mutable_locate_information_realtime();
+  void set_allocated_locate_information_realtime(::message::Locate_information* locate_information_realtime);
+
+  // required int32 id = 2;
+  bool has_id() const;
+  void clear_id();
+  static const int kIdFieldNumber = 2;
+  ::google::protobuf::int32 id() const;
+  void set_id(::google::protobuf::int32 value);
+
+  // required .message.Ground_statu ground_statu = 4;
+  bool has_ground_statu() const;
+  void clear_ground_statu();
+  static const int kGroundStatuFieldNumber = 4;
+  ::message::Ground_statu ground_statu() const;
+  void set_ground_statu(::message::Ground_statu value);
+
+  // @@protoc_insertion_point(class_scope:message.Ground_measure_statu_msg)
+ private:
+  void set_has_base_info();
+  void clear_has_base_info();
+  void set_has_id();
+  void clear_has_id();
+  void set_has_ground_statu();
+  void clear_has_ground_statu();
+  void set_has_locate_information_realtime();
+  void clear_has_locate_information_realtime();
+
+  // helper for ByteSizeLong()
+  size_t RequiredFieldsByteSizeFallback() const;
+
+  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+  ::google::protobuf::internal::HasBits<1> _has_bits_;
+  mutable int _cached_size_;
+  ::google::protobuf::RepeatedField<int> laser_statu_vector_;
+  ::message::Base_info* base_info_;
+  ::message::Locate_information* locate_information_realtime_;
+  ::google::protobuf::int32 id_;
+  int ground_statu_;
+  friend struct ::protobuf_ground_5fmeasure_5fmsg_2eproto::TableStruct;
+  friend void ::protobuf_ground_5fmeasure_5fmsg_2eproto::InitDefaultsGround_measure_statu_msgImpl();
+};
+// ===================================================================
+
+
+// ===================================================================
+
+#ifdef __GNUC__
+  #pragma GCC diagnostic push
+  #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif  // __GNUC__
+// Ground_measure_statu_msg
+
+// required .message.Base_info base_info = 1;
+inline bool Ground_measure_statu_msg::has_base_info() const {
+  return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void Ground_measure_statu_msg::set_has_base_info() {
+  _has_bits_[0] |= 0x00000001u;
+}
+inline void Ground_measure_statu_msg::clear_has_base_info() {
+  _has_bits_[0] &= ~0x00000001u;
+}
+inline const ::message::Base_info& Ground_measure_statu_msg::base_info() const {
+  const ::message::Base_info* p = base_info_;
+  // @@protoc_insertion_point(field_get:message.Ground_measure_statu_msg.base_info)
+  return p != NULL ? *p : *reinterpret_cast<const ::message::Base_info*>(
+      &::message::_Base_info_default_instance_);
+}
+inline ::message::Base_info* Ground_measure_statu_msg::release_base_info() {
+  // @@protoc_insertion_point(field_release:message.Ground_measure_statu_msg.base_info)
+  clear_has_base_info();
+  ::message::Base_info* temp = base_info_;
+  base_info_ = NULL;
+  return temp;
+}
+inline ::message::Base_info* Ground_measure_statu_msg::mutable_base_info() {
+  set_has_base_info();
+  if (base_info_ == NULL) {
+    base_info_ = new ::message::Base_info;
+  }
+  // @@protoc_insertion_point(field_mutable:message.Ground_measure_statu_msg.base_info)
+  return base_info_;
+}
+inline void Ground_measure_statu_msg::set_allocated_base_info(::message::Base_info* base_info) {
+  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+  if (message_arena == NULL) {
+    delete reinterpret_cast< ::google::protobuf::MessageLite*>(base_info_);
+  }
+  if (base_info) {
+    ::google::protobuf::Arena* submessage_arena = NULL;
+    if (message_arena != submessage_arena) {
+      base_info = ::google::protobuf::internal::GetOwnedMessage(
+          message_arena, base_info, submessage_arena);
+    }
+    set_has_base_info();
+  } else {
+    clear_has_base_info();
+  }
+  base_info_ = base_info;
+  // @@protoc_insertion_point(field_set_allocated:message.Ground_measure_statu_msg.base_info)
+}
+
+// required int32 id = 2;
+inline bool Ground_measure_statu_msg::has_id() const {
+  return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void Ground_measure_statu_msg::set_has_id() {
+  _has_bits_[0] |= 0x00000004u;
+}
+inline void Ground_measure_statu_msg::clear_has_id() {
+  _has_bits_[0] &= ~0x00000004u;
+}
+inline void Ground_measure_statu_msg::clear_id() {
+  id_ = 0;
+  clear_has_id();
+}
+inline ::google::protobuf::int32 Ground_measure_statu_msg::id() const {
+  // @@protoc_insertion_point(field_get:message.Ground_measure_statu_msg.id)
+  return id_;
+}
+inline void Ground_measure_statu_msg::set_id(::google::protobuf::int32 value) {
+  set_has_id();
+  id_ = value;
+  // @@protoc_insertion_point(field_set:message.Ground_measure_statu_msg.id)
+}
+
+// repeated .message.Laser_statu laser_statu_vector = 3;
+inline int Ground_measure_statu_msg::laser_statu_vector_size() const {
+  return laser_statu_vector_.size();
+}
+inline void Ground_measure_statu_msg::clear_laser_statu_vector() {
+  laser_statu_vector_.Clear();
+}
+inline ::message::Laser_statu Ground_measure_statu_msg::laser_statu_vector(int index) const {
+  // @@protoc_insertion_point(field_get:message.Ground_measure_statu_msg.laser_statu_vector)
+  return static_cast< ::message::Laser_statu >(laser_statu_vector_.Get(index));
+}
+inline void Ground_measure_statu_msg::set_laser_statu_vector(int index, ::message::Laser_statu value) {
+  assert(::message::Laser_statu_IsValid(value));
+  laser_statu_vector_.Set(index, value);
+  // @@protoc_insertion_point(field_set:message.Ground_measure_statu_msg.laser_statu_vector)
+}
+inline void Ground_measure_statu_msg::add_laser_statu_vector(::message::Laser_statu value) {
+  assert(::message::Laser_statu_IsValid(value));
+  laser_statu_vector_.Add(value);
+  // @@protoc_insertion_point(field_add:message.Ground_measure_statu_msg.laser_statu_vector)
+}
+inline const ::google::protobuf::RepeatedField<int>&
+Ground_measure_statu_msg::laser_statu_vector() const {
+  // @@protoc_insertion_point(field_list:message.Ground_measure_statu_msg.laser_statu_vector)
+  return laser_statu_vector_;
+}
+inline ::google::protobuf::RepeatedField<int>*
+Ground_measure_statu_msg::mutable_laser_statu_vector() {
+  // @@protoc_insertion_point(field_mutable_list:message.Ground_measure_statu_msg.laser_statu_vector)
+  return &laser_statu_vector_;
+}
+
+// required .message.Ground_statu ground_statu = 4;
+inline bool Ground_measure_statu_msg::has_ground_statu() const {
+  return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void Ground_measure_statu_msg::set_has_ground_statu() {
+  _has_bits_[0] |= 0x00000008u;
+}
+inline void Ground_measure_statu_msg::clear_has_ground_statu() {
+  _has_bits_[0] &= ~0x00000008u;
+}
+inline void Ground_measure_statu_msg::clear_ground_statu() {
+  ground_statu_ = 0;
+  clear_has_ground_statu();
+}
+inline ::message::Ground_statu Ground_measure_statu_msg::ground_statu() const {
+  // @@protoc_insertion_point(field_get:message.Ground_measure_statu_msg.ground_statu)
+  return static_cast< ::message::Ground_statu >(ground_statu_);
+}
+inline void Ground_measure_statu_msg::set_ground_statu(::message::Ground_statu value) {
+  assert(::message::Ground_statu_IsValid(value));
+  set_has_ground_statu();
+  ground_statu_ = value;
+  // @@protoc_insertion_point(field_set:message.Ground_measure_statu_msg.ground_statu)
+}
+
+// optional .message.Locate_information locate_information_realtime = 5;
+inline bool Ground_measure_statu_msg::has_locate_information_realtime() const {
+  return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void Ground_measure_statu_msg::set_has_locate_information_realtime() {
+  _has_bits_[0] |= 0x00000002u;
+}
+inline void Ground_measure_statu_msg::clear_has_locate_information_realtime() {
+  _has_bits_[0] &= ~0x00000002u;
+}
+inline const ::message::Locate_information& Ground_measure_statu_msg::locate_information_realtime() const {
+  const ::message::Locate_information* p = locate_information_realtime_;
+  // @@protoc_insertion_point(field_get:message.Ground_measure_statu_msg.locate_information_realtime)
+  return p != NULL ? *p : *reinterpret_cast<const ::message::Locate_information*>(
+      &::message::_Locate_information_default_instance_);
+}
+inline ::message::Locate_information* Ground_measure_statu_msg::release_locate_information_realtime() {
+  // @@protoc_insertion_point(field_release:message.Ground_measure_statu_msg.locate_information_realtime)
+  clear_has_locate_information_realtime();
+  ::message::Locate_information* temp = locate_information_realtime_;
+  locate_information_realtime_ = NULL;
+  return temp;
+}
+inline ::message::Locate_information* Ground_measure_statu_msg::mutable_locate_information_realtime() {
+  set_has_locate_information_realtime();
+  if (locate_information_realtime_ == NULL) {
+    locate_information_realtime_ = new ::message::Locate_information;
+  }
+  // @@protoc_insertion_point(field_mutable:message.Ground_measure_statu_msg.locate_information_realtime)
+  return locate_information_realtime_;
+}
+inline void Ground_measure_statu_msg::set_allocated_locate_information_realtime(::message::Locate_information* locate_information_realtime) {
+  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+  if (message_arena == NULL) {
+    delete reinterpret_cast< ::google::protobuf::MessageLite*>(locate_information_realtime_);
+  }
+  if (locate_information_realtime) {
+    ::google::protobuf::Arena* submessage_arena = NULL;
+    if (message_arena != submessage_arena) {
+      locate_information_realtime = ::google::protobuf::internal::GetOwnedMessage(
+          message_arena, locate_information_realtime, submessage_arena);
+    }
+    set_has_locate_information_realtime();
+  } else {
+    clear_has_locate_information_realtime();
+  }
+  locate_information_realtime_ = locate_information_realtime;
+  // @@protoc_insertion_point(field_set_allocated:message.Ground_measure_statu_msg.locate_information_realtime)
+}
+
+#ifdef __GNUC__
+  #pragma GCC diagnostic pop
+#endif  // __GNUC__
+
+// @@protoc_insertion_point(namespace_scope)
+
+}  // namespace message
+
+namespace google {
+namespace protobuf {
+
+template <> struct is_proto_enum< ::message::Laser_statu> : ::google::protobuf::internal::true_type {};
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::message::Laser_statu>() {
+  return ::message::Laser_statu_descriptor();
+}
+template <> struct is_proto_enum< ::message::Ground_statu> : ::google::protobuf::internal::true_type {};
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::message::Ground_statu>() {
+  return ::message::Ground_statu_descriptor();
+}
+
+}  // namespace protobuf
+}  // namespace google
+
+// @@protoc_insertion_point(global_scope)
+
+#endif  // PROTOBUF_ground_5fmeasure_5fmsg_2eproto__INCLUDED

+ 35 - 0
msg/ground_measure_msg.proto

@@ -0,0 +1,35 @@
+
+syntax = "proto2";
+package message;
+import "message_base.proto";
+
+//子雷达状态
+enum Laser_statu
+{
+	LASER_DISCONNECT	=0;	        //雷达断连
+	LASER_READY			=1;			//雷达正常待机,空闲
+	LASER_BUSY			=2;	        //雷达正在工作,正忙
+	LASER_FAULT			=3;         //雷达错误
+}
+
+enum Ground_statu
+{
+    Nothing=0;
+    Noise=1;
+    Car_correct=2;
+    Car_left_out=3;
+    Car_right_out=4;
+    Car_top_out=5;
+    Car_bottom_out=6;
+}
+
+
+//地面定位模块测量结果
+message Ground_measure_statu_msg
+{
+    required Base_info                  base_info=1;                 //消息类型
+    required int32                      id=2;
+    repeated Laser_statu                laser_statu_vector = 3;
+    required Ground_statu               ground_statu=4;
+    optional Locate_information         locate_information_realtime=5;  //地面雷达的 实时定位信息
+}

File diff suppressed because it is too large
+ 3268 - 0
msg/message_base.pb.cc


File diff suppressed because it is too large
+ 2377 - 0
msg/message_base.pb.h


+ 209 - 0
msg/message_base.proto

@@ -0,0 +1,209 @@
+syntax = "proto2";
+package message;
+
+//消息类型定义;每个在网络上传输的消息必须含有这个属性
+enum Message_type
+{
+    eBase_msg=0x00;
+    eCommand_msg=0x01;                      //指令消息
+
+
+    eLocate_status_msg=0x11;                //定位模块状态消息
+    eLocate_request_msg=0x12;               //定位请求消息
+    eLocate_response_msg=0x13;              //定位反馈消息
+
+
+    eDispatch_status_msg=0x21;                //调度模块硬件状态消息
+    eDispatch_request_msg=0x22;              //请求调度消息
+    eDispatch_response_msg=0x23;             //调度结果反馈消息
+
+    eParkspace_allocation_status_msg=0x31;  //车位分配模块状态消息,包括车位信息
+    eParkspace_allocation_request_msg=0x32; //请求分配车位消息
+    eParkspace_allocation_response_msg=0x33;//分配车位结果反馈消息
+    eParkspace_search_request_msg = 0x34;		//查询车位请求消息
+    eParkspace_search_response_msg = 0x35;		//查询车位反馈消息
+    eParkspace_release_request_msg = 0x36;		//释放车位请求消息
+    eParkspace_release_response_msg = 0x37;		//释放车位反馈消息
+    eParkspace_force_update_request_msg = 0x38;	//手动修改车位消息
+    eParkspace_force_update_response_msg = 0x39;//手动修改车位反馈消息
+    eParkspace_confirm_alloc_request_msg = 0x3A;//确认分配车位请求消息
+    eParkspace_confirm_alloc_response_msg = 0x3B;//确认分配车位反馈消息
+    eParkspace_refresh_request_msg=0x3C;        //请求更新车位数据
+    eParkspace_allocation_data_msg=0x3D;        //车位数据消息
+
+
+    eStore_command_request_msg=0x41;        //终端停车请求消息
+    eStore_command_response_msg=0x42;       //停车请求反馈消息
+    ePickup_command_request_msg=0x43;       //取车请求消息
+    ePickup_command_response_msg=0x44;       //取车请求反馈消息
+
+
+
+    eStoring_process_statu_msg=0x90;        //停车指令进度条消息
+    ePicking_process_statu_msg=0x91;        //取车指令进度消息
+
+
+    eCentral_controller_statu_msg=0xa0;     //中控系统状态消息
+
+
+    eEntrance_manual_operation_msg=0xb0;            //针对出入口状态操作的手动消息
+    eProcess_manual_operation_msg=0xb1;             //针对流程的手动消息
+
+
+    eGround_measure_statu_msg=0xc0;                 //地面雷达测量消息,状态消息,广播发送
+
+
+}
+
+//通讯单元
+enum Communicator
+{
+    eEmpty=0x0000;
+    eMain=0x0001;    //主流程
+
+    eTerminor=0x0100;
+    //车位表
+    eParkspace=0x0200;
+    //测量单元
+    eMeasurer=0x0300;
+    //调度机构
+    eDispatch=0x0400;
+    //...
+
+
+}
+////base message 用于解析未知类型的消息
+message Base_info
+{
+    required Message_type               msg_type=1;
+    optional int32                      timeout_ms=2;
+    required Communicator               sender=3;                       //发送者
+    required Communicator               receiver=4;                     //接收者
+}
+
+// 事件,停车或者取车
+enum Process_type
+{
+    eStoring=1;
+    ePicking=2;
+}
+
+
+message Base_msg
+{
+    required Base_info                  base_info=1;
+}
+
+//错误等级,用来做故障处理
+enum Error_level
+{
+    NORMAL                = 0;      //    正常,没有错误,默认值0
+
+    NEGLIGIBLE_ERROR      = 1;      //    轻微故障;可忽略的故障,NEGLIGIBLE_ERROR
+
+    MINOR_ERROR           = 2;      //    一般故障,MINOR_ERROR
+
+    MAJOR_ERROR           = 3;      //    严重故障,MAJOR_ERROR
+
+    CRITICAL_ERROR        = 4;      //    致命故障,CRITICAL_ERROR
+
+}
+
+message Error_manager
+{
+    required int32                      error_code = 1;
+    optional Error_level                error_level = 2;
+    optional string                     error_description = 3;
+}
+
+//测量结果结构体
+message Locate_information
+{    
+    optional float locate_x = 1;				//整车的中心点x值; 四轮的中心
+    optional float locate_y = 2;				//整车的中心点y值; 四轮的中心
+    optional float locate_angle = 3;			//整车的旋转角; 四轮的旋转角
+    optional float locate_length = 4;		    //整车的长度; 用于规避碰撞
+    optional float locate_width = 5;			//整车的宽度; 用于规避碰撞
+    optional float locate_height = 6;		    //整车的高度; 用于规避碰撞
+    optional float locate_wheel_base = 7;	    //整车的轮距; 前后轮的距离; 用于机器人或agv的抓车
+    optional float locate_wheel_width = 8;	    //整车的轮距; 左右轮的距离; 用于机器人或agv的抓车
+    optional bool locate_correct = 9;		    //整车的校准标记位
+    optional float locate_front_theta=10;       //前轮角
+}
+
+//车辆基本信息
+message Car_info
+{
+    optional float                      car_length=1;           //车长
+    optional float                      car_width=2;            //车宽
+    optional float                      car_height=3;           //车高
+    optional string                     license=4;              //车辆凭证号
+}
+
+//车位状态枚举
+enum Parkspace_status
+{
+    eParkspace_empty            = 0;         //空闲,可分配
+    eParkspace_occupied         = 1;         //被占用,不可分配
+    eParkspace_reserverd        = 2;         //被预约,预约车辆可分配
+    eParkspace_error            = 3;         //车位机械结构或硬件故障
+}
+
+enum Direction
+{
+    eForward = 1;
+    eBackward = 2;
+}
+
+//单个车位基本信息与状态信息,车位信息以及车位上的车辆信息
+message Parkspace_info
+{
+    optional int32              parkspace_id=1;         //车位编号
+    optional int32              index=2;                //同层编号
+    optional Direction          direction=3;            //前后
+    optional int32              floor=4;                //楼层
+    optional float              length=5;               //车位长
+    optional float              width=6;                //车位宽
+    optional float              height=7;               //车位高
+    optional Parkspace_status   parkspace_status=8;     //车位当前状态
+    optional Car_info           car_info=9;              //当前车位存入车辆的凭证号
+    optional string             entry_time=10;          //入场时间
+    optional string             leave_time=11;          //离场时间
+}
+
+/*
+*流程中的步骤类型, 例如:停车流程包含5个步骤 , 分配车位-测量-检验结果-搬运-更新车位表
+*/
+enum Step_type
+{
+    eAlloc_step=0;
+    eMeasure_step=1;
+    eCompare_step=2;
+    eDispatch_step=3;
+    eConfirm_step=4;
+
+    eSearch_step=5;        //查询数据库
+    eWait_step=6;             //等待车辆离开
+    eRelease_step=7;          //释放车位
+
+    eComplete=8;              //完成
+
+    eBackConfirm_step=9;
+    eBack_compare_step=10;
+    eBackMeasure_step=11;
+    eBackAlloc_step=12;
+
+    eBackWait_step=13;
+    eBackDispatch_step=14;
+    eBackSearch_step=15;
+
+    eBackComplete=16;
+}
+//步骤状态,每个步骤有四中可能状态 ,等待中-执行中-完成或者错误  四个状态
+enum Step_statu
+{
+    eWaiting=0;               //空闲
+    eWorking=1;
+    eError=2;
+    eFinished=3;
+}

+ 2 - 0
proto.sh

@@ -0,0 +1,2 @@
+protoc -I=./msg/ ground_measure_msg.proto --cpp_out=./msg/
+protoc -I=./msg/ message_base.proto --cpp_out=./msg/

+ 2 - 1
terminor/terminal_command_executor.cpp

@@ -581,12 +581,13 @@ Error_manager Terminor_Command_Executor::scanning_measuring() {
     // 安全判断,外点超过15个判断本次测量失败
     if(outside_point_count > 15)
     {
+        LOG(WARNING) << "机械手下降判断外点过多,存在风险: "<<outside_point_count;
         m_measure_information.locate_correct = false;
         code = Error_code::ERROR;
     }
 
     ////如果测量正确,检验结果
-    if (mp_verify_tool != NULL) {
+    if (mp_verify_tool != NULL && code==SUCCESS) {
 
         cv::RotatedRect rotated_rect;
         rotated_rect.center = cv::Point2f(m_measure_information.locate_x, m_measure_information.locate_y);

+ 55 - 0
wj_lidar/region_worker.cpp

@@ -5,6 +5,9 @@
 #include "plc_data.h"
 #include "measure_filter.h"
 
+#include "../msg/message_base.pb.h"
+#include "../msg/ground_measure_msg.pb.h"
+
 /**
  * 有参构造
  * */
@@ -23,6 +26,13 @@ mp_verify_handle(0)
     m_cond_exit.Notify(false);
     m_detect_thread = new std::thread(detect_loop, this);
     m_detect_thread->detach();
+
+    char port_buf[10]={0};
+    sprintf(port_buf, "%02d", id);
+    std::string pub_str = std::string(WJ_RESULT_PUB_STR)+port_buf;
+    LOG(WARNING) <<"conn: "<<pub_str;
+    m_sock.bind(pub_str);
+
 }
 
 /**
@@ -259,6 +269,51 @@ void Region_worker::detect_loop(Region_worker *worker)
                 p->update_data(code, border_status, worker->m_detector->get_region_id());
                 worker->m_update_plc_time = std::chrono::steady_clock::now();
             }
+
+            // 20210528 added by yct, 增加万集测量结果发布到总线,用于与多线结果比对
+            if(worker->get_id() == 5)
+            {
+                message::Ground_measure_statu_msg t_ground_result_msg;
+                message::Base_info t_base_info;
+                t_base_info.set_msg_type(message::Message_type::eGround_measure_statu_msg);
+                t_base_info.set_timeout_ms(1000);
+                t_base_info.set_sender(message::Communicator::eEmpty);
+                t_base_info.set_receiver(message::Communicator::eEmpty);
+                t_ground_result_msg.mutable_base_info()->CopyFrom(t_base_info);
+                t_ground_result_msg.set_id(worker->get_id());
+
+                message::Ground_statu t_ground_status;
+                if(code == REGION_WORKER_EMPTY_SPACE)
+                {
+                    t_ground_status = message::Ground_statu::Nothing;
+                }else if(code == REGION_WORKER_DETECT_ERROR)
+                {
+                    t_ground_status = message::Ground_statu::Noise;
+                }else{
+                    if(border_status == 0){
+                        t_ground_status = message::Ground_statu::Car_correct;
+                    }else if(border_status & 1 > 0) {
+                        t_ground_status = message::Ground_statu::Car_top_out;
+                    }else if(border_status & 2 > 0) {
+                        t_ground_status = message::Ground_statu::Car_bottom_out;
+                    }else if(border_status & 4 > 0) {
+                        t_ground_status = message::Ground_statu::Car_left_out;
+                    }else if(border_status & 8 > 0) {
+                        t_ground_status = message::Ground_statu::Car_right_out;
+                    }
+                }
+                t_ground_result_msg.set_ground_statu(t_ground_status);
+                message::Locate_information t_loc_info;
+                t_loc_info.set_locate_x(x);
+                t_loc_info.set_locate_y(y);
+                t_loc_info.set_locate_angle(angle);
+                t_loc_info.set_locate_wheel_base(wheelbase);
+                t_loc_info.set_locate_width(width);
+                t_loc_info.set_locate_front_theta(front_theta);
+                t_loc_info.set_locate_correct(true);
+                t_ground_result_msg.mutable_locate_information_realtime()->CopyFrom(t_loc_info);
+                worker->m_sock.send(t_ground_result_msg.SerializeAsString());
+            }
         }
     }
 }

+ 12 - 0
wj_lidar/region_worker.h

@@ -15,6 +15,11 @@
 #include "../error_code/error_code.h"
 #include "../verify/Verify_result.h"
 
+
+#include <nnxx/message>
+#include <nnxx/socket.h>
+#include <nnxx/bus.h>
+
 /**
  * 区域功能类,负责自动检测区域状态并更新到plc
  * */
@@ -30,6 +35,10 @@ public:
 #define REGION_WORKER_EMPTY_SPACE 1
 #define REGION_WORKER_HAS_CAR 2
 #define REGION_WORKER_DETECT_ERROR 3
+
+#define WJ_RESULT_PUB_STR "tcp://127.0.0.1:190"
+
+
 public:
     // 有参构造
     Region_worker(int id, wj::Region region, Verify_result* verify_handle);
@@ -65,6 +74,9 @@ private:
     std::mutex m_mutex;           // 点云互斥锁
 
     Verify_result* mp_verify_handle; // 边缘检测
+
+    // added by yct, 发送测量结果比对用
+    nnxx::socket m_sock{nnxx::SP, nnxx::BUS};
 };
 
 #endif //REGION_WORKER_H