| | |
| | | package com.zy.acs.manager.core.service; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.zy.acs.common.enums.AgvDirectionType; |
| | | import com.zy.acs.common.enums.ActuatorDirectionType; |
| | | import com.zy.acs.framework.common.Cools; |
| | | import com.zy.acs.manager.core.constant.MapDataConstant; |
| | | import com.zy.acs.manager.core.domain.DirectionDto; |
| | | import com.zy.acs.manager.core.domain.SortCodeDto; |
| | | import com.zy.acs.manager.core.domain.UnlockPathTask; |
| | | import com.zy.acs.manager.core.domain.type.CodeDirectionType; |
| | | import com.zy.acs.manager.core.service.astart.*; |
| | | import com.zy.acs.manager.core.service.astart.domain.AStarNavigateNode; |
| | | import com.zy.acs.manager.core.service.astart.domain.DynamicNode; |
| | |
| | | return angle; |
| | | } |
| | | |
| | | // 坐标货架阈值 todo:luxiaotao |
| | | public AgvDirectionType calculateAgvWorkDirectionByShelf(Loc loc, Code code) { |
| | | // 坐标货架阈值 |
| | | public ActuatorDirectionType calculateAgvWorkDirectionByShelf(Loc loc, Code code) { |
| | | Integer compDirect = loc.getCompDirect(); |
| | | AgvDirectionType agvDirectionType = null; |
| | | if (compDirect == 0) { |
| | | agvDirectionType = AgvDirectionType.RIGHT; |
| | | } |
| | | if (compDirect == 1) { |
| | | agvDirectionType = AgvDirectionType.LEFT; |
| | | } |
| | | return agvDirectionType; |
| | | return ActuatorDirectionType.fromVal(compDirect); |
| | | } |
| | | |
| | | public Double getStaAngle(Sta sta, Double workDirection) { |
| | |
| | | public static void main(String[] args) { |
| | | CodeSpinType codeSpinType = calcSpinDirection(null, 260.0, 10.0); |
| | | List<DirectionDto> directionDtoList = DirectionDto.initCodeDirections(); |
| | | System.out.println(JSON.toJSONString(directionDtoList)); |
| | | System.out.println(codeSpinType.toString()); |
| | | } |
| | | |
| | |
| | | return CodeSpinType.NA; |
| | | } |
| | | List<Double> disableAngleList = new ArrayList<>(); |
| | | List<DirectionDto> directionDtoList = DirectionDto.initCodeDirections(); |
| | | if (code.getData().contains("57")) { |
| | | directionDtoList = DirectionDto.initCodeDirections0(); |
| | | List<DirectionDto> directionDtoList; |
| | | if (!Cools.isEmpty(code.getDirRule())) { |
| | | directionDtoList = JSON.parseArray(code.getDirRule(), DirectionDto.class); |
| | | } else { |
| | | directionDtoList = DirectionDto.initCodeDirections(); |
| | | } |
| | | for (DirectionDto dto : directionDtoList) { |
| | | if (null != dto.getEnabled() && !dto.getEnabled()) { |