Browse Source

Merge remote-tracking branch 'origin/master'

jx-test
修宁 5 months ago
parent
commit
831143c78b
  1. 11
      src/modules/amr/ptr/PtrObject.ts

11
src/modules/amr/ptr/PtrObject.ts

@ -991,11 +991,15 @@ export default class PtrObject extends THREE.Object3D {
this.animationUpFork(height).then( this.animationUpFork(height).then(
() => this.animationShowFork(1.35).then( () => this.animationShowFork(1.35).then(
() => { () => {
try {
// 将物品拾取到机械臂上 // 将物品拾取到机械臂上
const mesh = this.pickupItem(goodsId) const mesh = this.pickupItem(goodsId)
mesh.position.set(0, 0, -0.15) mesh.position.set(0, 0, -0.15)
mesh.rotation.set(0, THREE.MathUtils.degToRad(90), 0) mesh.rotation.set(0, THREE.MathUtils.degToRad(90), 0)
this.getArmObject().add(mesh) this.getArmObject().add(mesh)
} catch (e) {
console.error(e)
}
this.animationUpFork(height + 0.2).then( this.animationUpFork(height + 0.2).then(
() => this.animationHideFork().then( () => this.animationHideFork().then(
@ -1020,9 +1024,14 @@ export default class PtrObject extends THREE.Object3D {
() => this.animationShowFork(1.35).then( () => this.animationShowFork(1.35).then(
()=>this.animationUpFork(height).then( ()=>this.animationUpFork(height).then(
() => { () => {
try {
const a = this.agvStatusVo.unloadBasLocationVo const a = this.agvStatusVo.unloadBasLocationVo
// 将物品从机械臂上卸下 // 将物品从机械臂上卸下
this.dropItem(goodsId, a.rack, a.bay, a.level, a.cell) this.dropItem(goodsId, a.rack, a.bay, a.level, a.cell)
} catch (e) {
console.error(e)
}
this.animationHideFork().then( this.animationHideFork().then(
() => this.animationDownFork().then(() => { () => this.animationDownFork().then(() => {
@ -1076,7 +1085,7 @@ export default class PtrObject extends THREE.Object3D {
const item = this.viewport.entityManager.findItemById(id) const item = this.viewport.entityManager.findItemById(id)
const wrap = this.viewport.entityManager.findObjectById(id) as MeshWrap const wrap = this.viewport.entityManager.findObjectById(id) as MeshWrap
if (wrap.type !== 'MeshWrap') { if (!wrap || wrap.type !== 'MeshWrap') {
throw new Error(`无法拾取物品 ${id},它不是一个有效的 MeshWrap`) throw new Error(`无法拾取物品 ${id},它不是一个有效的 MeshWrap`)
} }
item.dt.storeAt = { item.dt.storeAt = {

Loading…
Cancel
Save