فهرست منبع

20210926, 通信test

huli 3 سال پیش
والد
کامیت
c50d9f454a

+ 1 - 1
dispatch/dispatch_communication.cpp

@@ -183,7 +183,7 @@ Error_manager Dispatch_communication::communication_init(int plc_id)
 	t_variable_information_vector.push_back(Snap7_buf::Variable_information{"m_reserved217_231", typeid(unsigned char).name(), t_index,sizeof(unsigned char), 25 });
 	t_index += sizeof(unsigned char)*25;
 
-	t_snap7_buf.init(DISPATCH_PLC_STATUS_FROM_MANAGER_TO_PLC_DBNUMBER_0 +m_plc_id*100, 0, sizeof(Dispatch_response_from_plc_to_manager), t_variable_information_vector, Snap7_buf::LOOP_COMMUNICATION);
+	t_snap7_buf.init(DISPATCH_RESPONSE_FROM_PLC_TO_MANAGER_DBNUMBER_0 +m_plc_id*100, 0, sizeof(Dispatch_response_from_plc_to_manager), t_variable_information_vector, Snap7_buf::LOOP_COMMUNICATION);
 	m_receive_buf_map[0] = t_snap7_buf;
 
 

+ 4 - 0
dispatch/dispatch_ground_lidar.cpp

@@ -61,6 +61,10 @@ Error_manager Dispatch_ground_lidar::execute_for_ground_status_msg(message::Grou
 	m_ground_status_msg = ground_status_msg;
 	m_ground_status_msg_updata_time = std::chrono::system_clock::now();
 	m_ground_status_msg_updata_flag = true;
+
+	std::cout << " huli test :::: " << " ---------------------------------------------------- = " << std::endl;
+	std::cout << " huli test :::: " << " m_ground_status_msg = " << m_ground_status_msg.DebugString() << std::endl;
+
 	return Error_code::SUCCESS;
 }
 

+ 22 - 2
dispatch/dispatch_plc.cpp

@@ -290,7 +290,8 @@ Error_manager Dispatch_plc::update_dispatch_plc_communication()
 {
 	std::unique_lock<std::mutex> t_lock(m_lock);
 	std::unique_lock<std::mutex> t_lock1(Dispatch_communication::get_instance_references().m_data_lock);
-/*
+
+	/*
 	//请求消息, 调度->plc
 	Dispatch_communication::Dispatch_request_from_manager_to_plc_for_data * tp_dispatch_request_from_manager_to_plc_for_data =
 	& Dispatch_communication::get_instance_references().m_dispatch_request_from_manager_to_plc_for_data;
@@ -300,7 +301,9 @@ Error_manager Dispatch_plc::update_dispatch_plc_communication()
 	int t_size1 = m_request_key.size()<=50 ? m_request_key.size() : 50 ;
 	m_request_key = "123456789";
 	memcpy(m_dispatch_request_from_manager_to_plc_for_key->m_request_key, m_request_key.c_str(), t_size1);
-	tp_dispatch_request_from_manager_to_plc_for_data->m_request_dispatch_motion_direction = 01;
+	static unsigned char index = 0;
+	index++;
+	tp_dispatch_request_from_manager_to_plc_for_data->m_request_dispatch_motion_direction  = index;
 	tp_dispatch_request_from_manager_to_plc_for_data->m_request_passageway_id = 02;
 	tp_dispatch_request_from_manager_to_plc_for_data->m_request_passageway_direction = 03;
 	tp_dispatch_request_from_manager_to_plc_for_data->m_request_parkingspace_index_id = 04;
@@ -326,6 +329,7 @@ Error_manager Dispatch_plc::update_dispatch_plc_communication()
 	tp_dispatch_request_from_manager_to_plc_for_data->m_request_car_wheel_base_exact_value = 55;
 */
 
+
  	//请求消息, 调度->plc
 	Dispatch_communication::Dispatch_request_from_manager_to_plc_for_data * tp_dispatch_request_from_manager_to_plc_for_data =
 	& Dispatch_communication::get_instance_references().m_dispatch_request_from_manager_to_plc_for_data;
@@ -389,6 +393,22 @@ Error_manager Dispatch_plc::update_dispatch_plc_communication()
 	m_response_car_type = (Common_data::Car_type) tp_dispatch_response_from_plc_to_manager->m_response_car_type;
 	m_response_anticollision_lidar_flag = (Common_data::Anticollision_lidar_flag)tp_dispatch_response_from_plc_to_manager->m_response_anticollision_lidar_flag;
 	m_response_car_wheel_base_exact_value = tp_dispatch_response_from_plc_to_manager->m_response_car_wheel_base_exact_value;
+/*
+	std::cout << " huli test :::: " << " ------------------------------------------------------ = " << std::endl;
+	std::cout << " huli test :::: " << " m_response_key = " << m_response_key << std::endl;
+	std::cout << " huli test :::: " << " m_response_status = " << (int)m_response_status << std::endl;
+	std::cout << " huli test :::: " << " m_response_dispatch_motion_direction = " << (int)m_response_dispatch_motion_direction << std::endl;
+	std::cout << " huli test :::: " << " m_response_passageway_id = " << m_response_passageway_id << std::endl;
+	std::cout << " huli test :::: " << " m_response_passageway_direction = " << (int)m_response_passageway_direction << std::endl;
+	std::cout << " huli test :::: " << " m_response_parkingspace_index_id = " << m_response_parkingspace_index_id << std::endl;
+	std::cout << " huli test :::: " << " m_response_parkingspace_unit_id = " << m_response_parkingspace_unit_id << std::endl;
+	std::cout << " huli test :::: " << " m_response_parkingspace_floor_id = " << m_response_parkingspace_floor_id << std::endl;
+	std::cout << " huli test :::: " << " m_response_parkingspace_room_id = " << m_response_parkingspace_room_id << std::endl;
+	std::cout << " huli test :::: " << " m_response_parkingspace_direction = " << (int)m_response_parkingspace_direction << std::endl;
+	std::cout << " huli test :::: " << " m_response_car_center_x = " << m_response_car_center_x << std::endl;
+	std::cout << " huli test :::: " << " m_response_car_center_y = " << m_response_car_center_y << std::endl;
+	std::cout << " huli test :::: " << " m_response_car_license = " << m_response_car_license << std::endl;
+*/
 
 	//状态消息, plc->调度
 	Dispatch_communication::Dispatch_plc_status_from_plc_to_manager * tp_dispatch_plc_status_from_plc_to_manager =

+ 181 - 108
message/message_base.pb.cc

@@ -230,6 +230,8 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_information, locate_wheel_width_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_information, locate_correct_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_information, locate_front_theta_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_information, uniformed_car_x_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Locate_information, uniformed_car_y_),
   0,
   1,
   2,
@@ -240,6 +242,8 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   7,
   8,
   9,
+  10,
+  11,
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Car_info, _has_bits_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Car_info, _internal_metadata_),
   ~0u,  // no _extensions_
@@ -301,9 +305,9 @@ static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROT
   { 0, 9, sizeof(::message::Base_info)},
   { 13, 19, sizeof(::message::Base_msg)},
   { 20, 28, sizeof(::message::Error_manager)},
-  { 31, 46, sizeof(::message::Locate_information)},
-  { 56, 67, sizeof(::message::Car_info)},
-  { 73, 95, sizeof(::message::Parkspace_info)},
+  { 31, 48, sizeof(::message::Locate_information)},
+  { 60, 71, sizeof(::message::Car_info)},
+  { 77, 99, sizeof(::message::Parkspace_info)},
 };
 
 static ::google::protobuf::Message const * const file_default_instances[] = {
@@ -346,110 +350,111 @@ void AddDescriptorsImpl() {
       "\001 \002(\0132\022.message.Base_info\"v\n\rError_manag"
       "er\022\025\n\nerror_code\030\001 \002(\005:\0010\0221\n\013error_level"
       "\030\002 \001(\0162\024.message.Error_level:\006NORMAL\022\033\n\021"
-      "error_description\030\003 \001(\t:\000\"\237\002\n\022Locate_inf"
+      "error_description\030\003 \001(\t:\000\"\321\002\n\022Locate_inf"
       "ormation\022\023\n\010locate_x\030\001 \001(\002:\0010\022\023\n\010locate_"
       "y\030\002 \001(\002:\0010\022\027\n\014locate_angle\030\003 \001(\002:\0010\022\030\n\rl"
       "ocate_length\030\004 \001(\002:\0010\022\027\n\014locate_width\030\005 "
       "\001(\002:\0010\022\030\n\rlocate_height\030\006 \001(\002:\0010\022\034\n\021loca"
       "te_wheel_base\030\007 \001(\002:\0010\022\035\n\022locate_wheel_w"
       "idth\030\010 \001(\002:\0010\022\035\n\016locate_correct\030\t \001(\010:\005f"
-      "alse\022\035\n\022locate_front_theta\030\n \001(\002:\0010\"\230\001\n\010"
-      "Car_info\022\025\n\ncar_length\030\001 \001(\002:\0010\022\024\n\tcar_w"
-      "idth\030\002 \001(\002:\0010\022\025\n\ncar_height\030\003 \001(\002:\0010\022\021\n\007"
-      "license\030\004 \001(\t:\000\022\031\n\016car_wheel_base\030\005 \001(\002:"
-      "\0010\022\032\n\017car_wheel_width\030\006 \001(\002:\0010\"\375\004\n\016Parks"
-      "pace_info\022\035\n\025parkingspace_index_id\030\001 \001(\005"
-      "\0222\n\021parkingspace_type\030\002 \001(\0162\027.message.Pa"
-      "rkspace_type\022\034\n\024parkingspace_unit_id\030\003 \001"
-      "(\005\022\035\n\025parkingspace_label_id\030\004 \001(\005\022\034\n\024par"
-      "kingspace_room_id\030\005 \001(\005\0222\n\026parkingspace_"
-      "direction\030\006 \001(\0162\022.message.Direction\022\035\n\025p"
-      "arkingspace_floor_id\030\007 \001(\005\022\032\n\022parkingspa"
-      "ce_width\030\010 \001(\002\022\033\n\023parkingspace_height\030\t "
-      "\001(\002\0226\n\023parkingspace_status\030\n \001(\0162\031.messa"
-      "ge.Parkspace_status\022#\n\010car_info\030\013 \001(\0132\021."
-      "message.Car_info\022\022\n\nentry_time\030\014 \001(\t\022\022\n\n"
-      "leave_time\030\r \001(\t\022/\n\016parkspace_path\030\016 \001(\016"
-      "2\027.message.Parkspace_path\022\032\n\022path_estima"
-      "te_time\030\017 \001(\002\022:\n\027parkspace_status_target"
-      "\030\020 \001(\0162\031.message.Parkspace_status\022#\n\010car"
-      "_type\030\021 \001(\0162\021.message.Car_type*\345\n\n\014Messa"
-      "ge_type\022\r\n\teBase_msg\020\000\022\020\n\014eCommand_msg\020\001"
-      "\022\026\n\022eLocate_status_msg\020\021\022\027\n\023eLocate_requ"
-      "est_msg\020\022\022\030\n\024eLocate_response_msg\020\023\022\034\n\030e"
-      "Locate_sift_request_msg\020\024\022\035\n\031eLocate_sif"
-      "t_response_msg\020\025\022\030\n\024eDispatch_status_msg"
-      "\020!\022\031\n\025eDispatch_request_msg\020\"\022\032\n\026eDispat"
-      "ch_response_msg\020#\022$\n eParkspace_allocati"
-      "on_status_msg\0201\022%\n!eParkspace_allocation"
-      "_request_msg\0202\022&\n\"eParkspace_allocation_"
-      "response_msg\0203\022!\n\035eParkspace_search_requ"
-      "est_msg\0204\022\"\n\036eParkspace_search_response_"
-      "msg\0205\022\"\n\036eParkspace_release_request_msg\020"
-      "6\022#\n\037eParkspace_release_response_msg\0207\022\'"
-      "\n#eParkspace_force_update_request_msg\0208\022"
-      "(\n$eParkspace_force_update_response_msg\020"
-      "9\022(\n$eParkspace_confirm_alloc_request_ms"
-      "g\020:\022)\n%eParkspace_confirm_alloc_response"
-      "_msg\020;\022\"\n\036eParkspace_allocation_data_msg"
-      "\020<\022+\n\'eParkspace_allocation_data_respons"
-      "e_msg\020=\022\036\n\032eStore_command_request_msg\020A\022"
-      "\037\n\033eStore_command_response_msg\020B\022\037\n\033ePic"
-      "kup_command_request_msg\020C\022 \n\034ePickup_com"
-      "mand_response_msg\020D\022\037\n\032eStoring_process_"
-      "statu_msg\020\220\001\022\037\n\032ePicking_process_statu_m"
-      "sg\020\221\001\022\"\n\035eCentral_controller_statu_msg\020\240"
-      "\001\022#\n\036eEntrance_manual_operation_msg\020\260\001\022\""
-      "\n\035eProcess_manual_operation_msg\020\261\001\022\037\n\032eD"
-      "ispatch_plan_request_msg\020\340\001\022 \n\033eDispatch"
-      "_plan_response_msg\020\341\001\022\"\n\035eDispatch_contr"
-      "ol_request_msg\020\342\001\022#\n\036eDispatch_control_r"
-      "esponse_msg\020\343\001\022!\n\034eDispatch_manager_stat"
-      "us_msg\020\352\001\022\037\n\032eDispatch_manager_data_msg\020"
-      "\353\001\022\037\n\032eGround_detect_request_msg\020\360\001\022 \n\033e"
-      "Ground_detect_response_msg\020\361\001\022\027\n\022eGround"
-      "_status_msg\020\362\001*\271\001\n\014Communicator\022\n\n\006eEmpt"
-      "y\020\000\022\t\n\005eMain\020\001\022\016\n\teTerminor\020\200\002\022\017\n\neParks"
-      "pace\020\200\004\022\016\n\teMeasurer\020\200\006\022\032\n\025eMeasurer_sif"
-      "t_server\020\201\006\022\026\n\021eDispatch_manager\020\200\010\022\026\n\021e"
-      "Dispatch_control\020\201\010\022\025\n\020eGround_measurer\020"
-      "\200\036**\n\014Process_type\022\014\n\010eStoring\020\001\022\014\n\010ePic"
-      "king\020\002*e\n\013Error_level\022\n\n\006NORMAL\020\000\022\024\n\020NEG"
-      "LIGIBLE_ERROR\020\001\022\017\n\013MINOR_ERROR\020\002\022\017\n\013MAJO"
-      "R_ERROR\020\003\022\022\n\016CRITICAL_ERROR\020\004*\245\001\n\020Parksp"
-      "ace_status\022\034\n\030eParkspace_status_unknow\020\000"
-      "\022\024\n\020eParkspace_empty\020\001\022\027\n\023eParkspace_occ"
-      "upied\020\002\022\027\n\023eParkspace_reserved\020\003\022\025\n\021ePar"
-      "kspace_locked\020\004\022\024\n\020eParkspace_error\020\005*\?\n"
-      "\tDirection\022\025\n\021eDirection_unknow\020\000\022\014\n\010eFo"
-      "rward\020\001\022\r\n\teBackward\020\002*l\n\016Parkspace_path"
-      "\022\017\n\013UNKNOW_PATH\020\000\022\020\n\014OPTIMAL_PATH\020\001\022\r\n\tL"
-      "EFT_PATH\020\002\022\016\n\nRIGHT_PATH\020\003\022\030\n\024TEMPORARY_"
-      "CACHE_PATH\020\004*m\n\016Parkspace_type\022\031\n\025UNKNOW"
-      "_PARKSPACE_TYPE\020\000\022\024\n\020MIN_PARKINGSPACE\020\001\022"
-      "\024\n\020MID_PARKINGSPACE\020\002\022\024\n\020BIG_PARKINGSPAC"
-      "E\020\003*F\n\010Car_type\022\023\n\017UNKNOW_CAR_TYPE\020\000\022\013\n\007"
-      "MIN_CAR\020\001\022\013\n\007MID_CAR\020\002\022\013\n\007BIG_CAR\020\003*\335\002\n\t"
-      "Step_type\022\017\n\013eAlloc_step\020\000\022\021\n\reMeasure_s"
-      "tep\020\001\022\021\n\reCompare_step\020\002\022\022\n\016eDispatch_st"
-      "ep\020\003\022\021\n\reConfirm_step\020\004\022\020\n\014eSearch_step\020"
-      "\005\022\016\n\neWait_step\020\006\022\021\n\reRelease_step\020\007\022\r\n\t"
-      "eComplete\020\010\022\025\n\021eBackConfirm_step\020\t\022\026\n\022eB"
-      "ack_compare_step\020\n\022\025\n\021eBackMeasure_step\020"
-      "\013\022\023\n\017eBackAlloc_step\020\014\022\022\n\016eBackWait_step"
-      "\020\r\022\026\n\022eBackDispatch_step\020\016\022\024\n\020eBackSearc"
-      "h_step\020\017\022\021\n\reBackComplete\020\020*C\n\nStep_stat"
-      "u\022\014\n\010eWaiting\020\000\022\014\n\010eWorking\020\001\022\n\n\006eError\020"
-      "\002\022\r\n\teFinished\020\003*\370\001\n\024Dispatch_device_typ"
-      "e\022\013\n\007ROBOT_1\020e\022\013\n\007ROBOT_2\020f\022\016\n\tCARRIER_1"
-      "\020\310\001\022\016\n\tCARRIER_2\020\317\001\022\016\n\tCARRIER_3\020\313\001\022\021\n\014P"
-      "ASSAGEWAY_0\020\254\002\022\021\n\014PASSAGEWAY_1\020\255\002\022\021\n\014PAS"
-      "SAGEWAY_2\020\256\002\022\021\n\014PASSAGEWAY_3\020\257\002\022\021\n\014PASSA"
-      "GEWAY_4\020\260\002\022\021\n\014PASSAGEWAY_5\020\261\002\022\021\n\014PASSAGE"
-      "WAY_6\020\262\002\022\021\n\014PASSAGEWAY_7\020\263\002"
+      "alse\022\035\n\022locate_front_theta\030\n \001(\002:\0010\022\027\n\017u"
+      "niformed_car_x\030\013 \001(\002\022\027\n\017uniformed_car_y\030"
+      "\014 \001(\002\"\230\001\n\010Car_info\022\025\n\ncar_length\030\001 \001(\002:\001"
+      "0\022\024\n\tcar_width\030\002 \001(\002:\0010\022\025\n\ncar_height\030\003 "
+      "\001(\002:\0010\022\021\n\007license\030\004 \001(\t:\000\022\031\n\016car_wheel_b"
+      "ase\030\005 \001(\002:\0010\022\032\n\017car_wheel_width\030\006 \001(\002:\0010"
+      "\"\375\004\n\016Parkspace_info\022\035\n\025parkingspace_inde"
+      "x_id\030\001 \001(\005\0222\n\021parkingspace_type\030\002 \001(\0162\027."
+      "message.Parkspace_type\022\034\n\024parkingspace_u"
+      "nit_id\030\003 \001(\005\022\035\n\025parkingspace_label_id\030\004 "
+      "\001(\005\022\034\n\024parkingspace_room_id\030\005 \001(\005\0222\n\026par"
+      "kingspace_direction\030\006 \001(\0162\022.message.Dire"
+      "ction\022\035\n\025parkingspace_floor_id\030\007 \001(\005\022\032\n\022"
+      "parkingspace_width\030\010 \001(\002\022\033\n\023parkingspace"
+      "_height\030\t \001(\002\0226\n\023parkingspace_status\030\n \001"
+      "(\0162\031.message.Parkspace_status\022#\n\010car_inf"
+      "o\030\013 \001(\0132\021.message.Car_info\022\022\n\nentry_time"
+      "\030\014 \001(\t\022\022\n\nleave_time\030\r \001(\t\022/\n\016parkspace_"
+      "path\030\016 \001(\0162\027.message.Parkspace_path\022\032\n\022p"
+      "ath_estimate_time\030\017 \001(\002\022:\n\027parkspace_sta"
+      "tus_target\030\020 \001(\0162\031.message.Parkspace_sta"
+      "tus\022#\n\010car_type\030\021 \001(\0162\021.message.Car_type"
+      "*\345\n\n\014Message_type\022\r\n\teBase_msg\020\000\022\020\n\014eCom"
+      "mand_msg\020\001\022\026\n\022eLocate_status_msg\020\021\022\027\n\023eL"
+      "ocate_request_msg\020\022\022\030\n\024eLocate_response_"
+      "msg\020\023\022\034\n\030eLocate_sift_request_msg\020\024\022\035\n\031e"
+      "Locate_sift_response_msg\020\025\022\030\n\024eDispatch_"
+      "status_msg\020!\022\031\n\025eDispatch_request_msg\020\"\022"
+      "\032\n\026eDispatch_response_msg\020#\022$\n eParkspac"
+      "e_allocation_status_msg\0201\022%\n!eParkspace_"
+      "allocation_request_msg\0202\022&\n\"eParkspace_a"
+      "llocation_response_msg\0203\022!\n\035eParkspace_s"
+      "earch_request_msg\0204\022\"\n\036eParkspace_search"
+      "_response_msg\0205\022\"\n\036eParkspace_release_re"
+      "quest_msg\0206\022#\n\037eParkspace_release_respon"
+      "se_msg\0207\022\'\n#eParkspace_force_update_requ"
+      "est_msg\0208\022(\n$eParkspace_force_update_res"
+      "ponse_msg\0209\022(\n$eParkspace_confirm_alloc_"
+      "request_msg\020:\022)\n%eParkspace_confirm_allo"
+      "c_response_msg\020;\022\"\n\036eParkspace_allocatio"
+      "n_data_msg\020<\022+\n\'eParkspace_allocation_da"
+      "ta_response_msg\020=\022\036\n\032eStore_command_requ"
+      "est_msg\020A\022\037\n\033eStore_command_response_msg"
+      "\020B\022\037\n\033ePickup_command_request_msg\020C\022 \n\034e"
+      "Pickup_command_response_msg\020D\022\037\n\032eStorin"
+      "g_process_statu_msg\020\220\001\022\037\n\032ePicking_proce"
+      "ss_statu_msg\020\221\001\022\"\n\035eCentral_controller_s"
+      "tatu_msg\020\240\001\022#\n\036eEntrance_manual_operatio"
+      "n_msg\020\260\001\022\"\n\035eProcess_manual_operation_ms"
+      "g\020\261\001\022\037\n\032eDispatch_plan_request_msg\020\340\001\022 \n"
+      "\033eDispatch_plan_response_msg\020\341\001\022\"\n\035eDisp"
+      "atch_control_request_msg\020\342\001\022#\n\036eDispatch"
+      "_control_response_msg\020\343\001\022!\n\034eDispatch_ma"
+      "nager_status_msg\020\352\001\022\037\n\032eDispatch_manager"
+      "_data_msg\020\353\001\022\037\n\032eGround_detect_request_m"
+      "sg\020\360\001\022 \n\033eGround_detect_response_msg\020\361\001\022"
+      "\027\n\022eGround_status_msg\020\362\001*\271\001\n\014Communicato"
+      "r\022\n\n\006eEmpty\020\000\022\t\n\005eMain\020\001\022\016\n\teTerminor\020\200\002"
+      "\022\017\n\neParkspace\020\200\004\022\016\n\teMeasurer\020\200\006\022\032\n\025eMe"
+      "asurer_sift_server\020\201\006\022\026\n\021eDispatch_manag"
+      "er\020\200\010\022\026\n\021eDispatch_control\020\201\010\022\025\n\020eGround"
+      "_measurer\020\200\036**\n\014Process_type\022\014\n\010eStoring"
+      "\020\001\022\014\n\010ePicking\020\002*e\n\013Error_level\022\n\n\006NORMA"
+      "L\020\000\022\024\n\020NEGLIGIBLE_ERROR\020\001\022\017\n\013MINOR_ERROR"
+      "\020\002\022\017\n\013MAJOR_ERROR\020\003\022\022\n\016CRITICAL_ERROR\020\004*"
+      "\245\001\n\020Parkspace_status\022\034\n\030eParkspace_statu"
+      "s_unknow\020\000\022\024\n\020eParkspace_empty\020\001\022\027\n\023ePar"
+      "kspace_occupied\020\002\022\027\n\023eParkspace_reserved"
+      "\020\003\022\025\n\021eParkspace_locked\020\004\022\024\n\020eParkspace_"
+      "error\020\005*\?\n\tDirection\022\025\n\021eDirection_unkno"
+      "w\020\000\022\014\n\010eForward\020\001\022\r\n\teBackward\020\002*l\n\016Park"
+      "space_path\022\017\n\013UNKNOW_PATH\020\000\022\020\n\014OPTIMAL_P"
+      "ATH\020\001\022\r\n\tLEFT_PATH\020\002\022\016\n\nRIGHT_PATH\020\003\022\030\n\024"
+      "TEMPORARY_CACHE_PATH\020\004*m\n\016Parkspace_type"
+      "\022\031\n\025UNKNOW_PARKSPACE_TYPE\020\000\022\024\n\020MIN_PARKI"
+      "NGSPACE\020\001\022\024\n\020MID_PARKINGSPACE\020\002\022\024\n\020BIG_P"
+      "ARKINGSPACE\020\003*F\n\010Car_type\022\023\n\017UNKNOW_CAR_"
+      "TYPE\020\000\022\013\n\007MIN_CAR\020\001\022\013\n\007MID_CAR\020\002\022\013\n\007BIG_"
+      "CAR\020\003*\335\002\n\tStep_type\022\017\n\013eAlloc_step\020\000\022\021\n\r"
+      "eMeasure_step\020\001\022\021\n\reCompare_step\020\002\022\022\n\016eD"
+      "ispatch_step\020\003\022\021\n\reConfirm_step\020\004\022\020\n\014eSe"
+      "arch_step\020\005\022\016\n\neWait_step\020\006\022\021\n\reRelease_"
+      "step\020\007\022\r\n\teComplete\020\010\022\025\n\021eBackConfirm_st"
+      "ep\020\t\022\026\n\022eBack_compare_step\020\n\022\025\n\021eBackMea"
+      "sure_step\020\013\022\023\n\017eBackAlloc_step\020\014\022\022\n\016eBac"
+      "kWait_step\020\r\022\026\n\022eBackDispatch_step\020\016\022\024\n\020"
+      "eBackSearch_step\020\017\022\021\n\reBackComplete\020\020*C\n"
+      "\nStep_statu\022\014\n\010eWaiting\020\000\022\014\n\010eWorking\020\001\022"
+      "\n\n\006eError\020\002\022\r\n\teFinished\020\003*\370\001\n\024Dispatch_"
+      "device_type\022\013\n\007ROBOT_1\020e\022\013\n\007ROBOT_2\020f\022\016\n"
+      "\tCARRIER_1\020\310\001\022\016\n\tCARRIER_2\020\317\001\022\016\n\tCARRIER"
+      "_3\020\313\001\022\021\n\014PASSAGEWAY_0\020\254\002\022\021\n\014PASSAGEWAY_1"
+      "\020\255\002\022\021\n\014PASSAGEWAY_2\020\256\002\022\021\n\014PASSAGEWAY_3\020\257"
+      "\002\022\021\n\014PASSAGEWAY_4\020\260\002\022\021\n\014PASSAGEWAY_5\020\261\002\022"
+      "\021\n\014PASSAGEWAY_6\020\262\002\022\021\n\014PASSAGEWAY_7\020\263\002"
   };
   ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
-      descriptor, 4387);
+      descriptor, 4437);
   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
     "message_base.proto", &protobuf_RegisterTypes);
 }
@@ -1764,6 +1769,8 @@ const int Locate_information::kLocateWheelBaseFieldNumber;
 const int Locate_information::kLocateWheelWidthFieldNumber;
 const int Locate_information::kLocateCorrectFieldNumber;
 const int Locate_information::kLocateFrontThetaFieldNumber;
+const int Locate_information::kUniformedCarXFieldNumber;
+const int Locate_information::kUniformedCarYFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Locate_information::Locate_information()
@@ -1781,16 +1788,16 @@ Locate_information::Locate_information(const Locate_information& from)
       _cached_size_(0) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   ::memcpy(&locate_x_, &from.locate_x_,
-    static_cast<size_t>(reinterpret_cast<char*>(&locate_front_theta_) -
-    reinterpret_cast<char*>(&locate_x_)) + sizeof(locate_front_theta_));
+    static_cast<size_t>(reinterpret_cast<char*>(&uniformed_car_y_) -
+    reinterpret_cast<char*>(&locate_x_)) + sizeof(uniformed_car_y_));
   // @@protoc_insertion_point(copy_constructor:message.Locate_information)
 }
 
 void Locate_information::SharedCtor() {
   _cached_size_ = 0;
   ::memset(&locate_x_, 0, static_cast<size_t>(
-      reinterpret_cast<char*>(&locate_front_theta_) -
-      reinterpret_cast<char*>(&locate_x_)) + sizeof(locate_front_theta_));
+      reinterpret_cast<char*>(&uniformed_car_y_) -
+      reinterpret_cast<char*>(&locate_x_)) + sizeof(uniformed_car_y_));
 }
 
 Locate_information::~Locate_information() {
@@ -1836,10 +1843,10 @@ void Locate_information::Clear() {
         reinterpret_cast<char*>(&locate_wheel_width_) -
         reinterpret_cast<char*>(&locate_x_)) + sizeof(locate_wheel_width_));
   }
-  if (cached_has_bits & 768u) {
+  if (cached_has_bits & 3840u) {
     ::memset(&locate_correct_, 0, static_cast<size_t>(
-        reinterpret_cast<char*>(&locate_front_theta_) -
-        reinterpret_cast<char*>(&locate_correct_)) + sizeof(locate_front_theta_));
+        reinterpret_cast<char*>(&uniformed_car_y_) -
+        reinterpret_cast<char*>(&locate_correct_)) + sizeof(uniformed_car_y_));
   }
   _has_bits_.Clear();
   _internal_metadata_.Clear();
@@ -1995,6 +2002,34 @@ bool Locate_information::MergePartialFromCodedStream(
         break;
       }
 
+      // optional float uniformed_car_x = 11;
+      case 11: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(93u /* 93 & 0xFF */)) {
+          set_has_uniformed_car_x();
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
+                 input, &uniformed_car_x_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // optional float uniformed_car_y = 12;
+      case 12: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(101u /* 101 & 0xFF */)) {
+          set_has_uniformed_car_y();
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
+                 input, &uniformed_car_y_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
       default: {
       handle_unusual:
         if (tag == 0) {
@@ -2072,6 +2107,16 @@ void Locate_information::SerializeWithCachedSizes(
     ::google::protobuf::internal::WireFormatLite::WriteFloat(10, this->locate_front_theta(), output);
   }
 
+  // optional float uniformed_car_x = 11;
+  if (cached_has_bits & 0x00000400u) {
+    ::google::protobuf::internal::WireFormatLite::WriteFloat(11, this->uniformed_car_x(), output);
+  }
+
+  // optional float uniformed_car_y = 12;
+  if (cached_has_bits & 0x00000800u) {
+    ::google::protobuf::internal::WireFormatLite::WriteFloat(12, this->uniformed_car_y(), output);
+  }
+
   if (_internal_metadata_.have_unknown_fields()) {
     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
         _internal_metadata_.unknown_fields(), output);
@@ -2137,6 +2182,16 @@ void Locate_information::SerializeWithCachedSizes(
     target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(10, this->locate_front_theta(), target);
   }
 
+  // optional float uniformed_car_x = 11;
+  if (cached_has_bits & 0x00000400u) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(11, this->uniformed_car_x(), target);
+  }
+
+  // optional float uniformed_car_y = 12;
+  if (cached_has_bits & 0x00000800u) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(12, this->uniformed_car_y(), target);
+  }
+
   if (_internal_metadata_.have_unknown_fields()) {
     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
         _internal_metadata_.unknown_fields(), target);
@@ -2196,7 +2251,7 @@ size_t Locate_information::ByteSizeLong() const {
     }
 
   }
-  if (_has_bits_[8 / 32] & 768u) {
+  if (_has_bits_[8 / 32] & 3840u) {
     // optional bool locate_correct = 9 [default = false];
     if (has_locate_correct()) {
       total_size += 1 + 1;
@@ -2207,6 +2262,16 @@ size_t Locate_information::ByteSizeLong() const {
       total_size += 1 + 4;
     }
 
+    // optional float uniformed_car_x = 11;
+    if (has_uniformed_car_x()) {
+      total_size += 1 + 4;
+    }
+
+    // optional float uniformed_car_y = 12;
+    if (has_uniformed_car_y()) {
+      total_size += 1 + 4;
+    }
+
   }
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
@@ -2265,13 +2330,19 @@ void Locate_information::MergeFrom(const Locate_information& from) {
     }
     _has_bits_[0] |= cached_has_bits;
   }
-  if (cached_has_bits & 768u) {
+  if (cached_has_bits & 3840u) {
     if (cached_has_bits & 0x00000100u) {
       locate_correct_ = from.locate_correct_;
     }
     if (cached_has_bits & 0x00000200u) {
       locate_front_theta_ = from.locate_front_theta_;
     }
+    if (cached_has_bits & 0x00000400u) {
+      uniformed_car_x_ = from.uniformed_car_x_;
+    }
+    if (cached_has_bits & 0x00000800u) {
+      uniformed_car_y_ = from.uniformed_car_y_;
+    }
     _has_bits_[0] |= cached_has_bits;
   }
 }
@@ -2310,6 +2381,8 @@ void Locate_information::InternalSwap(Locate_information* other) {
   swap(locate_wheel_width_, other->locate_wheel_width_);
   swap(locate_correct_, other->locate_correct_);
   swap(locate_front_theta_, other->locate_front_theta_);
+  swap(uniformed_car_x_, other->uniformed_car_x_);
+  swap(uniformed_car_y_, other->uniformed_car_y_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
   swap(_cached_size_, other->_cached_size_);

+ 68 - 0
message/message_base.pb.h

@@ -957,6 +957,20 @@ class Locate_information : public ::google::protobuf::Message /* @@protoc_insert
   float locate_front_theta() const;
   void set_locate_front_theta(float value);
 
+  // optional float uniformed_car_x = 11;
+  bool has_uniformed_car_x() const;
+  void clear_uniformed_car_x();
+  static const int kUniformedCarXFieldNumber = 11;
+  float uniformed_car_x() const;
+  void set_uniformed_car_x(float value);
+
+  // optional float uniformed_car_y = 12;
+  bool has_uniformed_car_y() const;
+  void clear_uniformed_car_y();
+  static const int kUniformedCarYFieldNumber = 12;
+  float uniformed_car_y() const;
+  void set_uniformed_car_y(float value);
+
   // @@protoc_insertion_point(class_scope:message.Locate_information)
  private:
   void set_has_locate_x();
@@ -979,6 +993,10 @@ class Locate_information : public ::google::protobuf::Message /* @@protoc_insert
   void clear_has_locate_correct();
   void set_has_locate_front_theta();
   void clear_has_locate_front_theta();
+  void set_has_uniformed_car_x();
+  void clear_has_uniformed_car_x();
+  void set_has_uniformed_car_y();
+  void clear_has_uniformed_car_y();
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
@@ -993,6 +1011,8 @@ class Locate_information : public ::google::protobuf::Message /* @@protoc_insert
   float locate_wheel_width_;
   bool locate_correct_;
   float locate_front_theta_;
+  float uniformed_car_x_;
+  float uniformed_car_y_;
   friend struct ::protobuf_message_5fbase_2eproto::TableStruct;
   friend void ::protobuf_message_5fbase_2eproto::InitDefaultsLocate_informationImpl();
 };
@@ -1980,6 +2000,54 @@ inline void Locate_information::set_locate_front_theta(float value) {
   // @@protoc_insertion_point(field_set:message.Locate_information.locate_front_theta)
 }
 
+// optional float uniformed_car_x = 11;
+inline bool Locate_information::has_uniformed_car_x() const {
+  return (_has_bits_[0] & 0x00000400u) != 0;
+}
+inline void Locate_information::set_has_uniformed_car_x() {
+  _has_bits_[0] |= 0x00000400u;
+}
+inline void Locate_information::clear_has_uniformed_car_x() {
+  _has_bits_[0] &= ~0x00000400u;
+}
+inline void Locate_information::clear_uniformed_car_x() {
+  uniformed_car_x_ = 0;
+  clear_has_uniformed_car_x();
+}
+inline float Locate_information::uniformed_car_x() const {
+  // @@protoc_insertion_point(field_get:message.Locate_information.uniformed_car_x)
+  return uniformed_car_x_;
+}
+inline void Locate_information::set_uniformed_car_x(float value) {
+  set_has_uniformed_car_x();
+  uniformed_car_x_ = value;
+  // @@protoc_insertion_point(field_set:message.Locate_information.uniformed_car_x)
+}
+
+// optional float uniformed_car_y = 12;
+inline bool Locate_information::has_uniformed_car_y() const {
+  return (_has_bits_[0] & 0x00000800u) != 0;
+}
+inline void Locate_information::set_has_uniformed_car_y() {
+  _has_bits_[0] |= 0x00000800u;
+}
+inline void Locate_information::clear_has_uniformed_car_y() {
+  _has_bits_[0] &= ~0x00000800u;
+}
+inline void Locate_information::clear_uniformed_car_y() {
+  uniformed_car_y_ = 0;
+  clear_has_uniformed_car_y();
+}
+inline float Locate_information::uniformed_car_y() const {
+  // @@protoc_insertion_point(field_get:message.Locate_information.uniformed_car_y)
+  return uniformed_car_y_;
+}
+inline void Locate_information::set_uniformed_car_y(float value) {
+  set_has_uniformed_car_y();
+  uniformed_car_y_ = value;
+  // @@protoc_insertion_point(field_set:message.Locate_information.uniformed_car_y)
+}
+
 // -------------------------------------------------------------------
 
 // Car_info

+ 30 - 2
system/system_executor.cpp

@@ -39,8 +39,7 @@ Error_manager System_executor::check_msg(Communication_message* p_msg)
 		return Error_manager(Error_code::POINTER_IS_NULL, Error_level::MINOR_ERROR,
 							 "  POINTER IS NULL ");
 	}
-
-
+	
 	//检查接受人
 	if ( p_msg->get_receiver() == Communication_message::Communicator::eDispatch_mamager )
 	{
@@ -220,6 +219,35 @@ Error_manager System_executor::execute_msg(Communication_message* p_msg)
 		}
 	}
 
+
+	//检查接受人
+	if ( p_msg->get_receiver() == Communication_message::Communicator::eEmpty )
+	{
+		switch ( p_msg->get_message_type() )
+		{
+			case Communication_message::Message_type::eGround_status_msg:
+			{
+				message::Ground_status_msg t_ground_status_msg;
+				//针对消息类型, 对消息进行二次解析
+				if (t_ground_status_msg.ParseFromString(p_msg->get_message_buf()))
+				{
+					//往线程池添加执行任务, 之后会唤醒一个线程去执行他.
+					m_thread_pool.enqueue(&System_executor::execute_for_ground_status_msg, this,
+										  t_ground_status_msg	);
+				}
+				else
+				{
+					return Error_manager(Error_code::SYSTEM_EXECUTOR_PARSE_ERROR, Error_level::MINOR_ERROR,
+										 " message::Dispatch_request_msg  ParseFromString error ");
+				}
+				break;
+			}
+			default:
+				break;
+		}
+	}
+
+
 	return Error_code::SUCCESS;
 }
 

+ 23 - 1
tool/common_data.h

@@ -60,7 +60,13 @@ public:
 		float car_front_theta = 0;			//整车的前轮的旋转角
 
 		bool correctness = false;			//整车的校准标记位
-		public:
+
+		float uniform_car_x = 0;
+		float uniform_car_y = 0;
+
+		int range_status = 0;
+
+	public:
 		Car_wheel_information& operator+=(const Car_wheel_information& other)
 		{
 			this->car_center_x += other.car_center_x;
@@ -117,6 +123,22 @@ public:
             sprintf(buf, "%.4f %.4f %.4f %.4f %.4f %.4f\n", car_center_x, car_center_y, car_angle, car_wheel_base, car_wheel_width, car_front_theta);
             return std::string(buf);
         }
+
+		// 旋转正位(theta至90度)后车辆中心
+		void theta_uniform(float turnplate_cx, float turnplate_cy, float &x, float &y)
+		{
+			float d_theta = (90.0f - car_angle) * M_PI / 180.0f;
+			float car_x = car_center_x - turnplate_cx;
+			float car_y = car_center_y - turnplate_cy;
+			x = cos(d_theta) * car_x - sin(d_theta) * car_y + turnplate_cx;
+			y = sin(d_theta) * car_x + cos(d_theta) * car_y + turnplate_cy;
+		}
+
+		// 更新旋转正位后自身缓存的车辆中心
+		void theta_uniform(float turnplate_cx, float turnplate_cy)
+		{
+			theta_uniform(turnplate_cx, turnplate_cy, uniform_car_x, uniform_car_y);
+		}
 	};
 
 	// 带时间戳的四轮测量信息