徐孝锋 8 месяцев назад
Родитель
Сommit
bb53247479
1 измененных файлов с 13 добавлено и 5 удалено
  1. 13 5
      TeamAAS-VM/Services/RemoteCommandService.cs

+ 13 - 5
TeamAAS-VM/Services/RemoteCommandService.cs

@@ -1752,13 +1752,21 @@ namespace TeamAAS_VP.Services
                     double _pixel_x = double.Parse(posParts[0]);
                     double _pixel_y = double.Parse(posParts[1]);
                     double _pixel_u = double.Parse(posParts[2]);
-                    //转换点位-像素转换成机器人绝对坐标
-                    var calibResult = _calibrationService.ConvertPixelToPosition((_pixel_x, _pixel_y, _pixel_u), robotCoord, calib, RobotBrand.XYZ_Platform);
-                    if (!calibResult.IsSucceed)
+                    if (calib!=null)
                     {
-                        return (false, 0, 0, 0);
+                        //转换点位-像素转换成机器人绝对坐标
+                        var calibResult = _calibrationService.ConvertPixelToPosition((_pixel_x, _pixel_y, _pixel_u), robotCoord, calib, RobotBrand.XYZ_Platform);
+                        if (!calibResult.IsSucceed)
+                        {
+                            return (false, 0, 0, 0);
+                        }
+                        return (true, calibResult.X, calibResult.Y, calibResult.U);
+                    }
+                    else
+                    {
+                        return (true, _pixel_x, _pixel_y, _pixel_u);
                     }
-                    return (true, calibResult.X, calibResult.Y, calibResult.U);
+                        
                 }
                 SendTaskMessage(Lang.多次拍照失败, MessageLevel.Alarm);
                 return (false, 0, 0, 0);