#
1
2025-05-11 9a07fed7b55d37d5e15df449b54b8c4b7e9a8e68
#
2个文件已修改
28 ■■■■ 已修改文件
src/main/java/com/zy/core/model/protocol/RgvProtocol.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/RgvThread.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/model/protocol/RgvProtocol.java
@@ -125,6 +125,14 @@
        return basRgv;
    }
    public long getRgvPosDestinationOrPos(boolean sign){
        if (!sign){
            return RgvPosDestination>RgvPos? RgvPosDestination:RgvPos;
        } else {
            return RgvPosDestination<RgvPos? RgvPosDestination:RgvPos;
        }
    }
    public void setxSpeed(Short xSpeed) {
        this.xSpeed = Float.valueOf(xSpeed);
    }
src/main/java/com/zy/core/thread/RgvThread.java
@@ -345,7 +345,7 @@
                    }
                    long avoidAbs = Math.abs(avoid - rgvProtocolOther.getRgvPos());
                    if (avoidAbs<51){
                        return false;
                        return true;
                    }
                    rgvTaskProtocolOther.setAvoid(1);
                    rgvTaskProtocolOther.setAvoidingTheDestination(avoid);
@@ -365,7 +365,7 @@
                    }
                    long avoidAbs = Math.abs(avoid - rgvProtocolOther.getRgvPos());
                    if (avoidAbs<51){
                        return false;
                        return true;
                    }
                    rgvTaskProtocolOther.setAvoid(1);
                    rgvTaskProtocolOther.setAvoidingTheDestination(avoid);
@@ -395,6 +395,12 @@
                    }
                    return false;
                }
            } else {
                if ((rgvProtocolOther.getRgvPosDestinationOrPos(true) - rgvProtocolOther.getCarBodyJiaoMing())
                        - (targetPosition + rgvProtocol.getCarBodyKunPeng())
                        > avoidDistance) {//无需避让
                    return true;
                }
            }
        } else {
            if (rgvProtocolOther.getStatusType().equals(RgvStatusType.IDLE)) {
@@ -410,7 +416,7 @@
                    }
                    long avoidAbs = Math.abs(avoid - rgvProtocolOther.getRgvPos());
                    if (avoidAbs<51){
                        return false;
                        return true;
                    }
                    rgvTaskProtocolOther.setAvoid(1);
                    rgvTaskProtocolOther.setAvoidingTheDestination(avoid);
@@ -430,7 +436,7 @@
                    }
                    long avoidAbs = Math.abs(avoid - rgvProtocolOther.getRgvPos());
                    if (avoidAbs<51){
                        return false;
                        return true;
                    }
                    rgvTaskProtocolOther.setAvoid(1);
                    rgvTaskProtocolOther.setAvoidingTheDestination(avoid);
@@ -461,6 +467,12 @@
                    }
                    return false;
                }
            } else {
                if ((rgvProtocolOther.getRgvPosDestinationOrPos(false) - rgvProtocolOther.getCarBodyJiaoMing())
                        - (targetPosition + rgvProtocol.getCarBodyKunPeng())
                        > avoidDistance) {//无需避让
                    return true;
                }
            }
        }
        return false;