|
|
@ -78,7 +78,7 @@ public abstract class AmrAgvItem extends ExecutorItem { |
|
|
/** |
|
|
/** |
|
|
* 当前执行的设备任务列表 |
|
|
* 当前执行的设备任务列表 |
|
|
*/ |
|
|
*/ |
|
|
final BlockingQueue<AmrDeviceTask> deviceTaskQueue = Queues.newArrayBlockingQueue(BLOCKING_QUEUE_CAPACITY); |
|
|
public final BlockingQueue<AmrDeviceTask> deviceTaskQueue = Queues.newArrayBlockingQueue(BLOCKING_QUEUE_CAPACITY); |
|
|
|
|
|
|
|
|
final AmrDeviceConnector amrDeviceConnector = new AmrDeviceConnector(this.runtime); |
|
|
final AmrDeviceConnector amrDeviceConnector = new AmrDeviceConnector(this.runtime); |
|
|
|
|
|
|
|
|
@ -87,7 +87,7 @@ public abstract class AmrAgvItem extends ExecutorItem { |
|
|
/** |
|
|
/** |
|
|
* 连接器线程 |
|
|
* 连接器线程 |
|
|
*/ |
|
|
*/ |
|
|
public final AmrConnectorThread connectorThread; |
|
|
public AmrConnectorThread connectorThread; |
|
|
|
|
|
|
|
|
public AmrAgvItem(LogisticsRuntime logisticsRuntime, Map<String, Object> raw) { |
|
|
public AmrAgvItem(LogisticsRuntime logisticsRuntime, Map<String, Object> raw) { |
|
|
super(logisticsRuntime, raw); |
|
|
super(logisticsRuntime, raw); |
|
|
@ -775,12 +775,11 @@ public abstract class AmrAgvItem extends ExecutorItem { |
|
|
d.chargeLocation = deviceTaskList.get(lastIndex).chargeLocation; |
|
|
d.chargeLocation = deviceTaskList.get(lastIndex).chargeLocation; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
handelDeviceTask(deviceTaskList); |
|
|
deviceTaskQueue.addAll(deviceTaskList); |
|
|
|
|
|
String json = JsonWrapper.toJson(deviceTaskList); |
|
|
|
|
|
log.info("deviceTaskList: {}", json); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
abstract public void handelDeviceTask(List<AmrDeviceTask> deviceTaskList); |
|
|
|
|
|
|
|
|
public boolean isSamePosition(PosDirection startPos) { |
|
|
public boolean isSamePosition(PosDirection startPos) { |
|
|
return this.logicX == startPos.logicX() && this.logicY == startPos.logicY() && |
|
|
return this.logicX == startPos.logicX() && this.logicY == startPos.logicY() && |
|
|
PathUtils.getDirectionByArmDirection(this.direction) == startPos.direction(); |
|
|
PathUtils.getDirectionByArmDirection(this.direction) == startPos.direction(); |
|
|
@ -794,21 +793,33 @@ public abstract class AmrAgvItem extends ExecutorItem { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static class COperationType { |
|
|
public static class COperationType { |
|
|
|
|
|
// 移动
|
|
|
public static final short move = 0; |
|
|
public static final short move = 0; |
|
|
|
|
|
// 载货
|
|
|
public static final short load = 1; |
|
|
public static final short load = 1; |
|
|
public static final short unpick = 2; |
|
|
// 卸货
|
|
|
|
|
|
public static final short unload = 2; |
|
|
|
|
|
// 充电
|
|
|
public static final short charge = 3; |
|
|
public static final short charge = 3; |
|
|
|
|
|
// 移载取放货
|
|
|
public static final short transplantLoadAndUnload = 4; |
|
|
public static final short transplantLoadAndUnload = 4; |
|
|
|
|
|
// 滚轮取放货
|
|
|
public static final short rollerLoadAndUnload = 5; |
|
|
public static final short rollerLoadAndUnload = 5; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private static class CPickMode { |
|
|
public static class CPickMode { |
|
|
|
|
|
// 无动作
|
|
|
public static final short normal = 0; |
|
|
public static final short normal = 0; |
|
|
|
|
|
// 载货
|
|
|
public static final short load = 1; |
|
|
public static final short load = 1; |
|
|
|
|
|
// 卸货
|
|
|
public static final short unload = 2; |
|
|
public static final short unload = 2; |
|
|
|
|
|
// 调高
|
|
|
public static final short adjustHeight = 3; |
|
|
public static final short adjustHeight = 3; |
|
|
|
|
|
// 调高准备取货
|
|
|
public static final short adjustHeightToLoad = 5; |
|
|
public static final short adjustHeightToLoad = 5; |
|
|
|
|
|
// 调高准备卸货
|
|
|
public static final short adjustHeightToUnload = 6; |
|
|
public static final short adjustHeightToUnload = 6; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|