1. 更新算法,在应用日志中有算法版本: 1.1.0; 2. 修复在没有配置文件中无法连接相机问题

This commit is contained in:
yiyi 2025-11-08 10:54:33 +08:00
parent 3e1681c052
commit b813fa7f37
20 changed files with 82 additions and 20 deletions

View File

@ -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
# 添加系统库依赖

View File

@ -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参数

View File

@ -4,6 +4,7 @@
DetectPresenter::DetectPresenter(/* args */)
{
LOG_DEBUG("DetectPresenter Init algo ver: %s\n", wd_BQWorkpieceCornerVersion());
}
DetectPresenter::~DetectPresenter()

View File

@ -184,6 +184,8 @@ int WorkpiecePresenter::InitCamera(std::vector<DeviceInfo>& 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){

View File

@ -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() {

View File

@ -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. 初始版本

View File

@ -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
# 添加系统库依赖

View File

@ -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);
//计算一个平面调平参数。
//数据输入中可以有一个地平面和参考调平平面,以最高的平面进行调平
//旋转矩阵为调平参数,即将平面法向调整为垂直向量的参数

View File

@ -4,7 +4,7 @@
#include <vector>
#include <SG_errCode.h>
#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<std::vector<int>> gray; // 灰度图
std::vector<std::vector<int>> markers; // 标记图(-1表示分水岭0表示未标记>0表示区域
}SWD_waterShedImage;

View File

@ -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
#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

View File

@ -23,6 +23,7 @@ enum ErrorCode
DATA_ERR_MD5,
DATA_ERR_KEY,
DATA_ERR_RANGE,
DATA_ERR_MEM,
//功能执行失败
APP_ERR_EXEC = 1400,

View File

@ -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);