|
|
@@ -441,7 +441,11 @@ namespace TeamAAS_VP.Services
|
|
|
Matrix<double> RobotCameraRotationMatrix = null;
|
|
|
|
|
|
//移动机器人至待机位置
|
|
|
- await robot.CalibMotionAsync(calibrationInfo.HomePoint, null);
|
|
|
+ bool isFinished = await robot.CalibMotionAsync(calibrationInfo.CenterPoint, null);
|
|
|
+ if (!isFinished)
|
|
|
+ {
|
|
|
+ return (false, null, 0, 0, 0, 0);
|
|
|
+ }
|
|
|
if (cancellationToken.IsCancellationRequested)
|
|
|
{
|
|
|
return (false, null, 0, 0, 0, 0);
|
|
|
@@ -460,7 +464,7 @@ namespace TeamAAS_VP.Services
|
|
|
}
|
|
|
|
|
|
//移动独立模组至待机点
|
|
|
- bool isFinished = await ((XYZU_Robot)robot).WaitCameraMoveFinishedAsync(calibrationInfo.CameraMotionModuleIndex, calibrationInfo.IndependentDownCameraMotionModulePoint);
|
|
|
+ isFinished = await ((XYZU_Robot)robot).WaitCameraMoveFinishedAsync(calibrationInfo.CameraMotionModuleIndex, calibrationInfo.IndependentDownCameraMotionModulePoint);
|
|
|
if (!isFinished)
|
|
|
{
|
|
|
return (false, null, 0, 0, 0, 0);
|
|
|
@@ -495,14 +499,22 @@ namespace TeamAAS_VP.Services
|
|
|
RPoint RobotU = calibrationInfo.CenterPoint.Clone();
|
|
|
RobotU.U += (float)calibrationInfo.Angle;
|
|
|
//移动机器人中心点
|
|
|
- await robot.CalibMotionAsync(calibrationInfo.CenterPoint, null);
|
|
|
+ isFinished=await robot.CalibMotionAsync(calibrationInfo.CenterPoint, calibrationInfo.CenterPoint.Z);
|
|
|
+ if (!isFinished)
|
|
|
+ {
|
|
|
+ return (false, null, 0, 0, 0, 0);
|
|
|
+ }
|
|
|
if (cancellationToken.IsCancellationRequested)
|
|
|
{
|
|
|
return (false, null, 0, 0, 0, 0);
|
|
|
}
|
|
|
|
|
|
//机器人U轴旋转
|
|
|
- await robot.CalibMotionAsync(RobotU, null);
|
|
|
+ isFinished = await robot.CalibMotionAsync(RobotU, RobotU.Z);
|
|
|
+ if (!isFinished)
|
|
|
+ {
|
|
|
+ return (false, null, 0, 0, 0, 0);
|
|
|
+ }
|
|
|
if (cancellationToken.IsCancellationRequested)
|
|
|
{
|
|
|
return (false, null, 0, 0, 0, 0);
|
|
|
@@ -527,7 +539,11 @@ namespace TeamAAS_VP.Services
|
|
|
RobotU.X += (float)pos[0];
|
|
|
RobotU.Y += (float)pos[1];
|
|
|
//机器人移动
|
|
|
- await robot.CalibMotionAsync(RobotU, null);
|
|
|
+ isFinished = await robot.CalibMotionAsync(RobotU, RobotU.Z);
|
|
|
+ if (!isFinished)
|
|
|
+ {
|
|
|
+ return (false, null, 0, 0, 0, 0);
|
|
|
+ }
|
|
|
if (cancellationToken.IsCancellationRequested)
|
|
|
{
|
|
|
return (false, null, 0, 0, 0, 0);
|
|
|
@@ -545,7 +561,11 @@ namespace TeamAAS_VP.Services
|
|
|
if (Math.Abs(offsetx) < 1 && Math.Abs(offsetx) < 1)
|
|
|
{
|
|
|
//移动机器人至待机位置
|
|
|
- await robot.CalibMotionAsync(calibrationInfo.HomePoint, null);
|
|
|
+ isFinished=await robot.CalibMotionAsync(calibrationInfo.CenterPoint, calibrationInfo.CenterPoint.Z);
|
|
|
+ if (!isFinished)
|
|
|
+ {
|
|
|
+ return (false, null, 0, 0, 0, 0);
|
|
|
+ }
|
|
|
IsFinish = true;
|
|
|
break;
|
|
|
}
|