浏览代码

增加栏杆,plc限位,高度判断

zx 6 年之前
父节点
当前提交
0a54a151a4

+ 2 - 1
CMakeLists.txt

@@ -37,6 +37,7 @@ aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/laser LASER_SRC )
 aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/plc PLC_SRC )
 aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/locate LOCATE_SRC )
 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 )
 
 #add_executable(LidarMeasure ./main.cpp ${LASER_SRC} ${PLC_SRC} ${TERMINOR_SRC} ${LOCATE_SRC} ${TASK_MANAGER_SRC})
@@ -44,7 +45,7 @@ aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/system_manager SYS_SRC )
 
 
 add_executable(locate  main.cpp ${LOCATE_SRC} ${PLC_SRC} ${TERMINOR_SRC} ${TASK_MANAGER_SRC} ${LASER_SRC} ${ERROR_SRC}
-        ${TOOL_SRC} ${SYS_SRC})
+        ${TOOL_SRC} ${SYS_SRC} ${VERIFY_SRC})
 target_link_libraries(locate ${OpenCV_LIBS}
         ${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

+ 13 - 2
error_code/error_code.h

@@ -108,8 +108,6 @@ enum Error_code
     LOCATER_Y_OUT_RANGE_BY_PLC,
     LOCATER_MEASURE_HEIGHT_CLOUD_UNINIT,
     LOCATER_MEASURE_HEIGHT_CLOUD_EMPTY,
-    LOCATER_HEIGHT_OUT_RANGE,
-    LOCATER_ANGLE_OUT_RANGE,
     LOCATER_INPUT_CLOUD_UNINIT,
 
 
@@ -147,6 +145,7 @@ enum Error_code
     //terminor_command_executor.cpp from 0x04010200-0x040102FF
     TERMINOR_NOT_READY=0x04010200,
     TERMINOR_INPUT_LASER_NULL,
+    TERMINOR_NOT_CONTAINS_LASER,
     TERMINOR_INPUT_PLC_NULL,
     TERMINOR_INPUT_LOCATER_NULL,
     TERMINOR_CREATE_WORKING_THREAD_FAILED,
@@ -154,6 +153,18 @@ enum Error_code
     TERMINOR_LASER_TIMEOUT,
     TERMINOR_POST_PLC_TIMEOUT,
 
+    ////Hardware limit from 0x05010000 - 0x0501ffff
+    ///railing.cpp from 0x05010100-0x050101ff
+    HARDWARE_LIMIT_LEFT_RAILING=0x05010100,         //左栏杆限制
+    HARDWARE_LIMIT_RAILING_PARAMETER_ERROR,
+    HARDWARE_LIMIT_RAILING_ERROR,
+    HARDWARE_LIMIT_CENTER_X_LEFT,
+    HARDWARE_LIMIT_CENTER_X_RIGHT,
+    HARDWARE_LIMIT_CENTER_Y_TOP,
+    HARDWARE_LIMIT_CENTER_Y_BOTTOM,
+    HARDWARE_LIMIT_HEIGHT_OUT_RANGE,
+    HARDWARE_LIMIT_ANGLE_OUT_RANGE,
+
 
 
 };

+ 3 - 14
locate/locater.cpp

@@ -104,12 +104,12 @@ Error_manager Locater::execute_task(Task_Base* task,double time_out)
     std::lock_guard<std::mutex> t_lock(m_mutex_lock);
     locate_task->update_statu(TASK_WORKING);
     code=locate(t_cloud_input,locate_information,save_path);
+    locate_task->set_locate_information(locate_information);
     if(code!=SUCCESS)
     {
         locate_task->update_statu(TASK_OVER,"Locate Failed");
         return code;
     }
-    locate_task->set_locate_information(locate_information);
     locate_task->update_statu(TASK_OVER,"Locate OK");
     return code;
 
@@ -269,12 +269,7 @@ Error_manager Locater::measure_height(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_
     pcl::getMinMax3D(*cloud_car,min_point,max_point);
     //限制车高的范围,检验结果
     height=max_point.z;
-    if(height<1000||height>2000)
-    {
-        char description[255]={0};
-        sprintf(description,"height(%.1f) is out of range(1000,2000)",height);
-        return Error_manager(LOCATER_HEIGHT_OUT_RANGE,NORMAL,description);
-    }
+
     return SUCCESS;
 }
 
@@ -314,6 +309,7 @@ Error_manager Locater::locate(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_in,
     {
         return code;
     }
+    locate_information.locate_hight=height_car;
 
     //第四步,识别轮胎,并根据轮胎数量计算旋转矩形
     cv::RotatedRect rotate_rect;
@@ -339,13 +335,6 @@ Error_manager Locater::locate(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_in,
         vec.y = vertice[1].y - vertice[2].y;
     }
     float angle_x = 180.0 / C_PI * acos(vec.x / sqrt(vec.x * vec.x + vec.y * vec.y));
-    //角度检验, 根据plc限制,角度应该在(80-100,260-280)
-    if( !((angle_x>80&&angle_x<100) || (angle_x>260&&angle_x<280)) )
-    {
-        char description[255]={0};
-        sprintf(description,"locate theta is out of range(80-100,260-280),theta:%.2f",angle_x);
-        return Error_manager(LOCATER_ANGLE_OUT_RANGE,NORMAL,description);
-    }
 
     //第六步,结果赋值
     //角度以度为单位

+ 1 - 0
main.cpp

@@ -67,6 +67,7 @@ void init_glog()
     google::InitGoogleLogging("LidarMeasurement");
     google::SetStderrLogging(google::INFO);
     google::SetLogDestination(0, logPath);
+    google::SetLogFilenameExtension("zxlog");
     google::InstallFailureSignalHandler();
     google::InstallFailureWriter(&shut_down_logging);
     FLAGS_colorlogtostderr = true;        // Set log color

+ 20 - 26
system_manager/System_Manager.cpp

@@ -22,6 +22,7 @@ System_Manager::System_Manager()
     m_terminal_vector.clear();
     mp_plc=NULL;
     mp_locater=NULL;
+    mp_verify_result_tool=NULL;
 }
 System_Manager::~System_Manager()
 {
@@ -67,6 +68,11 @@ System_Manager::~System_Manager()
     }
     m_laser_vector.clear();
 
+    if(mp_verify_result_tool!=NULL)
+    {
+        delete mp_verify_result_tool;
+        mp_verify_result_tool=NULL;
+    }
 
 
 }
@@ -95,6 +101,12 @@ Error_manager System_Manager::init()
     {
         return Error_manager(SYSTEM_READ_PARAMETER_ERROR,NORMAL,"read locate parameter failed");
     }
+    //读取结果检验器配置
+    Hardware_limit::Hardware_parameter hardware_parameter;
+    if(!read_proto_param("./setting/limit.prototxt",hardware_parameter))
+    {
+        return Error_manager(SYSTEM_READ_PARAMETER_ERROR,NORMAL,"read limit parameter failed");
+    }
     //读取terminor配置
     Terminal::Terminor_parameter_all terminor_parameter_all;
     if(!read_proto_param("./setting/terminal.prototxt",terminor_parameter_all))
@@ -134,6 +146,8 @@ Error_manager System_Manager::init()
             break;
         }
     }
+    //创建limit模块
+    mp_verify_result_tool=new Verify_result(hardware_parameter);
     //创建测量模块
     mp_locater=new Locater();
     code=mp_locater->init(locater_parameter);
@@ -187,34 +201,14 @@ Error_manager System_Manager::plc_command_callback(int terminal_id_plc,void* own
             terminal_id,system_manager->m_terminal_vector.size());
         return Error_manager(PARAMETER_ERROR,NEGLIGIBLE_ERROR,description);
     }
-    //第二步,根据terminal_id,启动对应terminaor执行指令流程
-    //根据配置筛选雷达,当前测试使用所有雷达
-    std::vector<Laser_base*> tp_lasers;
-    for(int i=0;i<system_manager->m_terminal_parameter_all.terminor_parameters(terminal_id).laser_parameter_size();++i)
-    {
-        int laser_id=system_manager->m_terminal_parameter_all.terminor_parameters(terminal_id).laser_parameter(i).id();
-        if(laser_id>=0&&laser_id<system_manager->m_laser_vector.size())
-        {
-            //判断该id的雷达是否已经添加进去, 放置配置中出现重复的雷达编号
-            bool tb_repeat=false;
-            for(int j=0;j<tp_lasers.size();++j)
-            {
-                if(tp_lasers[j]==system_manager->m_laser_vector[laser_id])
-                {
-                    tb_repeat=true;
-                    break;
-                }
-            }
-            if(tb_repeat==false)
-                tp_lasers.push_back(system_manager->m_laser_vector[laser_id]);
-        }
-    }
-    if(tp_lasers.size()==0)
+    //第二步,根据terminal_id,启动对应terminaor执行指令流程,
+
+    if(system_manager->m_laser_vector.size()==0)
     {
-        return Error_manager(SYSTEM_INPUT_TERMINOR_NO_LASERS,NORMAL,"ternimal command has no laser");
+        return Error_manager(SYSTEM_INPUT_TERMINOR_NO_LASERS,NORMAL,"laser parameter has no laser");
     }
-    code=system_manager->m_terminal_vector[terminal_id]->execute_command(tp_lasers,
-        system_manager->mp_plc,system_manager->mp_locater,10);
+    code=system_manager->m_terminal_vector[terminal_id]->execute_command(system_manager->m_laser_vector,
+        system_manager->mp_plc,system_manager->mp_locater,system_manager->mp_verify_result_tool,10);
     switch(code.get_error_code())
     {
         case SUCCESS:break;

+ 3 - 0
system_manager/System_Manager.h

@@ -8,6 +8,7 @@
 #include "../plc/plc_communicator.h"
 #include "../locate/locater.h"
 #include "../terminor/terminal_command_executor.h"
+#include "../verify/Verify_result.h"
 
 class System_Manager
 {
@@ -36,6 +37,8 @@ protected:
     Locater*                                    mp_locater;
     Plc_Communicator*                           mp_plc;
 
+    //结果检验工具
+    Verify_result*                              mp_verify_result_tool;
     ///terminoal 配置
     Terminal::Terminor_parameter_all            m_terminal_parameter_all;
 

+ 64 - 13
terminor/terminal_command_executor.cpp

@@ -91,7 +91,7 @@ TerminorStatu Terminor_Command_Executor::get_terminor_statu()
 }
 
 Error_manager Terminor_Command_Executor::execute_command(std::vector<Laser_base*> lasers,Plc_Communicator* plc,
-                    Locater* locater,float timeout)
+                    Locater* locater,Verify_result* verify_tool,float timeout)
 {
     Error_manager code;
     //第一步检查输入参数合法性
@@ -116,6 +116,7 @@ Error_manager Terminor_Command_Executor::execute_command(std::vector<Laser_base*
         sprintf(description,"terminor input locater* is null  terminor id:%d",m_terminor_parameter.id());
         return Error_manager(TERMINOR_INPUT_LOCATER_NULL,NORMAL,description);
     }
+    mp_verify_tool=verify_tool;
 
     //第二步,雷达,plc以及定位模块是否能正常接收指令;
     for(int i=0;i<lasers.size();++i)
@@ -290,24 +291,55 @@ Error_manager Terminor_Command_Executor::scanning_measuring()
 
     Error_manager code;
     //第一步,启动雷达扫描点云,切换当前状态为扫描中
+    //根据配置筛选雷达
     pcl::PointCloud<pcl::PointXYZ>::Ptr scan_cloud(new pcl::PointCloud<pcl::PointXYZ>);
     std::mutex cloud_lock;
     std::vector<Task_Base*> laser_task_vector;
 
-    for(int i=0;i<mp_laser_vector.size();++i)
+    std::vector<Laser_base*> tp_lasers;
+    for(int i=0;i<m_terminor_parameter.laser_parameter_size();++i)
     {
-        Laser_task* laser_task=new Laser_task();
-        //
-        laser_task->task_init(TASK_CREATED,scan_cloud,&cloud_lock);
-        laser_task->set_task_points_number(1000);
-        laser_task->set_save_path(project_path);
-        laser_task_vector.push_back(laser_task);
-        //发送任务单给雷达
-        code=mp_laser_vector[i]->execute_task(laser_task);
-        if(code!=SUCCESS)
+        int laser_id=m_terminor_parameter.laser_parameter(i).id();
+        int frame_count=m_terminor_parameter.laser_parameter(i).frame_count();
+        if(frame_count<=0)
         {
-            return code;
+            LOG(WARNING)<<"terminal parameter laser["<<laser_id<<"] frame count is <0";
+            continue;
         }
+        if(laser_id>=0&&laser_id<mp_laser_vector.size())
+        {
+            //判断该id的雷达是否已经添加进去, 放置配置中出现重复的雷达编号
+            bool tb_repeat=false;
+            for(int j=0;j<tp_lasers.size();++j)
+            {
+                if(tp_lasers[j]==mp_laser_vector[laser_id])
+                {
+                    tb_repeat=true;
+                    break;
+                }
+            }
+            if(tb_repeat==false)
+            {
+                tp_lasers.push_back(mp_laser_vector[laser_id]);
+                //创建扫描任务,
+                Laser_task* laser_task=new Laser_task();
+                //
+                laser_task->task_init(TASK_CREATED,scan_cloud,&cloud_lock);
+                laser_task->set_task_points_number(frame_count);
+                laser_task->set_save_path(project_path);
+                laser_task_vector.push_back(laser_task);
+                //发送任务单给雷达
+                code=tp_lasers[i]->execute_task(laser_task);
+                if(code!=SUCCESS)
+                {
+                    return code;
+                }
+            }
+        }
+    }
+    if(tp_lasers.size()==0)
+    {
+        return Error_manager(TERMINOR_NOT_CONTAINS_LASER,NORMAL,"terminal not contains laser");
     }
     m_terminor_statu=TERMINOR_SCANNING;
     //等待雷达完成任务单
@@ -415,6 +447,25 @@ Error_manager Terminor_Command_Executor::scanning_measuring()
         delete locate_task;
         locate_task=NULL;
     }
-
+    ////如果测量正确,检验结果
+    if(mp_verify_tool!=NULL)
+    {
+        if (code == SUCCESS)
+        {
+            cv::RotatedRect rotated_rect;
+            rotated_rect.center = cv::Point2f(m_measure_information.locate_x, m_measure_information.locate_y);
+            rotated_rect.angle = m_measure_information.locate_theta;
+            if (m_measure_information.locate_theta > 0 && m_measure_information.locate_theta <= 90) {
+                rotated_rect.size.height = m_measure_information.locate_length;
+                rotated_rect.size.width = m_measure_information.locate_width;
+            }
+            else {
+                rotated_rect.size.height = m_measure_information.locate_width;
+                rotated_rect.size.width = m_measure_information.locate_length;
+            }
+            code=mp_verify_tool->verify(rotated_rect,false);
+            return code;
+        }
+    }
     return code;
 }

+ 5 - 1
terminor/terminal_command_executor.h

@@ -9,6 +9,7 @@
 #include "../plc/plc_task.h"
 #include "../laser/Laser.h"
 #include "../locate/locater.h"
+#include "../verify/Verify_result.h"
 #include "Terminor_parameter.pb.h"
 #include <thread>
 /*
@@ -48,10 +49,11 @@ public:
      *lasers:需要启动的雷达
      * plc:上传结果工具
      * locater:测量算法对象
+     * verify_tool:结果检验工具,当该参数为NULL时,测量结果不作检验
      * 返回指令是否启动成功
      */
     Error_manager execute_command(std::vector<Laser_base*> lasers,Plc_Communicator* plc,
-        Locater* locater,float timeout=15);
+        Locater* locater,Verify_result* verify_tool,float timeout=15);
     /*
      * 强制正在执行的中断指令
      */
@@ -97,6 +99,8 @@ protected:
     Locate_information          m_measure_information;
     //保存文件的root目录
     std::string                 m_save_root_path;
+    //检验结果工具
+    Verify_result*              mp_verify_tool;
 
 };
 

+ 63 - 0
verify/Railing.cpp

@@ -0,0 +1,63 @@
+//
+// Created by zx on 2020/1/10.
+//
+
+#include "Railing.h"
+
+/*
+     * 构造函数
+     * a,b,c代表栏杆所在直线方程, ax+by+c=0
+     * width:表示栏杆的宽
+     */
+Railing::Railing(float a,float b,float c,float width)
+{
+    m_a=a;
+    m_b=b;
+    m_c=c;
+    m_width=width;
+}
+/*
+ * 检验结果框,是否会与栏杆冲突
+ */
+Error_manager Railing::verify(cv::RotatedRect rotate_rect)
+{
+    //检验内部参数是否合法
+    if(m_a==0 && m_b==0)
+    {
+        return Error_manager(HARDWARE_LIMIT_RAILING_PARAMETER_ERROR,NORMAL,"railing parameter a&b = 0");
+    }
+    //第一步,获取旋转矩形四个顶角
+    cv::Point2f vertice[4];
+    rotate_rect.points(vertice);
+    //第二步.判断四个顶点是否在栏杆不同侧面,且与直线距离<m_width
+    bool limit_left=false;
+    bool limit_right=false;
+    for(int i=0;i<4;++i)
+    {
+        //计算顶点与直线的距离
+        cv::Point2f point=vertice[i];
+        float x=point.x;
+        float y=point.y;
+        float distance=fabs(m_a*x+m_b*y+m_c)/sqrt(m_a*m_a+m_b*m_b);
+        if(distance<m_width)
+        {
+            //顶点在栏杆上,必定会碰撞
+            return Error_manager(HARDWARE_LIMIT_RAILING_ERROR,NORMAL,"railing error");
+        }
+        else
+        {
+            //顶点在直线右边
+            if(m_a*x+m_b*y+m_c>0)
+                limit_right=true;
+            else if(m_a*x+m_b*y+m_c<0)
+                limit_left=true;
+
+        }
+    }
+    //如果左右都有顶点, 则与栏杆碰撞
+    if(limit_left==true && limit_right==true)
+    {
+        return Error_manager(HARDWARE_LIMIT_RAILING_ERROR,NORMAL,"railing error");
+    }
+    return SUCCESS;
+}

+ 33 - 0
verify/Railing.h

@@ -0,0 +1,33 @@
+//
+// Created by zx on 2020/1/10.
+//
+
+#ifndef RAILING_H
+#define RAILING_H
+#include "../error_code/error_code.h"
+#include <opencv2/opencv.hpp>
+/*
+ * 栏杆类, 用于判断旋转矩形是否与栏杆有重叠区域
+ */
+class Railing
+{
+public:
+    /*
+     * 构造函数
+     * a,b,c代表栏杆所在直线方程, ax+by+c=0
+     * width:表示栏杆的宽
+     */
+    Railing(float a,float b,float c,float width);
+    /*
+     * 检验结果框,是否会与栏杆冲突
+     */
+    Error_manager verify(cv::RotatedRect rotate_rect);
+private:
+    float m_a;
+    float m_b;
+    float m_c;
+    float m_width;
+};
+
+
+#endif //RAILING_H

+ 104 - 0
verify/Verify_result.cpp

@@ -0,0 +1,104 @@
+//
+// Created by zx on 2020/1/10.
+//
+
+#include "Verify_result.h"
+
+
+/*
+     * 构造函数
+     * parameter:硬件限制配置参数
+     */
+Verify_result::Verify_result(Hardware_limit::Hardware_parameter parameter)
+{
+    m_hardware_parameter=parameter;
+}
+/*
+ * 检验硬件限制
+ * rotate_rect:待检验的旋转矩形
+ */
+Error_manager Verify_result::verify(cv::RotatedRect rotate_rect,float height,bool verify_vertex)
+{
+    //第一步,检验边界
+    float minx=m_hardware_parameter.min_x();
+    float maxx=m_hardware_parameter.max_x();
+    float miny=m_hardware_parameter.min_y();
+    float maxy=m_hardware_parameter.max_y();
+    float center_x=rotate_rect.center.x;
+    float center_y=rotate_rect.center.y;
+    //左超界
+    if(center_x<minx)
+    {
+        return Error_manager(HARDWARE_LIMIT_CENTER_X_LEFT,NORMAL,"left limit");
+    }
+    //右超界
+    if(center_x>maxx)
+    {
+        return Error_manager(HARDWARE_LIMIT_CENTER_X_RIGHT,NORMAL,"right limit");
+    }
+    //上超界
+    if(center_y>maxy)
+    {
+        return Error_manager(HARDWARE_LIMIT_CENTER_Y_TOP,NORMAL,"top limit");
+    }
+    //下超界
+    if(center_y>maxy)
+    {
+        return Error_manager(HARDWARE_LIMIT_CENTER_Y_BOTTOM,NORMAL,"bottom limit");
+    }
+    //第二步,检验高度
+    if(height>m_hardware_parameter.height())
+    {
+        char description[255]={0};
+        sprintf(description,"locate height is out of range(%.2f),height:%.2f",m_hardware_parameter.height(),height);
+        return Error_manager(HARDWARE_LIMIT_HEIGHT_OUT_RANGE,NORMAL,description);
+    }
+    //第三步,检验角度
+    bool tb_theta_verify=false;
+    float angle_x=rotate_rect.angle;
+    for(int i=0;i<m_hardware_parameter.theta_range_size();++i)
+    {
+        Hardware_limit::Theta_range theta_range=m_hardware_parameter.theta_range(i);
+        float min_theta=theta_range.min_theta();
+        float max_theta=theta_range.max_theta();
+        //角度检验, 根据plc限制
+        if( angle_x>=min_theta&&angle_x<=max_theta)
+        {
+            tb_theta_verify = true;
+        }
+    }
+    if(tb_theta_verify==false)
+    {
+        char description[255]={0};
+        sprintf(description,"locate theta is out of range,theta:%.2f",angle_x);
+        return Error_manager(HARDWARE_LIMIT_ANGLE_OUT_RANGE,NORMAL,description);
+    }
+    //是否检验顶点与栏杆的碰撞
+    if(verify_vertex==false)
+    {
+        return SUCCESS;
+    }
+    //第二步,检验栏杆是否碰撞
+    //创建栏杆
+    const int railing_count=m_hardware_parameter.railing_parameter_size();
+    if(railing_count==0)
+        return SUCCESS;
+
+    for(int i=0;i<railing_count;++i)
+    {
+        Hardware_limit::Railing railing_parameter=m_hardware_parameter.railing_parameter(i);
+        Railing* tp_railing=new Railing(railing_parameter.pa(),railing_parameter.pb(),railing_parameter.pc(),
+            railing_parameter.railing_width());
+        if(tp_railing!=NULL)
+        {
+            Error_manager code;
+            code=tp_railing->verify(rotate_rect);
+            delete tp_railing;
+            if(code!=SUCCESS)
+            {
+                return code;
+            }
+        }
+    }
+    return SUCCESS;
+}

+ 35 - 0
verify/Verify_result.h

@@ -0,0 +1,35 @@
+//
+// Created by zx on 2020/1/10.
+//
+
+#ifndef VERIFY_RESULT_H
+#define VERIFY_RESULT_H
+#include "hardware_limit.pb.h"
+#include "Railing.h"
+
+/*
+ * 硬件限制检验
+ * 包括旋转矩形是否会碰撞栏杆,旋转矩形中心是否在plc运动范围内
+ */
+class Verify_result
+{
+public:
+    /*
+     * 构造函数
+     * parameter:硬件限制配置参数
+     */
+    Verify_result(Hardware_limit::Hardware_parameter parameter);
+    /*
+     * 检验硬件限制
+     * rotate_rect:待检验的旋转矩形
+     * height:输入高度
+     * center_only:只检验中心点,不检验顶角
+     */
+    Error_manager verify(cv::RotatedRect rotate_rect,float height,bool verify_vertex=true);
+
+private:
+    Hardware_limit::Hardware_parameter          m_hardware_parameter;
+};
+
+
+#endif //VERIFY_RESULT_H

文件差异内容过多而无法显示
+ 1400 - 0
verify/hardware_limit.pb.cc


+ 872 - 0
verify/hardware_limit.pb.h

@@ -0,0 +1,872 @@
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: hardware_limit.proto
+
+#ifndef PROTOBUF_hardware_5flimit_2eproto__INCLUDED
+#define PROTOBUF_hardware_5flimit_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/unknown_field_set.h>
+// @@protoc_insertion_point(includes)
+
+namespace protobuf_hardware_5flimit_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[3];
+  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 InitDefaultsRailingImpl();
+void InitDefaultsRailing();
+void InitDefaultsTheta_rangeImpl();
+void InitDefaultsTheta_range();
+void InitDefaultsHardware_parameterImpl();
+void InitDefaultsHardware_parameter();
+inline void InitDefaults() {
+  InitDefaultsRailing();
+  InitDefaultsTheta_range();
+  InitDefaultsHardware_parameter();
+}
+}  // namespace protobuf_hardware_5flimit_2eproto
+namespace Hardware_limit {
+class Hardware_parameter;
+class Hardware_parameterDefaultTypeInternal;
+extern Hardware_parameterDefaultTypeInternal _Hardware_parameter_default_instance_;
+class Railing;
+class RailingDefaultTypeInternal;
+extern RailingDefaultTypeInternal _Railing_default_instance_;
+class Theta_range;
+class Theta_rangeDefaultTypeInternal;
+extern Theta_rangeDefaultTypeInternal _Theta_range_default_instance_;
+}  // namespace Hardware_limit
+namespace Hardware_limit {
+
+// ===================================================================
+
+class Railing : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Hardware_limit.Railing) */ {
+ public:
+  Railing();
+  virtual ~Railing();
+
+  Railing(const Railing& from);
+
+  inline Railing& operator=(const Railing& from) {
+    CopyFrom(from);
+    return *this;
+  }
+  #if LANG_CXX11
+  Railing(Railing&& from) noexcept
+    : Railing() {
+    *this = ::std::move(from);
+  }
+
+  inline Railing& operator=(Railing&& 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 Railing& default_instance();
+
+  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
+  static inline const Railing* internal_default_instance() {
+    return reinterpret_cast<const Railing*>(
+               &_Railing_default_instance_);
+  }
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
+    0;
+
+  void Swap(Railing* other);
+  friend void swap(Railing& a, Railing& b) {
+    a.Swap(&b);
+  }
+
+  // implements Message ----------------------------------------------
+
+  inline Railing* New() const PROTOBUF_FINAL { return New(NULL); }
+
+  Railing* 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 Railing& from);
+  void MergeFrom(const Railing& 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(Railing* 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 -------------------------------------------------------
+
+  // required float pa = 1;
+  bool has_pa() const;
+  void clear_pa();
+  static const int kPaFieldNumber = 1;
+  float pa() const;
+  void set_pa(float value);
+
+  // required float pb = 2;
+  bool has_pb() const;
+  void clear_pb();
+  static const int kPbFieldNumber = 2;
+  float pb() const;
+  void set_pb(float value);
+
+  // required float pc = 3;
+  bool has_pc() const;
+  void clear_pc();
+  static const int kPcFieldNumber = 3;
+  float pc() const;
+  void set_pc(float value);
+
+  // optional float railing_width = 4 [default = 0];
+  bool has_railing_width() const;
+  void clear_railing_width();
+  static const int kRailingWidthFieldNumber = 4;
+  float railing_width() const;
+  void set_railing_width(float value);
+
+  // @@protoc_insertion_point(class_scope:Hardware_limit.Railing)
+ private:
+  void set_has_pa();
+  void clear_has_pa();
+  void set_has_pb();
+  void clear_has_pb();
+  void set_has_pc();
+  void clear_has_pc();
+  void set_has_railing_width();
+  void clear_has_railing_width();
+
+  // helper for ByteSizeLong()
+  size_t RequiredFieldsByteSizeFallback() const;
+
+  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+  ::google::protobuf::internal::HasBits<1> _has_bits_;
+  mutable int _cached_size_;
+  float pa_;
+  float pb_;
+  float pc_;
+  float railing_width_;
+  friend struct ::protobuf_hardware_5flimit_2eproto::TableStruct;
+  friend void ::protobuf_hardware_5flimit_2eproto::InitDefaultsRailingImpl();
+};
+// -------------------------------------------------------------------
+
+class Theta_range : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Hardware_limit.Theta_range) */ {
+ public:
+  Theta_range();
+  virtual ~Theta_range();
+
+  Theta_range(const Theta_range& from);
+
+  inline Theta_range& operator=(const Theta_range& from) {
+    CopyFrom(from);
+    return *this;
+  }
+  #if LANG_CXX11
+  Theta_range(Theta_range&& from) noexcept
+    : Theta_range() {
+    *this = ::std::move(from);
+  }
+
+  inline Theta_range& operator=(Theta_range&& 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 Theta_range& default_instance();
+
+  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
+  static inline const Theta_range* internal_default_instance() {
+    return reinterpret_cast<const Theta_range*>(
+               &_Theta_range_default_instance_);
+  }
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
+    1;
+
+  void Swap(Theta_range* other);
+  friend void swap(Theta_range& a, Theta_range& b) {
+    a.Swap(&b);
+  }
+
+  // implements Message ----------------------------------------------
+
+  inline Theta_range* New() const PROTOBUF_FINAL { return New(NULL); }
+
+  Theta_range* 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 Theta_range& from);
+  void MergeFrom(const Theta_range& 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(Theta_range* 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 -------------------------------------------------------
+
+  // required float min_theta = 1;
+  bool has_min_theta() const;
+  void clear_min_theta();
+  static const int kMinThetaFieldNumber = 1;
+  float min_theta() const;
+  void set_min_theta(float value);
+
+  // required float max_theta = 2;
+  bool has_max_theta() const;
+  void clear_max_theta();
+  static const int kMaxThetaFieldNumber = 2;
+  float max_theta() const;
+  void set_max_theta(float value);
+
+  // @@protoc_insertion_point(class_scope:Hardware_limit.Theta_range)
+ private:
+  void set_has_min_theta();
+  void clear_has_min_theta();
+  void set_has_max_theta();
+  void clear_has_max_theta();
+
+  // helper for ByteSizeLong()
+  size_t RequiredFieldsByteSizeFallback() const;
+
+  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+  ::google::protobuf::internal::HasBits<1> _has_bits_;
+  mutable int _cached_size_;
+  float min_theta_;
+  float max_theta_;
+  friend struct ::protobuf_hardware_5flimit_2eproto::TableStruct;
+  friend void ::protobuf_hardware_5flimit_2eproto::InitDefaultsTheta_rangeImpl();
+};
+// -------------------------------------------------------------------
+
+class Hardware_parameter : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Hardware_limit.Hardware_parameter) */ {
+ public:
+  Hardware_parameter();
+  virtual ~Hardware_parameter();
+
+  Hardware_parameter(const Hardware_parameter& from);
+
+  inline Hardware_parameter& operator=(const Hardware_parameter& from) {
+    CopyFrom(from);
+    return *this;
+  }
+  #if LANG_CXX11
+  Hardware_parameter(Hardware_parameter&& from) noexcept
+    : Hardware_parameter() {
+    *this = ::std::move(from);
+  }
+
+  inline Hardware_parameter& operator=(Hardware_parameter&& 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 Hardware_parameter& default_instance();
+
+  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
+  static inline const Hardware_parameter* internal_default_instance() {
+    return reinterpret_cast<const Hardware_parameter*>(
+               &_Hardware_parameter_default_instance_);
+  }
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
+    2;
+
+  void Swap(Hardware_parameter* other);
+  friend void swap(Hardware_parameter& a, Hardware_parameter& b) {
+    a.Swap(&b);
+  }
+
+  // implements Message ----------------------------------------------
+
+  inline Hardware_parameter* New() const PROTOBUF_FINAL { return New(NULL); }
+
+  Hardware_parameter* 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 Hardware_parameter& from);
+  void MergeFrom(const Hardware_parameter& 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(Hardware_parameter* 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 .Hardware_limit.Railing railing_parameter = 1;
+  int railing_parameter_size() const;
+  void clear_railing_parameter();
+  static const int kRailingParameterFieldNumber = 1;
+  const ::Hardware_limit::Railing& railing_parameter(int index) const;
+  ::Hardware_limit::Railing* mutable_railing_parameter(int index);
+  ::Hardware_limit::Railing* add_railing_parameter();
+  ::google::protobuf::RepeatedPtrField< ::Hardware_limit::Railing >*
+      mutable_railing_parameter();
+  const ::google::protobuf::RepeatedPtrField< ::Hardware_limit::Railing >&
+      railing_parameter() const;
+
+  // repeated .Hardware_limit.Theta_range theta_range = 6;
+  int theta_range_size() const;
+  void clear_theta_range();
+  static const int kThetaRangeFieldNumber = 6;
+  const ::Hardware_limit::Theta_range& theta_range(int index) const;
+  ::Hardware_limit::Theta_range* mutable_theta_range(int index);
+  ::Hardware_limit::Theta_range* add_theta_range();
+  ::google::protobuf::RepeatedPtrField< ::Hardware_limit::Theta_range >*
+      mutable_theta_range();
+  const ::google::protobuf::RepeatedPtrField< ::Hardware_limit::Theta_range >&
+      theta_range() const;
+
+  // required float min_y = 2;
+  bool has_min_y() const;
+  void clear_min_y();
+  static const int kMinYFieldNumber = 2;
+  float min_y() const;
+  void set_min_y(float value);
+
+  // required float max_y = 3;
+  bool has_max_y() const;
+  void clear_max_y();
+  static const int kMaxYFieldNumber = 3;
+  float max_y() const;
+  void set_max_y(float value);
+
+  // required float min_x = 4;
+  bool has_min_x() const;
+  void clear_min_x();
+  static const int kMinXFieldNumber = 4;
+  float min_x() const;
+  void set_min_x(float value);
+
+  // required float max_x = 5;
+  bool has_max_x() const;
+  void clear_max_x();
+  static const int kMaxXFieldNumber = 5;
+  float max_x() const;
+  void set_max_x(float value);
+
+  // required float height = 7;
+  bool has_height() const;
+  void clear_height();
+  static const int kHeightFieldNumber = 7;
+  float height() const;
+  void set_height(float value);
+
+  // @@protoc_insertion_point(class_scope:Hardware_limit.Hardware_parameter)
+ private:
+  void set_has_min_y();
+  void clear_has_min_y();
+  void set_has_max_y();
+  void clear_has_max_y();
+  void set_has_min_x();
+  void clear_has_min_x();
+  void set_has_max_x();
+  void clear_has_max_x();
+  void set_has_height();
+  void clear_has_height();
+
+  // 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::RepeatedPtrField< ::Hardware_limit::Railing > railing_parameter_;
+  ::google::protobuf::RepeatedPtrField< ::Hardware_limit::Theta_range > theta_range_;
+  float min_y_;
+  float max_y_;
+  float min_x_;
+  float max_x_;
+  float height_;
+  friend struct ::protobuf_hardware_5flimit_2eproto::TableStruct;
+  friend void ::protobuf_hardware_5flimit_2eproto::InitDefaultsHardware_parameterImpl();
+};
+// ===================================================================
+
+
+// ===================================================================
+
+#ifdef __GNUC__
+  #pragma GCC diagnostic push
+  #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif  // __GNUC__
+// Railing
+
+// required float pa = 1;
+inline bool Railing::has_pa() const {
+  return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void Railing::set_has_pa() {
+  _has_bits_[0] |= 0x00000001u;
+}
+inline void Railing::clear_has_pa() {
+  _has_bits_[0] &= ~0x00000001u;
+}
+inline void Railing::clear_pa() {
+  pa_ = 0;
+  clear_has_pa();
+}
+inline float Railing::pa() const {
+  // @@protoc_insertion_point(field_get:Hardware_limit.Railing.pa)
+  return pa_;
+}
+inline void Railing::set_pa(float value) {
+  set_has_pa();
+  pa_ = value;
+  // @@protoc_insertion_point(field_set:Hardware_limit.Railing.pa)
+}
+
+// required float pb = 2;
+inline bool Railing::has_pb() const {
+  return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void Railing::set_has_pb() {
+  _has_bits_[0] |= 0x00000002u;
+}
+inline void Railing::clear_has_pb() {
+  _has_bits_[0] &= ~0x00000002u;
+}
+inline void Railing::clear_pb() {
+  pb_ = 0;
+  clear_has_pb();
+}
+inline float Railing::pb() const {
+  // @@protoc_insertion_point(field_get:Hardware_limit.Railing.pb)
+  return pb_;
+}
+inline void Railing::set_pb(float value) {
+  set_has_pb();
+  pb_ = value;
+  // @@protoc_insertion_point(field_set:Hardware_limit.Railing.pb)
+}
+
+// required float pc = 3;
+inline bool Railing::has_pc() const {
+  return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void Railing::set_has_pc() {
+  _has_bits_[0] |= 0x00000004u;
+}
+inline void Railing::clear_has_pc() {
+  _has_bits_[0] &= ~0x00000004u;
+}
+inline void Railing::clear_pc() {
+  pc_ = 0;
+  clear_has_pc();
+}
+inline float Railing::pc() const {
+  // @@protoc_insertion_point(field_get:Hardware_limit.Railing.pc)
+  return pc_;
+}
+inline void Railing::set_pc(float value) {
+  set_has_pc();
+  pc_ = value;
+  // @@protoc_insertion_point(field_set:Hardware_limit.Railing.pc)
+}
+
+// optional float railing_width = 4 [default = 0];
+inline bool Railing::has_railing_width() const {
+  return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void Railing::set_has_railing_width() {
+  _has_bits_[0] |= 0x00000008u;
+}
+inline void Railing::clear_has_railing_width() {
+  _has_bits_[0] &= ~0x00000008u;
+}
+inline void Railing::clear_railing_width() {
+  railing_width_ = 0;
+  clear_has_railing_width();
+}
+inline float Railing::railing_width() const {
+  // @@protoc_insertion_point(field_get:Hardware_limit.Railing.railing_width)
+  return railing_width_;
+}
+inline void Railing::set_railing_width(float value) {
+  set_has_railing_width();
+  railing_width_ = value;
+  // @@protoc_insertion_point(field_set:Hardware_limit.Railing.railing_width)
+}
+
+// -------------------------------------------------------------------
+
+// Theta_range
+
+// required float min_theta = 1;
+inline bool Theta_range::has_min_theta() const {
+  return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void Theta_range::set_has_min_theta() {
+  _has_bits_[0] |= 0x00000001u;
+}
+inline void Theta_range::clear_has_min_theta() {
+  _has_bits_[0] &= ~0x00000001u;
+}
+inline void Theta_range::clear_min_theta() {
+  min_theta_ = 0;
+  clear_has_min_theta();
+}
+inline float Theta_range::min_theta() const {
+  // @@protoc_insertion_point(field_get:Hardware_limit.Theta_range.min_theta)
+  return min_theta_;
+}
+inline void Theta_range::set_min_theta(float value) {
+  set_has_min_theta();
+  min_theta_ = value;
+  // @@protoc_insertion_point(field_set:Hardware_limit.Theta_range.min_theta)
+}
+
+// required float max_theta = 2;
+inline bool Theta_range::has_max_theta() const {
+  return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void Theta_range::set_has_max_theta() {
+  _has_bits_[0] |= 0x00000002u;
+}
+inline void Theta_range::clear_has_max_theta() {
+  _has_bits_[0] &= ~0x00000002u;
+}
+inline void Theta_range::clear_max_theta() {
+  max_theta_ = 0;
+  clear_has_max_theta();
+}
+inline float Theta_range::max_theta() const {
+  // @@protoc_insertion_point(field_get:Hardware_limit.Theta_range.max_theta)
+  return max_theta_;
+}
+inline void Theta_range::set_max_theta(float value) {
+  set_has_max_theta();
+  max_theta_ = value;
+  // @@protoc_insertion_point(field_set:Hardware_limit.Theta_range.max_theta)
+}
+
+// -------------------------------------------------------------------
+
+// Hardware_parameter
+
+// repeated .Hardware_limit.Railing railing_parameter = 1;
+inline int Hardware_parameter::railing_parameter_size() const {
+  return railing_parameter_.size();
+}
+inline void Hardware_parameter::clear_railing_parameter() {
+  railing_parameter_.Clear();
+}
+inline const ::Hardware_limit::Railing& Hardware_parameter::railing_parameter(int index) const {
+  // @@protoc_insertion_point(field_get:Hardware_limit.Hardware_parameter.railing_parameter)
+  return railing_parameter_.Get(index);
+}
+inline ::Hardware_limit::Railing* Hardware_parameter::mutable_railing_parameter(int index) {
+  // @@protoc_insertion_point(field_mutable:Hardware_limit.Hardware_parameter.railing_parameter)
+  return railing_parameter_.Mutable(index);
+}
+inline ::Hardware_limit::Railing* Hardware_parameter::add_railing_parameter() {
+  // @@protoc_insertion_point(field_add:Hardware_limit.Hardware_parameter.railing_parameter)
+  return railing_parameter_.Add();
+}
+inline ::google::protobuf::RepeatedPtrField< ::Hardware_limit::Railing >*
+Hardware_parameter::mutable_railing_parameter() {
+  // @@protoc_insertion_point(field_mutable_list:Hardware_limit.Hardware_parameter.railing_parameter)
+  return &railing_parameter_;
+}
+inline const ::google::protobuf::RepeatedPtrField< ::Hardware_limit::Railing >&
+Hardware_parameter::railing_parameter() const {
+  // @@protoc_insertion_point(field_list:Hardware_limit.Hardware_parameter.railing_parameter)
+  return railing_parameter_;
+}
+
+// required float min_y = 2;
+inline bool Hardware_parameter::has_min_y() const {
+  return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void Hardware_parameter::set_has_min_y() {
+  _has_bits_[0] |= 0x00000001u;
+}
+inline void Hardware_parameter::clear_has_min_y() {
+  _has_bits_[0] &= ~0x00000001u;
+}
+inline void Hardware_parameter::clear_min_y() {
+  min_y_ = 0;
+  clear_has_min_y();
+}
+inline float Hardware_parameter::min_y() const {
+  // @@protoc_insertion_point(field_get:Hardware_limit.Hardware_parameter.min_y)
+  return min_y_;
+}
+inline void Hardware_parameter::set_min_y(float value) {
+  set_has_min_y();
+  min_y_ = value;
+  // @@protoc_insertion_point(field_set:Hardware_limit.Hardware_parameter.min_y)
+}
+
+// required float max_y = 3;
+inline bool Hardware_parameter::has_max_y() const {
+  return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void Hardware_parameter::set_has_max_y() {
+  _has_bits_[0] |= 0x00000002u;
+}
+inline void Hardware_parameter::clear_has_max_y() {
+  _has_bits_[0] &= ~0x00000002u;
+}
+inline void Hardware_parameter::clear_max_y() {
+  max_y_ = 0;
+  clear_has_max_y();
+}
+inline float Hardware_parameter::max_y() const {
+  // @@protoc_insertion_point(field_get:Hardware_limit.Hardware_parameter.max_y)
+  return max_y_;
+}
+inline void Hardware_parameter::set_max_y(float value) {
+  set_has_max_y();
+  max_y_ = value;
+  // @@protoc_insertion_point(field_set:Hardware_limit.Hardware_parameter.max_y)
+}
+
+// required float min_x = 4;
+inline bool Hardware_parameter::has_min_x() const {
+  return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void Hardware_parameter::set_has_min_x() {
+  _has_bits_[0] |= 0x00000004u;
+}
+inline void Hardware_parameter::clear_has_min_x() {
+  _has_bits_[0] &= ~0x00000004u;
+}
+inline void Hardware_parameter::clear_min_x() {
+  min_x_ = 0;
+  clear_has_min_x();
+}
+inline float Hardware_parameter::min_x() const {
+  // @@protoc_insertion_point(field_get:Hardware_limit.Hardware_parameter.min_x)
+  return min_x_;
+}
+inline void Hardware_parameter::set_min_x(float value) {
+  set_has_min_x();
+  min_x_ = value;
+  // @@protoc_insertion_point(field_set:Hardware_limit.Hardware_parameter.min_x)
+}
+
+// required float max_x = 5;
+inline bool Hardware_parameter::has_max_x() const {
+  return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void Hardware_parameter::set_has_max_x() {
+  _has_bits_[0] |= 0x00000008u;
+}
+inline void Hardware_parameter::clear_has_max_x() {
+  _has_bits_[0] &= ~0x00000008u;
+}
+inline void Hardware_parameter::clear_max_x() {
+  max_x_ = 0;
+  clear_has_max_x();
+}
+inline float Hardware_parameter::max_x() const {
+  // @@protoc_insertion_point(field_get:Hardware_limit.Hardware_parameter.max_x)
+  return max_x_;
+}
+inline void Hardware_parameter::set_max_x(float value) {
+  set_has_max_x();
+  max_x_ = value;
+  // @@protoc_insertion_point(field_set:Hardware_limit.Hardware_parameter.max_x)
+}
+
+// repeated .Hardware_limit.Theta_range theta_range = 6;
+inline int Hardware_parameter::theta_range_size() const {
+  return theta_range_.size();
+}
+inline void Hardware_parameter::clear_theta_range() {
+  theta_range_.Clear();
+}
+inline const ::Hardware_limit::Theta_range& Hardware_parameter::theta_range(int index) const {
+  // @@protoc_insertion_point(field_get:Hardware_limit.Hardware_parameter.theta_range)
+  return theta_range_.Get(index);
+}
+inline ::Hardware_limit::Theta_range* Hardware_parameter::mutable_theta_range(int index) {
+  // @@protoc_insertion_point(field_mutable:Hardware_limit.Hardware_parameter.theta_range)
+  return theta_range_.Mutable(index);
+}
+inline ::Hardware_limit::Theta_range* Hardware_parameter::add_theta_range() {
+  // @@protoc_insertion_point(field_add:Hardware_limit.Hardware_parameter.theta_range)
+  return theta_range_.Add();
+}
+inline ::google::protobuf::RepeatedPtrField< ::Hardware_limit::Theta_range >*
+Hardware_parameter::mutable_theta_range() {
+  // @@protoc_insertion_point(field_mutable_list:Hardware_limit.Hardware_parameter.theta_range)
+  return &theta_range_;
+}
+inline const ::google::protobuf::RepeatedPtrField< ::Hardware_limit::Theta_range >&
+Hardware_parameter::theta_range() const {
+  // @@protoc_insertion_point(field_list:Hardware_limit.Hardware_parameter.theta_range)
+  return theta_range_;
+}
+
+// required float height = 7;
+inline bool Hardware_parameter::has_height() const {
+  return (_has_bits_[0] & 0x00000010u) != 0;
+}
+inline void Hardware_parameter::set_has_height() {
+  _has_bits_[0] |= 0x00000010u;
+}
+inline void Hardware_parameter::clear_has_height() {
+  _has_bits_[0] &= ~0x00000010u;
+}
+inline void Hardware_parameter::clear_height() {
+  height_ = 0;
+  clear_has_height();
+}
+inline float Hardware_parameter::height() const {
+  // @@protoc_insertion_point(field_get:Hardware_limit.Hardware_parameter.height)
+  return height_;
+}
+inline void Hardware_parameter::set_height(float value) {
+  set_has_height();
+  height_ = value;
+  // @@protoc_insertion_point(field_set:Hardware_limit.Hardware_parameter.height)
+}
+
+#ifdef __GNUC__
+  #pragma GCC diagnostic pop
+#endif  // __GNUC__
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+}  // namespace Hardware_limit
+
+// @@protoc_insertion_point(global_scope)
+
+#endif  // PROTOBUF_hardware_5flimit_2eproto__INCLUDED

+ 28 - 0
verify/hardware_limit.proto

@@ -0,0 +1,28 @@
+syntax="proto2";
+package Hardware_limit;
+
+//栏杆
+message Railing
+{
+    required float pa=1;
+    required float pb=2;
+    required float pc=3;
+    optional float railing_width=4 [default=0];
+}
+
+message Theta_range
+{
+    required float min_theta=1;
+    required float max_theta=2;
+}
+
+message Hardware_parameter
+{
+    repeated Railing railing_parameter=1;
+    required float min_y=2;
+    required float max_y=3;
+    required float min_x=4;
+    required float max_x=5;
+    repeated Theta_range theta_range=6;
+    required float height=7;
+}