|
@@ -773,17 +773,7 @@ namespace TeamAAS_VP.Services
|
|
|
if (calibrationInfo == null) return (false, null, null, null);
|
|
if (calibrationInfo == null) return (false, null, null, null);
|
|
|
if (robot == null || !robot.IsConnected) return (false, null, null, null);
|
|
if (robot == null || !robot.IsConnected) return (false, null, null, null);
|
|
|
|
|
|
|
|
- double IntervalX = calibrationInfo.Width / 2;
|
|
|
|
|
- double IntervalY = calibrationInfo.Height / 2;
|
|
|
|
|
- Vector<double> P1 = Vector<double>.Build.Dense(new double[] { -IntervalX, -IntervalY });
|
|
|
|
|
- Vector<double> P2 = Vector<double>.Build.Dense(new double[] { 0, -IntervalY });
|
|
|
|
|
- Vector<double> P3 = Vector<double>.Build.Dense(new double[] { IntervalX, -IntervalY });
|
|
|
|
|
- Vector<double> P4 = Vector<double>.Build.Dense(new double[] { IntervalX, 0 });
|
|
|
|
|
- Vector<double> P5 = Vector<double>.Build.Dense(new double[] { 0, 0 });
|
|
|
|
|
- Vector<double> P6 = Vector<double>.Build.Dense(new double[] { -IntervalX, 0 });
|
|
|
|
|
- Vector<double> P7 = Vector<double>.Build.Dense(new double[] { -IntervalX, IntervalY });
|
|
|
|
|
- Vector<double> P8 = Vector<double>.Build.Dense(new double[] { 0, IntervalY });
|
|
|
|
|
- Vector<double> P9 = Vector<double>.Build.Dense(new double[] { IntervalX, IntervalY });
|
|
|
|
|
|
|
+
|
|
|
//发送校准的参数
|
|
//发送校准的参数
|
|
|
await robot.CalibParameAsync(calibrationInfo.Pick, calibrationInfo.Speed, calibrationInfo.Accel, calibrationInfo.Power, calibrationInfo.WaitSuction, calibrationInfo.WaitBlow);
|
|
await robot.CalibParameAsync(calibrationInfo.Pick, calibrationInfo.Speed, calibrationInfo.Accel, calibrationInfo.Power, calibrationInfo.WaitSuction, calibrationInfo.WaitBlow);
|
|
|
|
|
|
|
@@ -818,7 +808,7 @@ namespace TeamAAS_VP.Services
|
|
|
|
|
|
|
|
calibrationInfo.RobotCameraRotationMatrix = robotCameraRotationMatrix.RotationMatrix.ToArray();
|
|
calibrationInfo.RobotCameraRotationMatrix = robotCameraRotationMatrix.RotationMatrix.ToArray();
|
|
|
}
|
|
}
|
|
|
- else if (calibrationInfo.CameraMount== Enums.CameraMount.MobileDown_XYPlatform && calibrationInfo.CalibTechP0Mode== Enums.CalibTechP0Mode.CameraAutoFindP0)
|
|
|
|
|
|
|
+ else if (calibrationInfo.CameraMount== Enums.CameraMount.MobileDown_XYPlatform)
|
|
|
{
|
|
{
|
|
|
//移动机器人至中心位置
|
|
//移动机器人至中心位置
|
|
|
await robot.CalibMotionAsync(calibrationInfo.CenterPoint, 0);
|
|
await robot.CalibMotionAsync(calibrationInfo.CenterPoint, 0);
|
|
@@ -840,11 +830,23 @@ namespace TeamAAS_VP.Services
|
|
|
}
|
|
}
|
|
|
calibrationInfo.CenterPoint.X = (float)autoMoveResult.X;
|
|
calibrationInfo.CenterPoint.X = (float)autoMoveResult.X;
|
|
|
calibrationInfo.CenterPoint.Y = (float)autoMoveResult.Y;
|
|
calibrationInfo.CenterPoint.Y = (float)autoMoveResult.Y;
|
|
|
- calibrationInfo.MarkPoint = calibrationInfo.CenterPoint.Clone();
|
|
|
|
|
|
|
+ //calibrationInfo.MarkPoint = calibrationInfo.CenterPoint.Clone();
|
|
|
|
|
|
|
|
calibrationInfo.RobotCameraRotationMatrix = robotCameraRotationMatrix.RotationMatrix.ToArray();
|
|
calibrationInfo.RobotCameraRotationMatrix = robotCameraRotationMatrix.RotationMatrix.ToArray();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ double IntervalX = calibrationInfo.Width / 2;
|
|
|
|
|
+ double IntervalY = calibrationInfo.Height / 2;
|
|
|
|
|
+ Vector<double> P1 = Vector<double>.Build.Dense(new double[] { -IntervalX, -IntervalY });
|
|
|
|
|
+ Vector<double> P2 = Vector<double>.Build.Dense(new double[] { 0, -IntervalY });
|
|
|
|
|
+ Vector<double> P3 = Vector<double>.Build.Dense(new double[] { IntervalX, -IntervalY });
|
|
|
|
|
+ Vector<double> P4 = Vector<double>.Build.Dense(new double[] { IntervalX, 0 });
|
|
|
|
|
+ Vector<double> P5 = Vector<double>.Build.Dense(new double[] { 0, 0 });
|
|
|
|
|
+ Vector<double> P6 = Vector<double>.Build.Dense(new double[] { -IntervalX, 0 });
|
|
|
|
|
+ Vector<double> P7 = Vector<double>.Build.Dense(new double[] { -IntervalX, IntervalY });
|
|
|
|
|
+ Vector<double> P8 = Vector<double>.Build.Dense(new double[] { 0, IntervalY });
|
|
|
|
|
+ Vector<double> P9 = Vector<double>.Build.Dense(new double[] { IntervalX, IntervalY });
|
|
|
|
|
+
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
/// 机器人与相机之间的旋转矩阵
|
|
/// 机器人与相机之间的旋转矩阵
|
|
|
/// </summary>
|
|
/// </summary>
|