野心家
2025-05-25 62aa9d143a12ba3c8094dc9542c11c83b2c0c6d1
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());