From 62aa9d143a12ba3c8094dc9542c11c83b2c0c6d1 Mon Sep 17 00:00:00 2001 From: 野心家 <1051256694@qq.com> Date: 星期日, 25 五月 2025 11:00:27 +0800 Subject: [PATCH] 初始化 --- src/main/java/com/zy/core/thread/RgvThread.java | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/zy/core/thread/RgvThread.java b/src/main/java/com/zy/core/thread/RgvThread.java index c040606..1315b2d 100644 --- a/src/main/java/com/zy/core/thread/RgvThread.java +++ b/src/main/java/com/zy/core/thread/RgvThread.java @@ -471,6 +471,12 @@ > avoidDistance - 50) {//鏃犻渶閬胯 return true; } else { + + RgvThread rgvThreadOther = (RgvThread) SlaveConnection.get(SlaveType.Rgv, slave.getOtherId()); + TaskProtocolCache taskProtocolCacheOther = rgvThreadOther.getTaskProtocolCache(); + if (taskProtocolCacheOther.isNowPosRun(rgvProtocolOther.getRgvPos())){ + return false; + } long avoid = targetPosition + rgvProtocol.getCarBodyKunPeng() + avoidDistance + rgvProtocolOther.getCarBodyJiaoMing(); if (!new TrackRangeUtils().avoidRange(avoid, avoidRange[0])) { log.error("RGV琛岃蛋瓒呭嚭鑼冨洿锛侊紒锛� ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); @@ -560,6 +566,11 @@ > avoidDistance - 50) {//鏃犻渶閬胯 return true; } else { + RgvThread rgvThreadOther = (RgvThread) SlaveConnection.get(SlaveType.Rgv, slave.getOtherId()); + TaskProtocolCache taskProtocolCacheOther = rgvThreadOther.getTaskProtocolCache(); + if (taskProtocolCacheOther.isNowPosRun(rgvProtocolOther.getRgvPos())){ + return false; + } long avoid = targetPosition - rgvProtocol.getCarBodyJiaoMing() - avoidDistance - rgvProtocolOther.getCarBodyKunPeng(); if (!new TrackRangeUtils().avoidRange(avoid, avoidRange[1])) { log.error("RGV琛岃蛋瓒呭嚭鑼冨洿锛侊紒锛� ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); -- Gitblit v1.9.1