diff --git a/App/LapWeld/LapWeldApp/LapWeldApp.pro b/App/LapWeld/LapWeldApp/LapWeldApp.pro index 9ce1318..71c226c 100644 --- a/App/LapWeld/LapWeldApp/LapWeldApp.pro +++ b/App/LapWeld/LapWeldApp/LapWeldApp.pro @@ -77,14 +77,14 @@ RESOURCES += \ win32:CONFIG(debug, debug|release) { LIBS += -L../../../VrUtils/debug -lVrUtils - LIBS += -L../../../CloudUtils/debug -lCloudUtils + LIBS += -L../../../AppUtils/CloudUtils/debug -lCloudUtils LIBS += -L../LapWeldConfig/debug -lLapWeldConfig LIBS += -L../../../VrEyeDevice/debug -lVrEyeDevice LIBS += -L../../../VrNets/debug -lVrTcpServer LIBS += -L../../../Module/ShareMem/debug -lShareMem }else:win32:CONFIG(release, debug|release){ LIBS += -L../../../VrUtils/release -lVrUtils - LIBS += -L../../../CloudUtils/release -lCloudUtils + LIBS += -L../../../AppUtils/CloudUtils/release -lCloudUtils LIBS += -L../LapWeldConfig/release -lLapWeldConfig LIBS += -L../../../VrEyeDevice/release -lVrEyeDevice LIBS += -L../../../VrNets/release -lVrTcpServer @@ -96,7 +96,7 @@ win32:CONFIG(debug, debug|release) { LIBS += -L../../../VrEyeDevice -lVrEyeDevice LIBS += -L../../../VrNets -lVrTcpServer LIBS += -L../../../Module/ShareMem -lShareMem - LIBS += -L../../../CloudUtils -lCloudUtils + LIBS += -L../../../AppUtils/CloudUtils -lCloudUtils LIBS += -L../../../VrUtils -lVrUtils # 添加系统库依赖 diff --git a/App/Workpiece/WorkpieceApp/Presenter/Src/ConfigManager.cpp b/App/Workpiece/WorkpieceApp/Presenter/Src/ConfigManager.cpp index 910cf18..52db6b2 100644 --- a/App/Workpiece/WorkpieceApp/Presenter/Src/ConfigManager.cpp +++ b/App/Workpiece/WorkpieceApp/Presenter/Src/ConfigManager.cpp @@ -764,8 +764,8 @@ bool ConfigManager::_InitializeDefaultConfig() // 添加默认相机配置 DeviceInfo defaultCamera; - defaultCamera.name = "Camera1"; - defaultCamera.ip = "192.168.1.100"; + defaultCamera.name = "相机"; + defaultCamera.ip = ""; m_systemConfig.configResult.cameraList.push_back(defaultCamera); // 初始化默认的相机UI参数 diff --git a/App/Workpiece/WorkpieceApp/Presenter/Src/DetectPresenter.cpp b/App/Workpiece/WorkpieceApp/Presenter/Src/DetectPresenter.cpp index 0713547..3937233 100644 --- a/App/Workpiece/WorkpieceApp/Presenter/Src/DetectPresenter.cpp +++ b/App/Workpiece/WorkpieceApp/Presenter/Src/DetectPresenter.cpp @@ -4,6 +4,7 @@ DetectPresenter::DetectPresenter(/* args */) { + LOG_DEBUG("DetectPresenter Init algo ver: %s\n", wd_BQWorkpieceCornerVersion()); } DetectPresenter::~DetectPresenter() diff --git a/App/Workpiece/WorkpieceApp/Presenter/Src/WorkpiecePresenter.cpp b/App/Workpiece/WorkpieceApp/Presenter/Src/WorkpiecePresenter.cpp index 7c5e32b..e7459c0 100644 --- a/App/Workpiece/WorkpieceApp/Presenter/Src/WorkpiecePresenter.cpp +++ b/App/Workpiece/WorkpieceApp/Presenter/Src/WorkpiecePresenter.cpp @@ -184,6 +184,8 @@ int WorkpiecePresenter::InitCamera(std::vector& cameraList) } m_pStatus->OnCameraCountChanged(cameraCount); + LOG_DEBUG("config camera num : %d\n", cameraCount); + if(cameraCount > 0){ if (cameraCount >= 1) { // 尝试打开相机 @@ -220,7 +222,7 @@ return SUCCESS; // 初始化算法参数 int WorkpiecePresenter::InitAlgorithmParams() { - LOG_DEBUG("Start initializing algorithm parameters\n"); + LOG_DEBUG("initializing algorithm parameters\n"); QString exePath = QCoreApplication::applicationFilePath(); // 清空现有的手眼标定矩阵列表 @@ -576,7 +578,9 @@ int WorkpiecePresenter::_OpenDevice(int cameraIndex, const char* cameraName, con ERR_CODE_RETURN(nRet); // 尝试打开相机1 - nRet = pDevice->OpenDevice(cameraIp, ProjectType::DirectBag == projectType); + nRet = pDevice->OpenDevice(cameraIp, false); + LOG_DEBUG("open camera %d %s result: %d\n", cameraIndex, cameraName, nRet); + // 通过回调更新相机1状态 bool cameraConnected = (SUCCESS == nRet); if(!cameraConnected){ diff --git a/App/Workpiece/WorkpieceApp/Version.h b/App/Workpiece/WorkpieceApp/Version.h index 177314b..34fe801 100644 --- a/App/Workpiece/WorkpieceApp/Version.h +++ b/App/Workpiece/WorkpieceApp/Version.h @@ -2,9 +2,9 @@ #define VERSION_H -#define WORKPIECE_VERSION_STRING "1.0.0" -#define WORKPIECE_BUILD_STRING "2" -#define WORKPIECE_FULL_VERSION_STRING "V1.0.0.2" +#define WORKPIECE_VERSION_STRING "1.0.1" +#define WORKPIECE_BUILD_STRING "1" +#define WORKPIECE_FULL_VERSION_STRING "V1.0.1.1" // 获取版本信息的便捷函数 inline const char* GetWorkpieceVersion() { diff --git a/App/Workpiece/WorkpieceApp/Version.md b/App/Workpiece/WorkpieceApp/Version.md new file mode 100644 index 0000000..177ab45 --- /dev/null +++ b/App/Workpiece/WorkpieceApp/Version.md @@ -0,0 +1,14 @@ +#1.0.1 2025-11-08 +## build_1 +1. 更新算法 +2. 修复在没有配置文件中无法连接相机问题 + +#1.0.0 2025-11-02 +## build_1 +1. 修复相机打开点亮激光器 +2. 修复相机调平 +3. 相机参数配置失败提示指定的错误 + +## build_0 +1. 初始版本 + diff --git a/App/Workpiece/WorkpieceApp/WorkpieceApp.pro b/App/Workpiece/WorkpieceApp/WorkpieceApp.pro index 75c97d1..762a9d7 100644 --- a/App/Workpiece/WorkpieceApp/WorkpieceApp.pro +++ b/App/Workpiece/WorkpieceApp/WorkpieceApp.pro @@ -101,9 +101,9 @@ win32:CONFIG(debug, debug|release) { }else:win32:CONFIG(release, debug|release){ LIBS += -L../../../VrUtils/release -lVrUtils - LIBS += -L../../../AppUtils/CloudUtils/release -lCloudUtils - LIBS += -L../../../AppUtils/UIUtils/release -lUIUtils - LIBS += -L../../../AppUtils/AppCommon/release -lAppCommon + LIBS += -L../../../AppUtils/CloudUtils/release -lCloudUtils + LIBS += -L../../../AppUtils/UIUtils/release -lUIUtils + LIBS += -L../../../AppUtils/AppCommon/release -lAppCommon LIBS += -L../WorkpieceConfig/release -lWorkpieceConfig LIBS += -L../../../VrEyeDevice/release -lVrEyeDevice LIBS += -L../../../Module/ModbusTCPServer/release -lModbusTCPServer @@ -119,9 +119,9 @@ win32:CONFIG(debug, debug|release) { LIBS += -L../../../VrNets -lVrModbus LIBS += -L../../../Module/ShareMem -lShareMem LIBS += -L../../../VrNets -lVrTcpServer - LIBS += -L../../../AppUtils/CloudUtils -lCloudUtils - LIBS += -L../../../AppUtils/UIUtils -lUIUtils - LIBS += -L../../../AppUtils/AppCommon -lAppCommon + LIBS += -L../../../AppUtils/UIUtils -lUIUtils + LIBS += -L../../../AppUtils/AppCommon -lAppCommon + LIBS += -L../../../AppUtils/CloudUtils -lCloudUtils LIBS += -L../../../VrUtils -lVrUtils # 添加系统库依赖 diff --git a/SDK/workpieceCornerExtraction/Inc/BQ_workpieceCornerExtraction_Export.h b/SDK/workpieceCornerExtraction/Inc/BQ_workpieceCornerExtraction_Export.h index a480764..91ec45c 100644 --- a/SDK/workpieceCornerExtraction/Inc/BQ_workpieceCornerExtraction_Export.h +++ b/SDK/workpieceCornerExtraction/Inc/BQ_workpieceCornerExtraction_Export.h @@ -12,6 +12,7 @@ # define SG_WORKPIECESHARED_EXPORT Q_DECL_EXPORT #else # define SG_WORKPIECESHARED_EXPORT Q_DECL_IMPORT + #endif #include "SG_baseDataType.h" @@ -47,6 +48,9 @@ typedef struct SVzNL3DPoint edge_link2_ends[2]; }SSX_debugInfo; +//汾 +SG_WORKPIECESHARED_EXPORT const char* wd_BQWorkpieceCornerVersion(void); + //һƽƽ //пһƽͲοƽƽ棬ߵƽеƽ //תΪƽƽ淨ΪֱIJ diff --git a/SDK/workpieceCornerExtraction/Inc/SG_baseDataType.h b/SDK/workpieceCornerExtraction/Inc/SG_baseDataType.h index fcd55f2..7bbf2e9 100644 --- a/SDK/workpieceCornerExtraction/Inc/SG_baseDataType.h +++ b/SDK/workpieceCornerExtraction/Inc/SG_baseDataType.h @@ -4,7 +4,7 @@ #include #include -#define PI 3.141592654 +#define PI 3.14159265358979323846 // ŷǽṹ壨λȣ typedef struct{ @@ -199,6 +199,22 @@ typedef struct double bagH; // }SSG_bagParam; +typedef struct +{ + double length; // + double width; // + double height; // +}SWD_sizeParam; + +typedef struct +{ + SVzNLRangeD xRange; //< XΧ + SVzNLRangeD yRange; //< YΧ + SVzNLRangeD zRange; //< ZΧ + double scale_x; + double scale_y; +} SWD_pointCloudPara; + typedef struct { ESG_poseSortingMode sortMode; @@ -267,6 +283,15 @@ typedef struct int value; }SSG_RUN; +typedef struct +{ + int start; + int len; + int value; + bool start_zRising; //z־ + bool end_zRising;//յz־ +}SSG_RUN_EX; + typedef struct { double mean; @@ -414,3 +439,11 @@ typedef struct double forward_z; double backward_z; }SSG_pntDirAngle; + +// ͼݽṹ +typedef struct { + int width; + int height; + std::vector> gray; // Ҷͼ + std::vector> markers; // ͼ-1ʾˮ룬0ʾδǣ>0ʾ +}SWD_waterShedImage; diff --git a/SDK/workpieceCornerExtraction/Inc/SG_errCode.h b/SDK/workpieceCornerExtraction/Inc/SG_errCode.h index 6fc72fb..34a4ade 100644 --- a/SDK/workpieceCornerExtraction/Inc/SG_errCode.h +++ b/SDK/workpieceCornerExtraction/Inc/SG_errCode.h @@ -11,4 +11,7 @@ #define SX_ERR_INVLD_VTREE_NUM -2001 #define SX_ERR_INVLD_HTREE_NUM -2002 #define SX_ERR_INVLD_EDGE_LINK_NUM -2003 -#define SX_ERR_INVLD_CLOSES_PT -2004 \ No newline at end of file +#define SX_ERR_INVLD_CLOSES_PT -2004 +#define SX_ERR_ZERO_CONTOUR_PT -2005 +#define SX_ERR_INVLID_RPEAK_NUM -2006 +#define SX_ERR_INVLID_RPEAK_PAIR -2007 \ No newline at end of file diff --git a/SDK/workpieceCornerExtraction/Windows/x64/Debug/BQ_workpieceCornerExtraction.dll b/SDK/workpieceCornerExtraction/Windows/x64/Debug/BQ_workpieceCornerExtraction.dll index a0d9e07..85dff0d 100644 Binary files a/SDK/workpieceCornerExtraction/Windows/x64/Debug/BQ_workpieceCornerExtraction.dll and b/SDK/workpieceCornerExtraction/Windows/x64/Debug/BQ_workpieceCornerExtraction.dll differ diff --git a/SDK/workpieceCornerExtraction/Windows/x64/Debug/BQ_workpieceCornerExtraction.pdb b/SDK/workpieceCornerExtraction/Windows/x64/Debug/BQ_workpieceCornerExtraction.pdb index 51d25fd..be63e93 100644 Binary files a/SDK/workpieceCornerExtraction/Windows/x64/Debug/BQ_workpieceCornerExtraction.pdb and b/SDK/workpieceCornerExtraction/Windows/x64/Debug/BQ_workpieceCornerExtraction.pdb differ diff --git a/SDK/workpieceCornerExtraction/Windows/x64/Debug/baseAlgorithm.dll b/SDK/workpieceCornerExtraction/Windows/x64/Debug/baseAlgorithm.dll index f6d6c1b..75248aa 100644 Binary files a/SDK/workpieceCornerExtraction/Windows/x64/Debug/baseAlgorithm.dll and b/SDK/workpieceCornerExtraction/Windows/x64/Debug/baseAlgorithm.dll differ diff --git a/SDK/workpieceCornerExtraction/Windows/x64/Debug/baseAlgorithm.pdb b/SDK/workpieceCornerExtraction/Windows/x64/Debug/baseAlgorithm.pdb index 8ed2cf9..6c1a71e 100644 Binary files a/SDK/workpieceCornerExtraction/Windows/x64/Debug/baseAlgorithm.pdb and b/SDK/workpieceCornerExtraction/Windows/x64/Debug/baseAlgorithm.pdb differ diff --git a/SDK/workpieceCornerExtraction/Windows/x64/Release/BQ_workpieceCornerExtraction.dll b/SDK/workpieceCornerExtraction/Windows/x64/Release/BQ_workpieceCornerExtraction.dll index 365b0d5..f192786 100644 Binary files a/SDK/workpieceCornerExtraction/Windows/x64/Release/BQ_workpieceCornerExtraction.dll and b/SDK/workpieceCornerExtraction/Windows/x64/Release/BQ_workpieceCornerExtraction.dll differ diff --git a/SDK/workpieceCornerExtraction/Windows/x64/Release/BQ_workpieceCornerExtraction.pdb b/SDK/workpieceCornerExtraction/Windows/x64/Release/BQ_workpieceCornerExtraction.pdb index 854ffbe..ce3aea5 100644 Binary files a/SDK/workpieceCornerExtraction/Windows/x64/Release/BQ_workpieceCornerExtraction.pdb and b/SDK/workpieceCornerExtraction/Windows/x64/Release/BQ_workpieceCornerExtraction.pdb differ diff --git a/SDK/workpieceCornerExtraction/Windows/x64/Release/baseAlgorithm.dll b/SDK/workpieceCornerExtraction/Windows/x64/Release/baseAlgorithm.dll index d321ce8..00cfd4a 100644 Binary files a/SDK/workpieceCornerExtraction/Windows/x64/Release/baseAlgorithm.dll and b/SDK/workpieceCornerExtraction/Windows/x64/Release/baseAlgorithm.dll differ diff --git a/SDK/workpieceCornerExtraction/Windows/x64/Release/baseAlgorithm.pdb b/SDK/workpieceCornerExtraction/Windows/x64/Release/baseAlgorithm.pdb index 07bd576..75330e0 100644 Binary files a/SDK/workpieceCornerExtraction/Windows/x64/Release/baseAlgorithm.pdb and b/SDK/workpieceCornerExtraction/Windows/x64/Release/baseAlgorithm.pdb differ diff --git a/VrCommon/Inc/VrError.h b/VrCommon/Inc/VrError.h index 76d41f8..f5b03aa 100644 --- a/VrCommon/Inc/VrError.h +++ b/VrCommon/Inc/VrError.h @@ -23,6 +23,7 @@ enum ErrorCode DATA_ERR_MD5, DATA_ERR_KEY, DATA_ERR_RANGE, + DATA_ERR_MEM, //功能执行失败 APP_ERR_EXEC = 1400, diff --git a/VrEyeDevice/Src/VrEyeDevice.cpp b/VrEyeDevice/Src/VrEyeDevice.cpp index 8e8cd79..c115909 100644 --- a/VrEyeDevice/Src/VrEyeDevice.cpp +++ b/VrEyeDevice/Src/VrEyeDevice.cpp @@ -55,9 +55,11 @@ int CVrEyeDevice::OpenDevice(const char* sIP, bool bRGBD, bool bSwing, bool bFil return ERR_CODE(DEV_NOT_FIND); } + LOG_DEBUG("VzNL_ResearchDevice count : %d\n", nCount); + pCBInfo = new SVzNLEyeCBInfo[nCount]; if (!pCBInfo) { - return ERR_CODE(DEV_OPEN_ERR); + return ERR_CODE(DATA_ERR_MEM); } nErrCode = VzNL_GetEyeCBDeviceInfo(pCBInfo, &nCount); @@ -70,7 +72,7 @@ int CVrEyeDevice::OpenDevice(const char* sIP, bool bRGBD, bool bSwing, bool bFil sVzNlOpenDeviceParam.eEyeResolution = keVzNLEyeResolution_Unknown; sVzNlOpenDeviceParam.eSDKType = keSDKType_DetectLaser; sVzNlOpenDeviceParam.bStopStream = VzTrue; - if(nullptr == sIP) + if(nullptr == sIP || 0 == strlen(sIP)) { m_pHandle = VzNL_OpenDevice(&pCBInfo[0], &sVzNlOpenDeviceParam, &nErrCode); LOG_DEBUG("OpenDevice DEV %s result: %d\n", pCBInfo[0].byServerIP, nErrCode);