RodWeldSeam 修复起止点未转换的问题
This commit is contained in:
parent
3d012d8a1a
commit
9926c9907e
@ -4,7 +4,8 @@
|
||||
<COM Name="COM10" Remarks="" Baund="9600" Parity="0" StopBit="0" DataBit="0" FlowCtrl="0" TransMode="0" CharType="0" BreakTime="10" />
|
||||
<COM Name="COM11" Remarks="" Baund="9600" Parity="0" StopBit="0" DataBit="0" FlowCtrl="0" TransMode="0" CharType="0" BreakTime="10" />
|
||||
<COM Name="COM9" Remarks="" Baund="9600" Parity="0" StopBit="0" DataBit="0" FlowCtrl="0" TransMode="0" CharType="0" BreakTime="10" />
|
||||
<NET Name="VISION_NET" Remarks="" DesIP="127.0.0.1" LocalPortID="0" DesPortID="502" LinkMode="0" LinkResetTime="3000" LinkHoldTime="6000" TransMode="2" CharType="0" MaxAsynNum="15" />
|
||||
<COM Name="COM1" Remarks="" Baund="9600" Parity="0" StopBit="0" DataBit="0" FlowCtrl="0" TransMode="0" CharType="0" BreakTime="10" />
|
||||
<NET Name="VISION_NET" Remarks="" DesIP="127.0.0.1" LocalPortID="0" DesPortID="5020" LinkMode="0" LinkResetTime="3000" LinkHoldTime="6000" TransMode="2" CharType="0" MaxAsynNum="15" />
|
||||
</PORT_LIST>
|
||||
<DEVICE_LIST>
|
||||
<DEVICE Name="[M]VISION_NET-001" PortName="VISION_NET" DeviceType="1" Addr="1" ForwardZero="0" AddrUIMode="0" CRCByteOder="1" AddrOffset="0" PackWay="1" BitGap="0" RegGap="5" OneReg10="0" OneCoil0F="0" BCast1="0" BCast2="0" IsBCDevice="0" BathReadMode="0" BathWriteMode="0">
|
||||
|
||||
@ -177,6 +177,35 @@ int DetectPresenter::DetectWeldSeam(
|
||||
LOG_INFO("[Algo Thread] WeldSeam %zu Input X seed: [%.6f, %.6f, %.6f]\n", i, seam.axialDir.x, seam.axialDir.y, seam.axialDir.z);
|
||||
LOG_INFO("[Algo Thread] WeldSeam %zu Input Z seed: [%.6f, %.6f, %.6f]\n", i, seam.normalDir.x, seam.normalDir.y, seam.normalDir.z);
|
||||
|
||||
HECPoint3D robotCenter;
|
||||
HECPoint3D robotStartPt;
|
||||
HECPoint3D robotEndPt;
|
||||
HECPoint3D robotAxialDir;
|
||||
HECPoint3D robotNormalDir;
|
||||
handEyeCalib->TransformPoint(
|
||||
calibResult.R,
|
||||
calibResult.T,
|
||||
HECPoint3D(seam.center.x, seam.center.y, seam.center.z),
|
||||
robotCenter);
|
||||
handEyeCalib->TransformPoint(
|
||||
calibResult.R,
|
||||
calibResult.T,
|
||||
HECPoint3D(seam.startPt.x, seam.startPt.y, seam.startPt.z),
|
||||
robotStartPt);
|
||||
handEyeCalib->TransformPoint(
|
||||
calibResult.R,
|
||||
calibResult.T,
|
||||
HECPoint3D(seam.endPt.x, seam.endPt.y, seam.endPt.z),
|
||||
robotEndPt);
|
||||
handEyeCalib->RotatePoint(
|
||||
calibResult.R,
|
||||
HECPoint3D(seam.axialDir.x, seam.axialDir.y, seam.axialDir.z),
|
||||
robotAxialDir);
|
||||
handEyeCalib->RotatePoint(
|
||||
calibResult.R,
|
||||
HECPoint3D(seam.normalDir.x, seam.normalDir.y, seam.normalDir.z),
|
||||
robotNormalDir);
|
||||
|
||||
HECPoseResult poseResult;
|
||||
bool validPose = handEyeCalib->TransformPose(
|
||||
calibResult,
|
||||
@ -199,30 +228,30 @@ int DetectPresenter::DetectWeldSeam(
|
||||
pos.roll = rollDeg;
|
||||
pos.pitch = pitchDeg;
|
||||
pos.yaw = yawDeg;
|
||||
pos.x = poseResult.position.x;
|
||||
pos.y = poseResult.position.y;
|
||||
pos.z = poseResult.position.z;
|
||||
pos.x = robotCenter.x;
|
||||
pos.y = robotCenter.y;
|
||||
pos.z = robotCenter.z;
|
||||
|
||||
detectionResult.positions.push_back(pos);
|
||||
|
||||
// 保存焊缝信息
|
||||
WeldSeamInfo info;
|
||||
info.weldType = static_cast<int>(seam.weldType);
|
||||
info.centerX = poseResult.position.x;
|
||||
info.centerY = poseResult.position.y;
|
||||
info.centerZ = poseResult.position.z;
|
||||
info.axialDirX = seam.axialDir.x;
|
||||
info.axialDirY = seam.axialDir.y;
|
||||
info.axialDirZ = seam.axialDir.z;
|
||||
info.normalDirX = seam.normalDir.x;
|
||||
info.normalDirY = seam.normalDir.y;
|
||||
info.normalDirZ = seam.normalDir.z;
|
||||
info.startPtX = seam.startPt.x;
|
||||
info.startPtY = seam.startPt.y;
|
||||
info.startPtZ = seam.startPt.z;
|
||||
info.endPtX = seam.endPt.x;
|
||||
info.endPtY = seam.endPt.y;
|
||||
info.endPtZ = seam.endPt.z;
|
||||
info.centerX = robotCenter.x;
|
||||
info.centerY = robotCenter.y;
|
||||
info.centerZ = robotCenter.z;
|
||||
info.axialDirX = robotAxialDir.x;
|
||||
info.axialDirY = robotAxialDir.y;
|
||||
info.axialDirZ = robotAxialDir.z;
|
||||
info.normalDirX = robotNormalDir.x;
|
||||
info.normalDirY = robotNormalDir.y;
|
||||
info.normalDirZ = robotNormalDir.z;
|
||||
info.startPtX = robotStartPt.x;
|
||||
info.startPtY = robotStartPt.y;
|
||||
info.startPtZ = robotStartPt.z;
|
||||
info.endPtX = robotEndPt.x;
|
||||
info.endPtY = robotEndPt.y;
|
||||
info.endPtZ = robotEndPt.z;
|
||||
|
||||
// 复制焊缝中心线点和边缘点
|
||||
for (const auto& cp : seam.centerPts) {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
#define RODWELDSEAM_APP_NAME "钢筋焊缝定位"
|
||||
|
||||
#define RODWELDSEAM_VERSION_STRING "1.0.0"
|
||||
#define RODWELDSEAM_BUILD_STRING "1"
|
||||
#define RODWELDSEAM_BUILD_STRING "2"
|
||||
#define RODWELDSEAM_FULL_VERSION_STRING "V" RODWELDSEAM_VERSION_STRING "_" RODWELDSEAM_BUILD_STRING
|
||||
|
||||
// 获取版本信息的便捷函数
|
||||
|
||||
@ -1,4 +1,8 @@
|
||||
# 1.0.0 2026-05-13
|
||||
## build_1
|
||||
# 1.0.0
|
||||
|
||||
## build_2
|
||||
1. 修复手眼转换没有转起止点的问题
|
||||
|
||||
## build_1 2026-05-13
|
||||
1. 初始版本 - 从RodAndBarPosition复制并改编为钢筋焊缝定位
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
| 14 | 工件孔定位 | WorkpieceHole | 1.2.2.2 |
|
||||
| 15 | 轮胎孔定位 | TireHolePose | 1.0.2.1 |
|
||||
| 16 | 坑孔定位 | HolePitPosition | 无 |
|
||||
| 17 | 钢筋焊缝定位 | RodWeldSeam | 1.0.0.1 |
|
||||
| 17 | 钢筋焊缝定位 | RodWeldSeam | 1.0.0.2 |
|
||||
| 18 | 无人机螺杆检测服务端 | DroneScrewServer | 1.0.1.1 |
|
||||
| 19 | 无人机螺杆检测控制端 | DroneScrewCtrlApp | 1.0.1.1 |
|
||||
| 20 | 砂轮盘孔定位 | DiscHolePose | 1.0.0.1 |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user