Browse Source

项目执行框架的搭建

master
修宁 6 months ago
parent
commit
9d760f03d8
  1. 140
      doc/RCS3任务拆解.md
  2. 8
      src/example/example1.js
  3. 8
      src/modules/pallet/PalletPropertySetter.ts

140
doc/RCS3任务拆解.md

@ -4,7 +4,6 @@ connector-cl2 通讯
MQTT Package MQTT Package
### 任务结构 ### 任务结构
所有的任务,都分为3个层级 所有的任务,都分为3个层级
@ -25,35 +24,63 @@ MQTT Package
设备执行任务1.3.3 DeviceTask3 设备执行任务1.3.3 DeviceTask3
``` ```
### 任务拆解 ### 任务拆解
#### 业务任务 BizTask #### 业务任务 BizTask
```javascript ```javascript
RCS.dispatchTask({ RCS.addBizTask({
type: 'carry', // 任务类型 type: 'carry', // 任务类型
agv: 'cl2', // 指定车辆 taskExecutorId: 'cl2', // 指定车辆
lpn: 'pallet1124', // 托盘ID, 用于校验 lpn: 'pallet1124', // 托盘ID, 用于校验
from: '27', // 起始点位 priority: 1, // 优先级
to: '20' // 目标点位 // 起始点位的详细信息
}); from: {
item: '27', // 货架编号
bay: 0, // 货架列
level: 1, // 货架层
cell: 0 // 货架格
},
// 目标点位的详细信息
to: {
item: '20' // 地堆货位号
}
})
```
业务任务是用户发起的任务,返回值
```json5
{
// 是否成功
"success": true,
// 中文提示
"msg": '任务下发成功',
"data": {
// 任务ID
"taskId": '任务ID'
}
}
``` ```
业务任务是用户发起的任务,通常是通过 LCC 控制中心的界面来发起。
com.galaxis.rcs.task.TaskManager 会将任务拆解为多个预执行任务 PlanTask。 com.galaxis.rcs.task.TaskService 会将任务拆解为多个预执行任务 PlanTask。
比如下面的指令 比如下面的指令
#### 发送 #### 发送
##### 移动 robotMove ##### 移动 robotMove
```javascript ```json5
{ {
type: 'robotMove', type: 'robotMove',
robotId: '机器人编号', // 机器人设备ID // 机器人设备ID
startWayPoint: '24', // 起点Id, WayPointId robotId: '机器人编号',
endWayPoint: '16', // 终点ID, WayPointId // 起点Id, WayPointId
armRotiation: numer // 货叉/机械臂,相对于头的角度, 逆时针为正 startWayPoint: '24',
// 终点ID, WayPointId
endWayPoint: '16',
// number类型,货叉/机械臂,相对于头的角度, 逆时针为正
armRotiation: 0
} }
``` ```
@ -62,101 +89,116 @@ LCC 控制中心使用的是第一人称视角参照系。**`FirstPerson`**
CL2 和 CLX 使用的是货叉朝向和方向正负系。比如: 凯乐士CL2使用 CL2 和 CLX 使用的是货叉朝向和方向正负系。比如: 凯乐士CL2使用
```json ```json
[{ "X": 3, "Y": 5, "Speed": 1200 }, { "X": 1, "Y": 5, "Speed": -1000}] [
{
"X": 3,
"Y": 5,
"Speed": 1200
},
{
"X": 1,
"Y": 5,
"Speed": -1000
}
]
``` ```
那么,从 LCC 控制参考,转换为 CL2 / CLX 控制参考,应当使用方法为: **`FirstPersonToCl2.convertMoveCommand()`** 那么,从 LCC 控制参考,转换为 CL2 / CLX 控制参考,应当使用方法为: **`FirstPersonToCl2.convertMoveCommand()`**
##### 转动 robotRotation ##### 转动 robotRotation
```javascript ```json5
{ {
type: 'robotRotation', type: 'robotRotation',
robotId: '机器人编号', robotId: '机器人编号',
worldRotation: 90 // 转动身体到世界角度 90 度 worldRotation: 90
// 转动身体到世界角度 90 度
} }
``` ```
##### 取货 robotLoad ##### 取货 robotLoad
```javascript ```json5
{ {
type: 'robotLoad', type: 'robotLoad',
robotId: '机器人编号', robotId: '机器人编号',
storeBarCode: '地标二维码编号', // 用于校验 storeBarCode: '地标二维码编号',
boxItem: '容器ID', // 托盘或周转箱ID,用于校验 // 用于校验
rackItem: '货架ID', // 源货架/层/列/格 boxItem: '容器ID',
// 托盘或周转箱ID,用于校验
rackItem: '货架ID',
// 源货架/层/列/格
bay: '列', bay: '列',
level: '层', level: '层',
cell: '格' cell: '格'
} }
``` ```
##### 放货 robotUnload ##### 放货 robotUnload
```javascript ```json5
{ {
type: 'robotUnload', type: 'robotUnload',
robotId: '机器人编号', robotId: '机器人编号',
storeBarCode: '地标二维码编号', // 用于校验 storeBarCode: '地标二维码编号',
rackItem: '货架ID', // 目标货架/层/列/格 // 用于校验
rackItem: '货架ID',
// 目标货架/层/列/格
bay: '列', bay: '列',
level: '层', level: '层',
cell: '格' cell: '格'
} }
``` ```
##### 充电 robotCharger ##### 充电 robotCharger
```javascript ```json5
{ {
type: 'robotCharger', type: 'robotCharger',
robotId: '机器人编号', robotId: '机器人编号',
chargerItem: '20' // 充电位ID // 充电位ID
chargerItem: '20'
} }
``` ```
#### 接收 #### 接收
##### 位置/姿态/电量/等其他数据上报 ##### 位置/姿态/电量/等其他数据上报
```javascript ```json5
{ {
type: 'reportState', type: 'reportState',
locationX: number, // 目前所在位置 // 目前所在位置 number
locationY: number, locationX: 114.5,
lookAtX: number, // 第一人称视角望向的位置 locationY: 90.2,
lookAtY: number, // 第一人称视角望向的位置
armRotation: number, // 货叉/机械臂相对于头的偏移角度,逆向旋转角度为正 lookAtX: 124.5,
totalBatteryCapacity: number, // 总电池容量 lookAtY: 90.2,
remainingBattery: number, // 剩余电池容量 // 货叉/机械臂相对于头的偏移角度,逆向旋转角度为正
alermLevel: number, // 报警层级 1=全界面警告 / 2=当前层警告 / 3=不警告 armRotation: -90,
LED: string // LED 灯状态 // 总电池容量 number
totalBatteryCapacity: 100,
// 剩余电池容量 number
remainingBattery: 30,
// 报警层级 1=全界面警告 / 2=当前层警告 / 3=不警告
alermLevel: 1,
// LED 灯状态 string
LED: 'green-4'
} }
``` ```
##### 心跳上报 ##### 心跳上报
```javascript ```json5
{ {
type: 'heartbeat', type: 'heartbeat',
createTime: number // 相对于 1970年以来的毫秒总数,时间戳 // 相对于 1970年以来的毫秒总数,时间戳
createTime: 1111929293
} }
``` ```
### 基于硬件接口的监控及动画显示 ### 基于硬件接口的监控及动画显示
store_location_map store_location_map
location_code location_code

8
src/example/example1.js

@ -252,7 +252,7 @@ export default {
id: '8', t: 'way', v: true, id: '8', t: 'way', v: true,
tf: [[2.7, 0, 7.75], [90, 0, 0], [0.25, 0.25, 0.1]], tf: [[2.7, 0, 7.75], [90, 0, 0], [0.25, 0.25, 0.1]],
dt: { dt: {
in: ['7'], out: ['7'], center: [], in: ['7', 'charger1'], out: ['7', 'charger1'], center: [],
linkStore: [{ item: 'rack1', bay: 0, level: 2, cell: 0 }] linkStore: [{ item: 'rack1', bay: 0, level: 2, cell: 0 }]
} }
}, },
@ -319,7 +319,7 @@ export default {
id: '27', t: 'way', v: true, id: '27', t: 'way', v: true,
tf: [[5.65, 0, 7.75], [90, 0, 0], [0.25, 0.25, 0.1]], tf: [[5.65, 0, 7.75], [90, 0, 0], [0.25, 0.25, 0.1]],
dt: { dt: {
in: ['26'], out: ['26'], center: [], in: ['26', 'charger2'], out: ['26', 'charger2'], center: [],
linkStore: [{ item: 'rack1', bay: 0, level: 1, cell: 0 }] linkStore: [{ item: 'rack1', bay: 0, level: 1, cell: 0 }]
} }
}, },
@ -378,12 +378,12 @@ export default {
{ {
id: 'charger1', t: 'charger', v: true, id: 'charger1', t: 'charger', v: true,
tf: [[2.696, 0, 8.75], [0, 0, 0], [1, 1, 1]], tf: [[2.696, 0, 8.75], [0, 0, 0], [1, 1, 1]],
dt: { in: [], out: [], center: [], chargerWidth: 0.53, chargerDepth: 0.275, clxHeight: 0.3 } dt: { in: ['8'], out: ['8'], center: [], chargerWidth: 0.53, chargerDepth: 0.275, clxHeight: 0.3 }
}, },
{ {
id: 'charger2', t: 'charger', v: true, id: 'charger2', t: 'charger', v: true,
tf: [[5.655, 0, 8.75], [0, 0, 0], [1, 1, 1]], tf: [[5.655, 0, 8.75], [0, 0, 0], [1, 1, 1]],
dt: { in: [], out: [], center: [], chargerWidth: 0.53, chargerDepth: 0.275, clxHeight: 0.3 } dt: { in: ['27'], out: ['27'], center: [], chargerWidth: 0.53, chargerDepth: 0.275, clxHeight: 0.3 }
}, },
{ {
id: 'pallet1122', // 托盘唯一编码 id: 'pallet1122', // 托盘唯一编码

8
src/modules/pallet/PalletPropertySetter.ts

@ -12,19 +12,19 @@ const propertySetter: PropertySetter = {
title: '存储位置', expand: true, size: 'small', title: '存储位置', expand: true, size: 'small',
fields: [ fields: [
{ {
dataPath: 'dt.storeAt.item', label: '货架/储位', input: 'InputSelect', dataPath: 'dt.storeAt.item', label: '货架', input: 'Input',
inputProps: {} inputProps: {}
}, },
{ {
dataPath: 'dt.storeAt.bay', label: '存储位置[]', input: 'InputNumber', dataPath: 'dt.storeAt.bay', label: '列', input: 'InputNumber',
inputProps: {} inputProps: {}
}, },
{ {
dataPath: 'dt.storeAt.level', label: '存储位置[]', input: 'InputNumber', dataPath: 'dt.storeAt.level', label: '层', input: 'InputNumber',
inputProps: {} inputProps: {}
}, },
{ {
dataPath: 'dt.storeAt.cell', label: '存储位置[]', input: 'InputNumber', dataPath: 'dt.storeAt.cell', label: '格', input: 'InputNumber',
inputProps: {} inputProps: {}
} }
] ]

Loading…
Cancel
Save