added static agv
This commit is contained in:
parent
d161b70537
commit
bcc908bfca
|
@ -16,10 +16,10 @@ import addAssetModel from "../geomentries/assets/addAssetModel";
|
|||
import { getFloorAssets } from "../../../services/factoryBuilder/assest/floorAsset/getFloorItemsApi";
|
||||
import useModuleStore from "../../../store/useModuleStore";
|
||||
// import { retrieveGLTF } from "../../../utils/indexDB/idbUtils";
|
||||
const assetManagerWorker = new Worker(new URL("../../../services/factoryBuilder/webWorkers/assetManagerWorker.js", import.meta.url));
|
||||
const gltfLoaderWorker = new Worker(new URL("../../../services/factoryBuilder/webWorkers/gltfLoaderWorker.js", import.meta.url));
|
||||
|
||||
import { useEventsStore } from "../../../store/simulation/useEventsStore";
|
||||
const assetManagerWorker = new Worker(new URL("../../../services/factoryBuilder/webWorkers/assetManagerWorker.js", import.meta.url));
|
||||
const gltfLoaderWorker = new Worker(new URL("../../../services/factoryBuilder/webWorkers/gltfLoaderWorker.js", import.meta.url));
|
||||
|
||||
const FloorItemsGroup = ({ itemsGroup, hoveredDeletableFloorItem, AttachedObject, floorGroup, tempLoader, isTempLoader, plane, }: any) => {
|
||||
const state: Types.ThreeState = useThree();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
import VehicleAnimator from '../animator/vehicleAnimator'
|
||||
|
||||
function VehicleInstance() {
|
||||
function VehicleInstance({ agvDetails }: any) {
|
||||
return (
|
||||
<>
|
||||
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
import React from 'react'
|
||||
import VehicleInstance from './instance/vehicleInstance'
|
||||
|
||||
function VehicleInstances() {
|
||||
function VehicleInstances({ vehicles }: any) {
|
||||
return (
|
||||
<>
|
||||
|
||||
<VehicleInstance />
|
||||
{vehicles.map((val: any) =>
|
||||
|
||||
<VehicleInstance agvDetails={val} />
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
</>
|
||||
)
|
||||
|
|
|
@ -9,8 +9,8 @@ function Vehicles() {
|
|||
|
||||
const vehicleStatusSample: VehicleStatus[] = [
|
||||
{
|
||||
modelUuid: "veh-123",
|
||||
modelName: "Autonomous Truck A1",
|
||||
modelUuid: "2c01ed76-359a-485b-83d4-052cfcdb9d89",
|
||||
modelName: "AGV",
|
||||
position: [10, 0, 5],
|
||||
rotation: [0, 0, 0],
|
||||
state: "idle",
|
||||
|
@ -18,7 +18,7 @@ function Vehicles() {
|
|||
speed: 2.5,
|
||||
point: {
|
||||
uuid: "point-789",
|
||||
position: [0, 1, 0],
|
||||
position: [93.42159216649789, 0, 23.790878603572857],
|
||||
rotation: [0, 0, 0],
|
||||
action: {
|
||||
actionUuid: "action-456",
|
||||
|
@ -59,9 +59,58 @@ function Vehicles() {
|
|||
distanceTraveled: 0
|
||||
},
|
||||
{
|
||||
modelUuid: "veh-123",
|
||||
modelName: "Autonomous Truck A1",
|
||||
position: [10, 0, 5],
|
||||
modelUuid: "311130b9-4f2e-425a-b3b5-5039cb348806",
|
||||
modelName: "AGV",
|
||||
position: [95.69567023145055, 0, 33.18042399595448],
|
||||
rotation: [0, 0, 0],
|
||||
state: "idle",
|
||||
type: "vehicle",
|
||||
speed: 2.5,
|
||||
point: {
|
||||
uuid: "point-789",
|
||||
position: [0, 1, 0],
|
||||
rotation: [0, 0, 0],
|
||||
action: {
|
||||
actionUuid: "action-456",
|
||||
actionName: "Deliver to Zone A",
|
||||
actionType: "travel",
|
||||
material: "crate",
|
||||
unLoadDuration: 15,
|
||||
loadCapacity: 5,
|
||||
pickUpPoint: { x: 5, y: 0, z: 3 },
|
||||
unLoadPoint: { x: 20, y: 0, z: 10 },
|
||||
triggers: [
|
||||
{
|
||||
triggerUuid: "trig-001",
|
||||
triggerName: "Start Travel",
|
||||
triggerType: "onStart",
|
||||
delay: 0,
|
||||
triggeredAsset: {
|
||||
triggeredModel: { modelName: "ArmBot-X", modelUuid: "arm-001" },
|
||||
triggeredPoint: { pointName: "Pickup Arm Point", pointUuid: "arm-point-01" },
|
||||
triggeredAction: { actionName: "Grab Widget", actionUuid: "grab-001" }
|
||||
}
|
||||
},
|
||||
{
|
||||
triggerUuid: "trig-002",
|
||||
triggerName: "Complete Travel",
|
||||
triggerType: "onComplete",
|
||||
delay: 2,
|
||||
triggeredAsset: null
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
productId: "prod-890",
|
||||
isActive: false,
|
||||
idleTime: 0,
|
||||
activeTime: 0,
|
||||
currentLoad: 0,
|
||||
distanceTraveled: 0
|
||||
}, {
|
||||
modelUuid: "fa54132c-8333-4832-becb-5281f5e11549",
|
||||
modelName: "AGV",
|
||||
position: [102.71483985219794, 0, 23.66321267938962],
|
||||
rotation: [0, 0, 0],
|
||||
state: "idle",
|
||||
type: "vehicle",
|
||||
|
@ -124,7 +173,7 @@ function Vehicles() {
|
|||
return (
|
||||
<>
|
||||
|
||||
<VehicleInstances />
|
||||
<VehicleInstances vehicles={vehicles} />
|
||||
|
||||
</>
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue