Browse Source

Inspection_Shenlan_Miivill

yuchuli 1 year ago
parent
commit
b8c4af3bae

+ 30 - 0
src/driver/driver_camera_ioctl/camtest.pro

@@ -0,0 +1,30 @@
+
+QT -= gui
+
+CONFIG += c++11 console
+CONFIG -= app_bundle
+
+# The following define makes your compiler emit warnings if you use
+# any feature of Qt which as been marked deprecated (the exact warnings
+# depend on your compiler). Please consult the documentation of the
+# deprecated API in order to know how to port your code away from it.
+DEFINES += QT_DEPRECATED_WARNINGS
+
+# You can also make your code fail to compile if you use deprecated APIs.
+# In order to do so, uncomment the following line.
+# You can also select to disable deprecated APIs only up to a certain version of Qt.
+#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
+
+SOURCES += camtestmain.cpp \
+    usb_cam.cpp
+
+
+HEADERS += \
+    usb_cam.h
+
+QMAKE_LFLAGS += -no-pie
+
+
+LIBS +=-lpostproc -lswresample -lswscale -lavfilter -lavdevice -lavformat -lavcodec -lavutil -lm -ldl
+
+

+ 286 - 0
src/driver/driver_camera_ioctl/camtestmain.cpp

@@ -0,0 +1,286 @@
+#include <QCoreApplication>
+#include <thread>
+#include <QMutex>
+
+
+
+#include "usb_cam.h"
+
+
+#include <iostream>
+
+#include <stdio.h>
+#include <unistd.h>
+
+#include <sys/types.h>                      // 下面四个头文件是linux系统编程特有的
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+
+#include <linux/videodev2.h>                // 操作摄像头设备
+
+
+#include <signal.h>
+
+QCoreApplication * gApp;
+
+
+void * gpa;
+
+int gindex = 0;
+
+
+int gcamindex = 1;
+
+std::string gstrcamera = "";
+
+std::string gmsgname = "usbpic";
+
+std::string gstrdevname = "/dev/video5";
+
+
+std::string gvideo_device_name_, gio_method_name_, gpixel_format_name_, gcamera_name_, gcamera_info_url_;
+//std::string start_service_name_, start_service_name_;
+bool gstreaming_status_;
+int gimage_width_, gimage_height_, gframerate_, gexposure_, gbrightness_, gcontrast_, gsaturation_, gsharpness_, gfocus_,
+    gwhite_balance_, ggain_;
+bool gautofocus_, gautoexposure_, gauto_white_balance_;
+
+bool gbuserawmjpeg = true;
+
+bool gbcompress = true;
+
+
+void setdefaultcvalue()
+{
+    gbrightness_ = -1;// xp.GetParam("brightness",  -1); //0-255, -1 "leave alone"
+    gcontrast_ = -1;//xp.GetParam("contrast",  -1); //0-255, -1 "leave alone"
+    gsaturation_ =  -1;//xp.GetParam("saturation",  -1); //0-255, -1 "leave alone"
+    gsharpness_ = -1;//xp.GetParam("sharpness",  -1); //0-255, -1 "leave alone"
+    // possible values: mmap, read, userptr
+//    gio_method_name_ = xp.GetParam("io_method",  std::string("mmap"));
+//    gimage_width_ = xp.GetParam("image_width", 1920);
+//    gimage_height_ = xp.GetParam("image_height",  1080);
+//    gframerate_ =  xp.GetParam("framerate",  30);
+    // possible values: yuyv, uyvy, mjpeg, yuvmono10, rgb24
+//    gpixel_format_name_ = xp.GetParam("pixel_format",  std::string("mjpeg"));
+    // enable/disable autofocus
+    gautofocus_  = false;//xp.GetParam("autofocus", false);
+
+
+    gfocus_ = -1;//xp.GetParam("focus", -1); //0-255, -1 "leave alone"
+    // enable/disable autoexposure
+    gautoexposure_ = true;//xp.GetParam("autoexposure",  true);
+    gexposure_ = 100;//xp.GetParam("exposure",  100);
+    ggain_ = -1;//xp.GetParam("gain",  -1); //0-100?, -1 "leave alone"
+    // enable/disable auto white balance temperature
+    gauto_white_balance_ = true;//xp.GetParam("auto_white_balance", true);
+    gwhite_balance_ = 4000;//xp.GetParam("white_balance", 4000);
+
+    // load the camera info
+//     xp.GetParam("camera_frame_id", img_.header.frame_id, std::string("head_camera"));
+//    gcamera_name_ = "head_camera";// xp.GetParam("camera_name",  std::string("head_camera"));
+//    gcamera_info_url_ = "";//xp.GetParam("camera_info_url",  std::string(""));
+}
+
+using namespace  usb_cam;
+void threadcapture()
+{
+
+    usb_cam::UsbCam camx;
+
+    // set the IO method
+    UsbCam::io_method io_method = UsbCam::io_method_from_string("mmap");
+    if(io_method == UsbCam::IO_METHOD_UNKNOWN)
+    {
+      qDebug("Unknown IO method '%s'", gio_method_name_.c_str());
+      return;
+    }
+
+    // set the pixel format
+    UsbCam::pixel_format pixel_format = UsbCam::pixel_format_from_string("mjpeg");
+    if (pixel_format == UsbCam::PIXEL_FORMAT_UNKNOWN)
+    {
+      qDebug("Unknown pixel format '%s'", gpixel_format_name_.c_str());
+      return;
+    }
+
+    // start the camera
+    camx.start(gvideo_device_name_.c_str(), io_method, pixel_format, gimage_width_,
+             gimage_height_, gframerate_);
+
+    // set camera parameters
+    if (gbrightness_ >= 0)
+    {
+      camx.set_v4l_parameter("brightness", gbrightness_);
+    }
+
+    if (gcontrast_ >= 0)
+    {
+      camx.set_v4l_parameter("contrast", gcontrast_);
+    }
+
+    if (gsaturation_ >= 0)
+    {
+      camx.set_v4l_parameter("saturation", gsaturation_);
+    }
+
+    if (gsharpness_ >= 0)
+    {
+      camx.set_v4l_parameter("sharpness", gsharpness_);
+    }
+
+    if (ggain_ >= 0)
+    {
+      camx.set_v4l_parameter("gain", ggain_);
+    }
+
+    // check auto white balance
+    if (gauto_white_balance_)
+    {
+      camx.set_v4l_parameter("white_balance_temperature_auto", 1);
+    }
+    else
+    {
+      camx.set_v4l_parameter("white_balance_temperature_auto", 0);
+      camx.set_v4l_parameter("white_balance_temperature", gwhite_balance_);
+    }
+
+    // check auto exposure
+    if (!gautoexposure_)
+    {
+      // turn down exposure control (from max of 3)
+      camx.set_v4l_parameter("exposure_auto", 1);
+      // change the exposure level
+      camx.set_v4l_parameter("exposure_absolute", gexposure_);
+    }
+
+    // check auto focus
+    if (gautofocus_)
+    {
+      camx.set_auto_focus(1);
+      camx.set_v4l_parameter("focus_auto", 1);
+    }
+    else
+    {
+      camx.set_v4l_parameter("focus_auto", 0);
+      if (gfocus_ >= 0)
+      {
+        camx.set_v4l_parameter("focus_absolute", gfocus_);
+      }
+    }
+
+    camx.set_useRawMJPEG(gbuserawmjpeg);
+
+    int nserbufsize = 20000000;
+
+    char * strser = new char[nserbufsize];
+
+    char * strbuf = new char[10000000];
+
+
+    int64_t nLastrecv = 0;
+    int nvalid = 0;
+    int nfail = 0;
+    while(1)
+    {
+        int nLen;
+        camx.grab_image(strbuf,&nLen,10000000);
+        int64_t nnow = std::chrono::system_clock::now().time_since_epoch().count()/1000000;
+        if(abs(nnow - nLastrecv)<50)
+        {
+            nvalid++;
+            nfail = 0;
+        }
+        else
+        {
+            nvalid = 0;
+            nfail++;
+        }
+        if(nvalid > 10)
+        {
+            std::cout<<" camtest success."<<std::endl;
+            exit(0);
+        }
+        if(nfail > 5)
+        {
+            std::cout<<" cantest fail."<<std::endl;
+            exit(1);
+        }
+        nLastrecv = nnow;
+//        qDebug("time %ld len: %ld",QDateTime::currentMSecsSinceEpoch(),nLen);
+
+
+//        iv::modulecomm::ModuleSendMsg(gpa,strbuf,nLen);
+//        continue;
+
+    }
+
+}
+
+void ExitFunc()
+{
+    gApp->quit();
+    std::this_thread::sleep_for(std::chrono::milliseconds(100));
+}
+
+void signal_handler(int sig)
+{
+    if(sig == SIGINT)
+    {
+        ExitFunc();
+    }
+}
+
+int main(int argc, char *argv[])
+{
+    QCoreApplication a(argc, argv);
+    gApp = &a;
+
+
+
+    gimage_width_ = 1920;
+    gimage_height_ = 1080;
+    gframerate_ = 30;
+    gvideo_device_name_ = "/dev/video0";
+
+    if(argc>1)
+    {
+        gvideo_device_name_ = argv[1];
+    }
+
+    if(argc>2)
+    {
+        gimage_width_ = atoi(argv[2]);
+    }
+
+    if(argc>3)
+    {
+        gimage_height_ = atoi(argv[3]);
+    }
+
+    if(argc>4)
+    {
+        gframerate_ = atoi(argv[4]);
+    }
+
+
+
+    std::thread * mthread =  new  std::thread(threadcapture) ;//new std::thread(VideoThread,0);
+
+//    std::thread * conthread = new std::thread(threadConvert);
+
+//    std::thread * compressthread = new std::thread(threadCompress);
+
+    (void)mthread;
+//    (void)conthread;
+//    (void)compressthread;
+
+    signal(SIGINT,signal_handler);
+
+    int nrc = a.exec();
+
+
+    return nrc;
+}

+ 54 - 0
src/tool/Inspection_Shenlan_Miivill/Inspection_Shenlan_Miivill.pro

@@ -0,0 +1,54 @@
+#-------------------------------------------------
+#
+# Project created by QtCreator 2023-09-06T09:57:46
+#
+#-------------------------------------------------
+
+QT       += core gui
+
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+
+TARGET = Inspection_Shenlan_Miivill
+TEMPLATE = app
+
+# The following define makes your compiler emit warnings if you use
+# any feature of Qt which has been marked as deprecated (the exact warnings
+# depend on your compiler). Please consult the documentation of the
+# deprecated API in order to know how to port your code away from it.
+DEFINES += QT_DEPRECATED_WARNINGS
+
+# You can also make your code fail to compile if you use deprecated APIs.
+# In order to do so, uncomment the following line.
+# You can also select to disable deprecated APIs only up to a certain version of Qt.
+#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
+
+
+SOURCES += \
+        main.cpp \
+        mainwindow.cpp \
+    ../../include/msgtype/canmsg.pb.cc \
+    ../../include/msgtype/canraw.pb.cc \
+    ../../include/msgtype/gps.pb.cc \
+    ../../include/msgtype/gpsimu.pb.cc
+
+HEADERS += \
+        mainwindow.h \
+    ../../include/msgtype/canmsg.pb.h \
+    ../../include/msgtype/canraw.pb.h \
+    ../../include/msgtype/gps.pb.h \
+    ../../include/msgtype/gpsimu.pb.h
+
+FORMS += \
+        mainwindow.ui
+
+
+!include(../../../include/common.pri ) {
+    error( "Couldn't find the common.pri file!" )
+}
+
+
+!include(../../../include/ivprotobuf.pri ) {
+    error( "Couldn't find the ivprotobuf.pri file!" )
+}
+
+

+ 11 - 0
src/tool/Inspection_Shenlan_Miivill/main.cpp

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

+ 302 - 0
src/tool/Inspection_Shenlan_Miivill/mainwindow.cpp

@@ -0,0 +1,302 @@
+#include "mainwindow.h"
+#include "ui_mainwindow.h"
+
+#include "canmsg.pb.h"
+#include "gpsimu.pb.h"
+
+static int gnState = 0;
+
+MainWindow::MainWindow(QWidget *parent) :
+    QMainWindow(parent),
+    ui(new Ui::MainWindow)
+{
+    ui->setupUi(this);
+
+    mpLE[0] = ui->lineEdit_VehicleCAN;
+    mpLE[1] = ui->lineEdit_Radar;
+    mpLE[2] = ui->lineEdit_GPS;
+    mpLE[3] = ui->lineEdit_LidarCenter;
+    mpLE[4] = ui->lineEdit_LidarLeft;
+    mpLE[5] = ui->lineEdit_LidarRight;
+    mpLE[6] = ui->lineEdit_CamFront;
+    mpLE[7] = ui->lineEdit_LidarPeception;
+
+    ui->pushButton_OutReport->setEnabled(false);
+    ui->progressBar->setRange(0,mninsnum);
+    ui->progressBar->setValue(0);
+    gnState = 0;
+
+    QTimer * ptimer = new QTimer(this);
+    connect(ptimer,SIGNAL(timeout()),this,SLOT(onTimer()));
+    ptimer->start(100);
+
+    void * pa;
+
+    ModuleFun fun1 =std::bind(&MainWindow::UpdateMSG,this,std::placeholders::_1,std::placeholders::_2,std::placeholders::_3,std::placeholders::_4,std::placeholders::_5);
+    pa = iv::modulecomm::RegisterRecvPlus("canrecv0",fun1);
+    pa = iv::modulecomm::RegisterRecvPlus("canrecv1",fun1);
+    pa = iv::modulecomm::RegisterRecvPlus("hcp2_gpsimu",fun1);
+    pa = iv::modulecomm::RegisterRecvPlus("lidar_pc",fun1);
+    pa = iv::modulecomm::RegisterRecvPlus("lidaprc_left",fun1);
+    pa = iv::modulecomm::RegisterRecvPlus("lidarpc_right",fun1);
+    pa = iv::modulecomm::RegisterRecvPlus("image00",fun1);
+    pa = iv::modulecomm::RegisterRecvPlus("lidar_pointpillar",fun1);
+
+    setWindowTitle("Shenlan Miivii Inspection");
+}
+
+MainWindow::~MainWindow()
+{
+    delete ui;
+}
+
+void MainWindow::on_pushButton_Inspection_clicked()
+{
+    ui->pushButton_Inspection->setEnabled(false);
+
+    ui->progressBar->setValue(0);
+
+    int i;
+    for(i=0;i<mninsnum;i++)
+    {
+        QPalette palette;
+        palette.setColor(QPalette::Base,Qt::white);
+        palette.setColor(QPalette::Text,Qt::black);
+        mpLE[i]->setText("");
+        mpLE[i]->setPalette(palette);
+    }
+
+    gnState = 1;
+    mnCountMsg = 0;
+    mnCountTimer = 0;
+    mstrerr = "TimeOut";
+    mnRes = 0;
+}
+
+void MainWindow::on_pushButton_OutReport_clicked()
+{
+
+}
+
+void MainWindow::onTimer()
+{
+    if((gnState == 0)||(gnState> mninsnum ))
+    {
+        if(gnState > mninsnum)
+        {
+            ui->progressBar->setValue(mninsnum);
+            gnState = 0;
+            ui->pushButton_Inspection->setEnabled(true);
+        }
+        return;
+    }
+
+
+    mmutex.lock();
+    mnCountTimer++;
+    if(mnRes == 1 )
+    {
+        QPalette palette;
+        palette.setColor(QPalette::Base,Qt::green);
+        palette.setColor(QPalette::Text,Qt::black);
+       mpLE[gnState-1]->setPalette(palette);
+       mpLE[gnState-1]->setText("OK");
+
+       gnState++;
+       mnCountMsg = 0;
+       mnCountTimer = 0;
+       mstrerr = "TimeOut";
+       mnRes = 0;
+    }
+    if(mnCountTimer >= mnTimerMax)
+    {
+        QPalette palette;
+
+        palette.setColor(QPalette::Text,Qt::black);
+        if(mnCountMsg == 0)
+        {
+            mpLE[gnState-1]->setText("TimeOut");
+            palette.setColor(QPalette::Base,Qt::red);
+        }
+        else
+        {
+            mpLE[gnState-1]->setText("Have Msg.");
+            palette.setColor(QPalette::Base,Qt::yellow);
+        }
+
+        mpLE[gnState-1]->setPalette(palette);
+        gnState++;
+        mnCountMsg = 0;
+        mnCountTimer = 0;
+        mstrerr = "TimeOut";
+        mnRes = 0;
+
+
+
+    }
+
+    mmutex.unlock();
+    ui->progressBar->setValue(gnState-1);
+}
+
+void MainWindow::UpdateMSG(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname)
+{
+    if((gnState == 0)||(gnState> mninsnum ))
+    {
+        return;
+    }
+
+    mmutex.lock();
+    switch (gnState) {
+    case 1:
+        {
+            if(strncmp(strmemname,"canrecv0",256) == 0)
+            {
+                iv::can::canmsg xmsg;
+                if(false == xmsg.ParseFromArray(strdata,nSize))
+                {
+
+                }
+                else
+                {
+                    mnCountMsg++;
+                    mstrerr = "have msg.";
+                    int i;
+                    for(i=0;i<xmsg.rawmsg_size();i++)
+                    {
+                        const iv::can::canraw * praw = &(xmsg.rawmsg(i));
+                        if(praw->id() == 0x1CC)
+                        {
+                            mnRes = 1;
+                            break;
+                        }
+                    }
+                }
+            }
+        }
+        break;
+    case 2:
+        {
+            if(strncmp(strmemname,"canrecv1",256) == 0)
+            {
+
+                iv::can::canmsg xmsg;
+                if(false == xmsg.ParseFromArray(strdata,nSize))
+                {
+
+                }
+                else
+                {
+                    mnCountMsg++;
+                    mstrerr = "have msg.";
+                    int i;
+                    for(i=0;i<xmsg.rawmsg_size();i++)
+                    {
+                        const iv::can::canraw * praw = &(xmsg.rawmsg(i));
+                        if((praw->id() == 0x600)||(praw->id() == 0x700)||(praw->id() == 0x701)||(praw->id() == 0x702)||(praw->id() == 0x60A)||(praw->id() == 0x60B))
+                        {
+                            mnRes = 1;
+                            break;
+                        }
+                    }
+                }
+            }
+        }
+        break;
+    case 3:
+    {
+        if(strncmp(strmemname,"hcp2_gpsimu",256) == 0)
+        {
+            iv::gps::gpsimu xgpsimu;
+            if(false == xgpsimu.ParseFromArray(strdata,nSize))
+            {
+
+            }
+            else
+            {
+                mnCountMsg++;
+                mstrerr = "have msg.";
+                if(xgpsimu.rtk_state() == 6)
+                {
+                    mnRes = 1;
+                }
+            }
+        }
+    }
+        break;
+    case 4:
+    {
+        if(strncmp(strmemname,"lidar_pc",256) == 0)
+        {
+
+                mnCountMsg++;
+                mstrerr = "have msg.";
+                if(mnCountMsg>10)
+                {
+                    mnRes = 1;
+                }
+        }
+    }
+        break;
+    case 5:
+    {
+        if(strncmp(strmemname,"lidarpc_left",256) == 0)
+        {
+
+                mnCountMsg++;
+                mstrerr = "have msg.";
+                if(mnCountMsg>10)
+                {
+                    mnRes = 1;
+                }
+        }
+    }
+        break;
+    case 6:
+    {
+        if(strncmp(strmemname,"lidarpc_right",256) == 0)
+        {
+
+                mnCountMsg++;
+                mstrerr = "have msg.";
+                if(mnCountMsg>10)
+                {
+                    mnRes = 1;
+                }
+        }
+    }
+        break;
+    case 7:
+    {
+        if(strncmp(strmemname,"image00",256) == 0)
+        {
+
+                mnCountMsg++;
+                mstrerr = "have msg.";
+                if(mnCountMsg>10)
+                {
+                    mnRes = 1;
+                }
+        }
+    }
+        break;
+    case 8:
+    {
+        if(strncmp(strmemname,"lidar_pointpillar",256) == 0)
+        {
+
+                mnCountMsg++;
+                mstrerr = "have msg.";
+                if(mnCountMsg>3)
+                {
+                    mnRes = 1;
+                }
+        }
+    }
+        break;
+    default:
+        break;
+    }
+    mmutex.unlock();
+}
+

+ 66 - 0
src/tool/Inspection_Shenlan_Miivill/mainwindow.h

@@ -0,0 +1,66 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include <QTimer>
+
+#include <QLineEdit>
+
+#include <vector>
+#include <string>
+#include <mutex>
+
+#include "modulecomm.h"
+
+#define mninsnum 8
+
+namespace Ui {
+class MainWindow;
+}
+
+class MainWindow : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+    explicit MainWindow(QWidget *parent = 0);
+    ~MainWindow();
+
+
+private slots:
+    void on_pushButton_Inspection_clicked();
+
+    void on_pushButton_OutReport_clicked();
+
+    void onTimer();
+
+
+private:
+    void UpdateMSG(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname);
+
+private:
+    Ui::MainWindow *ui;
+
+
+
+
+    int mnCountMsg = 0;
+
+    int mnCountTimer = 0;
+    int mnTimerMax = 30;
+    std::string mstrerr;
+    int mnRes = 0;
+
+    std::vector<std::string> mvectorinsres;
+    std::vector<int> mvectornres;
+
+    QLineEdit * mpLE[mninsnum];
+
+    std::mutex mmutex;
+
+
+
+
+};
+
+#endif // MAINWINDOW_H

+ 288 - 0
src/tool/Inspection_Shenlan_Miivill/mainwindow.ui

@@ -0,0 +1,288 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>750</width>
+    <height>464</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralWidget">
+   <widget class="QLabel" name="label">
+    <property name="geometry">
+     <rect>
+      <x>30</x>
+      <y>80</y>
+      <width>151</width>
+      <height>31</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Vechicle CAN</string>
+    </property>
+   </widget>
+   <widget class="QLabel" name="label_2">
+    <property name="geometry">
+     <rect>
+      <x>30</x>
+      <y>140</y>
+      <width>141</width>
+      <height>31</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Radar</string>
+    </property>
+   </widget>
+   <widget class="QLabel" name="label_3">
+    <property name="geometry">
+     <rect>
+      <x>30</x>
+      <y>198</y>
+      <width>141</width>
+      <height>31</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>GPS</string>
+    </property>
+   </widget>
+   <widget class="QLabel" name="label_4">
+    <property name="geometry">
+     <rect>
+      <x>30</x>
+      <y>260</y>
+      <width>131</width>
+      <height>31</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Center Lidar</string>
+    </property>
+   </widget>
+   <widget class="QLabel" name="label_5">
+    <property name="geometry">
+     <rect>
+      <x>370</x>
+      <y>80</y>
+      <width>141</width>
+      <height>31</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Left Lidar</string>
+    </property>
+   </widget>
+   <widget class="QLabel" name="label_6">
+    <property name="geometry">
+     <rect>
+      <x>368</x>
+      <y>141</y>
+      <width>131</width>
+      <height>31</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Right Lidar</string>
+    </property>
+   </widget>
+   <widget class="QLabel" name="label_7">
+    <property name="geometry">
+     <rect>
+      <x>368</x>
+      <y>203</y>
+      <width>141</width>
+      <height>31</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Front Camera</string>
+    </property>
+   </widget>
+   <widget class="QLabel" name="label_8">
+    <property name="geometry">
+     <rect>
+      <x>365</x>
+      <y>263</y>
+      <width>141</width>
+      <height>31</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Lidar Perception</string>
+    </property>
+   </widget>
+   <widget class="QPushButton" name="pushButton_Inspection">
+    <property name="geometry">
+     <rect>
+      <x>100</x>
+      <y>20</y>
+      <width>181</width>
+      <height>41</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Inspection</string>
+    </property>
+   </widget>
+   <widget class="QLineEdit" name="lineEdit_VehicleCAN">
+    <property name="geometry">
+     <rect>
+      <x>170</x>
+      <y>75</y>
+      <width>171</width>
+      <height>41</height>
+     </rect>
+    </property>
+    <property name="readOnly">
+     <bool>true</bool>
+    </property>
+   </widget>
+   <widget class="QLineEdit" name="lineEdit_Radar">
+    <property name="geometry">
+     <rect>
+      <x>170</x>
+      <y>136</y>
+      <width>171</width>
+      <height>41</height>
+     </rect>
+    </property>
+    <property name="readOnly">
+     <bool>true</bool>
+    </property>
+   </widget>
+   <widget class="QLineEdit" name="lineEdit_GPS">
+    <property name="geometry">
+     <rect>
+      <x>170</x>
+      <y>197</y>
+      <width>171</width>
+      <height>41</height>
+     </rect>
+    </property>
+    <property name="readOnly">
+     <bool>true</bool>
+    </property>
+   </widget>
+   <widget class="QLineEdit" name="lineEdit_LidarCenter">
+    <property name="geometry">
+     <rect>
+      <x>170</x>
+      <y>260</y>
+      <width>171</width>
+      <height>41</height>
+     </rect>
+    </property>
+    <property name="readOnly">
+     <bool>true</bool>
+    </property>
+   </widget>
+   <widget class="QLineEdit" name="lineEdit_CamFront">
+    <property name="geometry">
+     <rect>
+      <x>520</x>
+      <y>201</y>
+      <width>171</width>
+      <height>41</height>
+     </rect>
+    </property>
+    <property name="readOnly">
+     <bool>true</bool>
+    </property>
+   </widget>
+   <widget class="QLineEdit" name="lineEdit_LidarLeft">
+    <property name="geometry">
+     <rect>
+      <x>520</x>
+      <y>79</y>
+      <width>171</width>
+      <height>41</height>
+     </rect>
+    </property>
+    <property name="readOnly">
+     <bool>true</bool>
+    </property>
+   </widget>
+   <widget class="QLineEdit" name="lineEdit_LidarPeception">
+    <property name="geometry">
+     <rect>
+      <x>520</x>
+      <y>264</y>
+      <width>171</width>
+      <height>41</height>
+     </rect>
+    </property>
+    <property name="readOnly">
+     <bool>true</bool>
+    </property>
+   </widget>
+   <widget class="QLineEdit" name="lineEdit_LidarRight">
+    <property name="geometry">
+     <rect>
+      <x>520</x>
+      <y>140</y>
+      <width>171</width>
+      <height>41</height>
+     </rect>
+    </property>
+    <property name="readOnly">
+     <bool>true</bool>
+    </property>
+   </widget>
+   <widget class="QProgressBar" name="progressBar">
+    <property name="geometry">
+     <rect>
+      <x>30</x>
+      <y>330</y>
+      <width>661</width>
+      <height>51</height>
+     </rect>
+    </property>
+    <property name="value">
+     <number>24</number>
+    </property>
+   </widget>
+   <widget class="QPushButton" name="pushButton_OutReport">
+    <property name="geometry">
+     <rect>
+      <x>420</x>
+      <y>20</y>
+      <width>181</width>
+      <height>41</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Out Report</string>
+    </property>
+   </widget>
+  </widget>
+  <widget class="QMenuBar" name="menuBar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>750</width>
+     <height>28</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QToolBar" name="mainToolBar">
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+  </widget>
+  <widget class="QStatusBar" name="statusBar"/>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections/>
+</ui>

+ 41 - 0
src/tool/Inspection_Shenlan_Orin/Inspection_Shenlan_Orin.pro

@@ -0,0 +1,41 @@
+#-------------------------------------------------
+#
+# Project created by QtCreator 2023-09-06T14:56:36
+#
+#-------------------------------------------------
+
+QT       += core gui
+
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+
+TARGET = Inspection_Shenlan_Orin
+TEMPLATE = app
+
+# The following define makes your compiler emit warnings if you use
+# any feature of Qt which has been marked as deprecated (the exact warnings
+# depend on your compiler). Please consult the documentation of the
+# deprecated API in order to know how to port your code away from it.
+DEFINES += QT_DEPRECATED_WARNINGS
+
+# You can also make your code fail to compile if you use deprecated APIs.
+# In order to do so, uncomment the following line.
+# You can also select to disable deprecated APIs only up to a certain version of Qt.
+#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
+
+
+SOURCES += \
+        main.cpp \
+        mainwindow.cpp
+
+HEADERS += \
+        mainwindow.h
+
+FORMS += \
+        mainwindow.ui
+
+!include(../../../include/common.pri ) {
+    error( "Couldn't find the common.pri file!" )
+}
+
+
+LIBS += -lusb_cam_python

+ 11 - 0
src/tool/Inspection_Shenlan_Orin/main.cpp

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

+ 23 - 0
src/tool/Inspection_Shenlan_Orin/mainwindow.cpp

@@ -0,0 +1,23 @@
+#include "mainwindow.h"
+#include "ui_mainwindow.h"
+
+MainWindow::MainWindow(QWidget *parent) :
+    QMainWindow(parent),
+    ui(new Ui::MainWindow)
+{
+    ui->setupUi(this);
+
+    ui->pushButton_OutReport->setEnabled(false);
+
+
+}
+
+MainWindow::~MainWindow()
+{
+    delete ui;
+}
+
+void MainWindow::on_pushButton_Inspection_clicked()
+{
+ //   StartCam("video0",1920,1080,30);
+}

+ 32 - 0
src/tool/Inspection_Shenlan_Orin/mainwindow.h

@@ -0,0 +1,32 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+extern "C"
+{
+int StartCam(const char * strvideoname,int image_width,int image_height,int image_framerate);
+int GetJPEGDataWithWait(char * strvideoname, char * str,int * x,int nwaitms);
+int StopCam(char * strvideoname);
+}
+
+namespace Ui {
+class MainWindow;
+}
+
+class MainWindow : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+    explicit MainWindow(QWidget *parent = 0);
+    ~MainWindow();
+
+private slots:
+    void on_pushButton_Inspection_clicked();
+
+private:
+    Ui::MainWindow *ui;
+};
+
+#endif // MAINWINDOW_H

+ 172 - 0
src/tool/Inspection_Shenlan_Orin/mainwindow.ui

@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>519</width>
+    <height>501</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralWidget">
+   <widget class="QPushButton" name="pushButton_Inspection">
+    <property name="geometry">
+     <rect>
+      <x>70</x>
+      <y>25</y>
+      <width>141</width>
+      <height>51</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Inspection</string>
+    </property>
+   </widget>
+   <widget class="QPushButton" name="pushButton_OutReport">
+    <property name="geometry">
+     <rect>
+      <x>281</x>
+      <y>26</y>
+      <width>141</width>
+      <height>51</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Out Report</string>
+    </property>
+   </widget>
+   <widget class="QLabel" name="label">
+    <property name="geometry">
+     <rect>
+      <x>70</x>
+      <y>110</y>
+      <width>101</width>
+      <height>41</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Video0</string>
+    </property>
+   </widget>
+   <widget class="QLineEdit" name="lineEdit_video0">
+    <property name="geometry">
+     <rect>
+      <x>200</x>
+      <y>110</y>
+      <width>221</width>
+      <height>41</height>
+     </rect>
+    </property>
+   </widget>
+   <widget class="QLineEdit" name="lineEdit_video1">
+    <property name="geometry">
+     <rect>
+      <x>200</x>
+      <y>170</y>
+      <width>221</width>
+      <height>41</height>
+     </rect>
+    </property>
+   </widget>
+   <widget class="QLabel" name="label_2">
+    <property name="geometry">
+     <rect>
+      <x>70</x>
+      <y>170</y>
+      <width>101</width>
+      <height>41</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Video1</string>
+    </property>
+   </widget>
+   <widget class="QLineEdit" name="lineEdit_video3">
+    <property name="geometry">
+     <rect>
+      <x>200</x>
+      <y>290</y>
+      <width>221</width>
+      <height>41</height>
+     </rect>
+    </property>
+   </widget>
+   <widget class="QLineEdit" name="lineEdit_video2">
+    <property name="geometry">
+     <rect>
+      <x>200</x>
+      <y>230</y>
+      <width>221</width>
+      <height>41</height>
+     </rect>
+    </property>
+   </widget>
+   <widget class="QLabel" name="label_3">
+    <property name="geometry">
+     <rect>
+      <x>70</x>
+      <y>290</y>
+      <width>101</width>
+      <height>41</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Video3</string>
+    </property>
+   </widget>
+   <widget class="QLabel" name="label_4">
+    <property name="geometry">
+     <rect>
+      <x>70</x>
+      <y>230</y>
+      <width>101</width>
+      <height>41</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Video2</string>
+    </property>
+   </widget>
+   <widget class="QProgressBar" name="progressBar">
+    <property name="geometry">
+     <rect>
+      <x>70</x>
+      <y>358</y>
+      <width>351</width>
+      <height>51</height>
+     </rect>
+    </property>
+    <property name="value">
+     <number>24</number>
+    </property>
+   </widget>
+  </widget>
+  <widget class="QMenuBar" name="menuBar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>519</width>
+     <height>28</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QToolBar" name="mainToolBar">
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+  </widget>
+  <widget class="QStatusBar" name="statusBar"/>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections/>
+</ui>