diff --git a/App/GrabBag/GrabBagApp/Presenter/Src/GrabBagPresenter.cpp b/App/GrabBag/GrabBagApp/Presenter/Src/GrabBagPresenter.cpp
index 6e574ea..6779dfd 100644
--- a/App/GrabBag/GrabBagApp/Presenter/Src/GrabBagPresenter.cpp
+++ b/App/GrabBag/GrabBagApp/Presenter/Src/GrabBagPresenter.cpp
@@ -655,6 +655,9 @@ int GrabBagPresenter::InitAlgorithmParams()
m_algoParam.growParam.minLTypeTreeLen = xmlParams.growParam.minLTypeTreeLen;
m_algoParam.growParam.minVTypeTreeLen = xmlParams.growParam.minVTypeTreeLen;
+ // 设置支持旋转参数
+ m_algoParam.supportRotate = xmlParams.supportRotate;
+
// 设置颜色参数
m_hsvCmpParam.hueTh = xmlParams.hsvCmpParam.hueTh ;
m_hsvCmpParam.saturateTh = xmlParams.hsvCmpParam.saturateTh;
@@ -685,6 +688,8 @@ int GrabBagPresenter::InitAlgorithmParams()
m_algoParam.growParam.minVTypeTreeLen, m_algoParam.growParam.minLTypeTreeLen,
m_algoParam.growParam.yDeviation_max, m_algoParam.growParam.zDeviation_max,
m_algoParam.growParam.maxLineSkipNum, m_algoParam.growParam.maxSkipDistance);
+
+ LOG_INFO(" SupportRotate: %d\n", m_algoParam.supportRotate);
// 循环打印所有相机的调平参数
LOG_INFO("Loading plane calibration parameters for all cameras:\n");
diff --git a/App/GrabBag/GrabBagApp/Version.h b/App/GrabBag/GrabBagApp/Version.h
index e5d50ec..433333a 100644
--- a/App/GrabBag/GrabBagApp/Version.h
+++ b/App/GrabBag/GrabBagApp/Version.h
@@ -2,9 +2,9 @@
#define VERSION_H
-#define GRABBAG_VERSION_STRING "1.2.0"
-#define GRABBAG_BUILD_STRING "1"
-#define GRABBAG_FULL_VERSION_STRING "V1.2.0_1"
+#define GRABBAG_VERSION_STRING "1.2.1"
+#define GRABBAG_BUILD_STRING "0"
+#define GRABBAG_FULL_VERSION_STRING "V1.2.1_0"
// 获取版本信息的便捷函数
inline const char* GetGrabBagVersion() {
diff --git a/App/GrabBag/GrabBagApp/Version.md b/App/GrabBag/GrabBagApp/Version.md
index 5a4f236..5ea9da1 100644
--- a/App/GrabBag/GrabBagApp/Version.md
+++ b/App/GrabBag/GrabBagApp/Version.md
@@ -1,3 +1,7 @@
+# 1.2.1 2025-10-8
+## build_0
+1. 更新算法。增加支持旋转参数。
+
# 1.2.0 2025-9-15
## build_1
1. 增加相机持续连接功能
diff --git a/App/GrabBag/GrabBagConfig/Inc/IVrConfig.h b/App/GrabBag/GrabBagConfig/Inc/IVrConfig.h
index 893b0f6..88347f6 100644
--- a/App/GrabBag/GrabBagConfig/Inc/IVrConfig.h
+++ b/App/GrabBag/GrabBagConfig/Inc/IVrConfig.h
@@ -276,6 +276,7 @@ struct VrAlgorithmParams
VrHsvCmpParam hsvCmpParam; // HSV颜色比较参数
VrRgbColorPattern rgbColorPattern; // RGB颜色模式
VrColorTemplateParam colorTemplateParam; // 颜色模板参数
+ int supportRotate; // 是否支持旋转功能
};
/**
diff --git a/App/GrabBag/GrabBagConfig/Src/VrConfig.cpp b/App/GrabBag/GrabBagConfig/Src/VrConfig.cpp
index 63d2c0e..b748275 100644
--- a/App/GrabBag/GrabBagConfig/Src/VrConfig.cpp
+++ b/App/GrabBag/GrabBagConfig/Src/VrConfig.cpp
@@ -172,6 +172,19 @@ ConfigResult CVrConfig::LoadConfig(const std::string& filePath)
result.algorithmParams.growParam.minVTypeTreeLen = growParamElement->DoubleAttribute("minVTypeTreeLen");
}
+ // 解析支持旋转参数
+ XMLElement* supportRotateElement = algoParamsElement->FirstChildElement("SupportRotate");
+ if (supportRotateElement)
+ {
+ if (supportRotateElement->Attribute("enabled"))
+ result.algorithmParams.supportRotate = supportRotateElement->IntAttribute("enabled");
+ }
+ else
+ {
+ // 默认值为0,表示不支持旋转
+ result.algorithmParams.supportRotate = 0;
+ }
+
// 解析HSV颜色比较参数
XMLElement* hsvCmpParamElement = algoParamsElement->FirstChildElement("HsvCmpParam");
if (hsvCmpParamElement)
@@ -506,6 +519,11 @@ bool CVrConfig::SaveConfig(const std::string& filePath, ConfigResult& configResu
growParamElement->SetAttribute("minVTypeTreeLen", configResult.algorithmParams.growParam.minVTypeTreeLen);
algoParamsElement->InsertEndChild(growParamElement);
+ // 添加支持旋转参数
+ XMLElement* supportRotateElement = doc.NewElement("SupportRotate");
+ supportRotateElement->SetAttribute("enabled", configResult.algorithmParams.supportRotate);
+ algoParamsElement->InsertEndChild(supportRotateElement);
+
// 添加多相机平面校准参数
XMLElement* planeCalibParamsElement = doc.NewElement("PlaneCalibParams");
diff --git a/App/GrabBag/GrabBagConfig/config/config.xml b/App/GrabBag/GrabBagConfig/config/config.xml
index db2fbac..4fca7d2 100644
--- a/App/GrabBag/GrabBagConfig/config/config.xml
+++ b/App/GrabBag/GrabBagConfig/config/config.xml
@@ -32,6 +32,9 @@
+
+
+
diff --git a/SDK/bagPosition/Inc/SG_bagPositioning_Export.h b/SDK/bagPosition/Inc/SG_bagPositioning_Export.h
index aada92c..05a5ee7 100644
--- a/SDK/bagPosition/Inc/SG_bagPositioning_Export.h
+++ b/SDK/bagPosition/Inc/SG_bagPositioning_Export.h
@@ -34,6 +34,7 @@ typedef struct
SSG_treeGrowParam growParam;
//SSG_objSortParam sortParam;
//SSG_polarScanParam polarScanParam;
+ int supportRotate;
}SG_bagPositionParam;
typedef struct
diff --git a/SDK/bagPosition/Inc/SG_baseDataType.h b/SDK/bagPosition/Inc/SG_baseDataType.h
index f6d39d6..fcd55f2 100644
--- a/SDK/bagPosition/Inc/SG_baseDataType.h
+++ b/SDK/bagPosition/Inc/SG_baseDataType.h
@@ -219,6 +219,7 @@ typedef struct
double tree_value;
SSG_ROIRectD roi;
std::vector< SSG_basicFeature1D> treeNodes;
+ int angleChkScalePos; //ڼangleCheckٶ
}SSG_featureTree;
typedef struct
diff --git a/SDK/bagPosition/Inc/SG_errCode.h b/SDK/bagPosition/Inc/SG_errCode.h
index 0826bf1..e0fd99d 100644
--- a/SDK/bagPosition/Inc/SG_errCode.h
+++ b/SDK/bagPosition/Inc/SG_errCode.h
@@ -6,3 +6,7 @@
#define SG_ERR_NOT_GRID_FORMAT -1003
#define SG_ERR_LABEL_INFO_ERROR -1004
#define SG_ERR_INVLD_SORTING_MODE -1005
+
+//BQ_workpiece
+#define SX_ERR_INVLD_VTREE_NUM -2001
+#define SX_ERR_INVLD_HTREE_NUM -2002
\ No newline at end of file
diff --git a/SDK/bagPosition/Windows/x64/Debug/bagPositioning.dll b/SDK/bagPosition/Windows/x64/Debug/bagPositioning.dll
index ada69d6..dc2855f 100644
Binary files a/SDK/bagPosition/Windows/x64/Debug/bagPositioning.dll and b/SDK/bagPosition/Windows/x64/Debug/bagPositioning.dll differ
diff --git a/SDK/bagPosition/Windows/x64/Debug/bagPositioning.pdb b/SDK/bagPosition/Windows/x64/Debug/bagPositioning.pdb
index d930c4e..f2888e8 100644
Binary files a/SDK/bagPosition/Windows/x64/Debug/bagPositioning.pdb and b/SDK/bagPosition/Windows/x64/Debug/bagPositioning.pdb differ
diff --git a/SDK/bagPosition/Windows/x64/Debug/baseAlgorithm.dll b/SDK/bagPosition/Windows/x64/Debug/baseAlgorithm.dll
index 89d6e87..302e648 100644
Binary files a/SDK/bagPosition/Windows/x64/Debug/baseAlgorithm.dll and b/SDK/bagPosition/Windows/x64/Debug/baseAlgorithm.dll differ
diff --git a/SDK/bagPosition/Windows/x64/Debug/baseAlgorithm.pdb b/SDK/bagPosition/Windows/x64/Debug/baseAlgorithm.pdb
index de4ca94..d993e6a 100644
Binary files a/SDK/bagPosition/Windows/x64/Debug/baseAlgorithm.pdb and b/SDK/bagPosition/Windows/x64/Debug/baseAlgorithm.pdb differ
diff --git a/SDK/bagPosition/Windows/x64/Release/bagPositioning.dll b/SDK/bagPosition/Windows/x64/Release/bagPositioning.dll
index 8b0a867..634813c 100644
Binary files a/SDK/bagPosition/Windows/x64/Release/bagPositioning.dll and b/SDK/bagPosition/Windows/x64/Release/bagPositioning.dll differ
diff --git a/SDK/bagPosition/Windows/x64/Release/bagPositioning.pdb b/SDK/bagPosition/Windows/x64/Release/bagPositioning.pdb
index 53a919c..56164bc 100644
Binary files a/SDK/bagPosition/Windows/x64/Release/bagPositioning.pdb and b/SDK/bagPosition/Windows/x64/Release/bagPositioning.pdb differ
diff --git a/SDK/bagPosition/Windows/x64/Release/baseAlgorithm.dll b/SDK/bagPosition/Windows/x64/Release/baseAlgorithm.dll
index f8969ef..1413d21 100644
Binary files a/SDK/bagPosition/Windows/x64/Release/baseAlgorithm.dll and b/SDK/bagPosition/Windows/x64/Release/baseAlgorithm.dll differ
diff --git a/SDK/bagPosition/Windows/x64/Release/baseAlgorithm.pdb b/SDK/bagPosition/Windows/x64/Release/baseAlgorithm.pdb
index 8eeb9a6..d780842 100644
Binary files a/SDK/bagPosition/Windows/x64/Release/baseAlgorithm.pdb and b/SDK/bagPosition/Windows/x64/Release/baseAlgorithm.pdb differ