From b2a9573ed2de64b1c4d9f941d773e50fbc9a1cfd Mon Sep 17 00:00:00 2001 From: vincentlu <t1341870251@gmail.com> Date: 星期一, 13 一月 2025 11:25:57 +0800 Subject: [PATCH] # --- zy-acs-manager/src/main/java/com/zy/acs/manager/common/utils/MapDataUtils.java | 3 +-- zy-acs-manager/src/main/java/com/zy/acs/manager/fake/FakeProcessor.java | 2 +- zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/astart/AStarNavigateService.java | 6 +++--- zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/AgvCmdService.java | 2 +- zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MapService.java | 2 ++ 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/common/utils/MapDataUtils.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/common/utils/MapDataUtils.java index 979dfa9..41ea3f3 100644 --- a/zy-acs-manager/src/main/java/com/zy/acs/manager/common/utils/MapDataUtils.java +++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/common/utils/MapDataUtils.java @@ -19,9 +19,8 @@ } public static List<Double> parseCdaNode(String cdaNodeStr) { - List<Double> waveNodeList = new ArrayList<>(); if (Cools.isEmpty(cdaNodeStr)) { - return waveNodeList; + return new ArrayList<>(); } return JSON.parseArray(cdaNodeStr, Double.class); } diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/AgvCmdService.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/AgvCmdService.java index e383d6f..cb05787 100644 --- a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/AgvCmdService.java +++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/AgvCmdService.java @@ -91,7 +91,7 @@ return messageBody; } try{ - Thread.sleep(10); + Thread.sleep(15); }catch(Exception ex){ ex.printStackTrace(); } diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MapService.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MapService.java index d6c2b61..faa379e 100644 --- a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MapService.java +++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MapService.java @@ -35,6 +35,8 @@ @Component("mapService") public class MapService { + private final static int[][] DIRECTIONS = {{0,1},{0,-1},{-1,0},{1,0}}; + @Value("${floyd.enable}") private Boolean floydEnable; @Autowired diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/astart/AStarNavigateService.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/astart/AStarNavigateService.java index 139fa84..a7ea660 100644 --- a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/astart/AStarNavigateService.java +++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/astart/AStarNavigateService.java @@ -29,6 +29,9 @@ public static final int WEIGHT_CALC_FACTOR = 1; + // right left up down + private final static int[][] DIRECTIONS = {{0,1},{0,-1},{-1,0},{1,0}}; + @Autowired private MapDataDispatcher mapDataDispatcher; @Autowired @@ -186,9 +189,6 @@ // System.out.println("getNeighborNodes spend time: " + getNeighborNodesTime +", count: " + getNeighborNodesCount); return null; } - - // right left up down - private final static int[][] DIRECTIONS = {{0,1},{0,-1},{-1,0},{1,0}}; // 鑾峰彇鍥涘懆鑺傜偣 private List<AStarNavigateNode> getNeighborNodes(AStarNavigateNode currentNode, int[][] mapMatrix, Set<AStarNavigateNode> existNodes) { diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/fake/FakeProcessor.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/fake/FakeProcessor.java index 390cbaa..3c5e4a7 100644 --- a/zy-acs-manager/src/main/java/com/zy/acs/manager/fake/FakeProcessor.java +++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/fake/FakeProcessor.java @@ -91,7 +91,7 @@ this.responseThread = new Thread(() -> { while (!Thread.currentThread().isInterrupted()) { try { - Thread.sleep(10); + Thread.sleep(15); if (configService.getVal("fakeSign", Boolean.class)) { this.responseTheRequest(); -- Gitblit v1.9.1