| | |
| | | |
| | | @Override |
| | | public StationCommand getCommand(StationCommandType commandType, Integer taskNo, Integer stationId, Integer targetStationId, Integer palletSize) { |
| | | return getCommand(commandType, taskNo, stationId, targetStationId, palletSize, null); |
| | | } |
| | | |
| | | @Override |
| | | public StationCommand getCommand(StationCommandType commandType, |
| | | Integer taskNo, |
| | | Integer stationId, |
| | | Integer targetStationId, |
| | | Integer palletSize, |
| | | Double pathLenFactor) { |
| | | StationCommand stationCommand = new StationCommand(); |
| | | stationCommand.setTaskNo(taskNo); |
| | | stationCommand.setStationId(stationId); |
| | |
| | | |
| | | if (commandType == StationCommandType.MOVE) { |
| | | if (!stationId.equals(targetStationId)) { |
| | | List<NavigateNode> nodes = calcPathNavigateNodes(stationId, targetStationId); |
| | | List<NavigateNode> nodes = calcPathNavigateNodes(taskNo, stationId, targetStationId, pathLenFactor); |
| | | List<Integer> path = new ArrayList<>(); |
| | | List<Integer> liftTransferPath = new ArrayList<>(); |
| | | for (NavigateNode n : nodes) { |
| | |
| | | return zyStationConnectDriver.readOriginCommand(address, length); |
| | | } |
| | | |
| | | private List<NavigateNode> calcPathNavigateNodes(Integer startStationId, Integer targetStationId) { |
| | | private List<NavigateNode> calcPathNavigateNodes(Integer taskNo, |
| | | Integer startStationId, |
| | | Integer targetStationId, |
| | | Double pathLenFactor) { |
| | | NavigateUtils navigateUtils = SpringUtils.getBean(NavigateUtils.class); |
| | | if (navigateUtils == null) { |
| | | return new ArrayList<>(); |
| | | } |
| | | return navigateUtils.calcByStationId(startStationId, targetStationId); |
| | | return navigateUtils.calcByStationId(startStationId, targetStationId, taskNo, pathLenFactor); |
| | | } |
| | | |
| | | private void executeMoveWithSeg(StationCommand original) { |