|
@@ -1870,6 +1870,21 @@ namespace TeamAAS_VP.Services
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //如果机器人坐标为空,则获取当前机器人坐标
|
|
|
|
|
+ if (robotCoord == null)
|
|
|
|
|
+ {
|
|
|
|
|
+ var robot = _robotService.GetAllRobots().FirstOrDefault();
|
|
|
|
|
+ if (robot != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ var pos = await robot.GetRobotPosAsync();
|
|
|
|
|
+ robotCoord = new double[] { pos.X, pos.Y, pos.Z };
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ robotCoord = new double[] { 0, 0, 0 };
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (!outputCollection.Contains("Found"))
|
|
if (!outputCollection.Contains("Found"))
|
|
|
{
|
|
{
|
|
|
SendTaskMessage(Lang.未找到视觉输出结果, MessageLevel.Error);
|
|
SendTaskMessage(Lang.未找到视觉输出结果, MessageLevel.Error);
|
|
@@ -1887,6 +1902,8 @@ namespace TeamAAS_VP.Services
|
|
|
|
|
|
|
|
SendTaskMessage(Lang.拍照OK, MessageLevel.Debug);
|
|
SendTaskMessage(Lang.拍照OK, MessageLevel.Debug);
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
if (procedure.CalibrationId == Guid.Empty)
|
|
if (procedure.CalibrationId == Guid.Empty)
|
|
|
{
|
|
{
|
|
|
//没有关联校准时,则执行检测任务
|
|
//没有关联校准时,则执行检测任务
|