v2-ui #70
@@ -22,6 +22,7 @@ function RoboticArmAnimator({ armUuid, HandleCallback, currentPhase, ikSolver, t
|
|||||||
const [currentPath, setCurrentPath] = useState<[number, number, number][]>([]);
|
const [currentPath, setCurrentPath] = useState<[number, number, number][]>([]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
||||||
setCurrentPath(path)
|
setCurrentPath(path)
|
||||||
}, [path])
|
}, [path])
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ function RoboticArmInstance({ robot }: { robot: ArmBotStatus }) {
|
|||||||
);
|
);
|
||||||
if (curve) {
|
if (curve) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
logStatus(robot.modelUuid, "waiting to pick box");
|
logStatus(robot.modelUuid, "picking the object");
|
||||||
setPath(curve.points.map(point => [point.x, point.y, point.z]));
|
setPath(curve.points.map(point => [point.x, point.y, point.z]));
|
||||||
}, 1500)
|
}, 1500)
|
||||||
}
|
}
|
||||||
@@ -117,7 +117,7 @@ function RoboticArmInstance({ robot }: { robot: ArmBotStatus }) {
|
|||||||
);
|
);
|
||||||
if (curve) {
|
if (curve) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
logStatus(robot.modelUuid, "waiting to drop box");
|
logStatus(robot.modelUuid, "dropping the object");
|
||||||
setPath(curve.points.map(point => [point.x, point.y, point.z]));
|
setPath(curve.points.map(point => [point.x, point.y, point.z]));
|
||||||
}, 1500)
|
}, 1500)
|
||||||
}
|
}
|
||||||
@@ -170,7 +170,8 @@ function RoboticArmInstance({ robot }: { robot: ArmBotStatus }) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const logStatus = (id: string, status: string) => {
|
const logStatus = (id: string, status: string) => {
|
||||||
console.log(id + "," + status);
|
// console.log(id + "," + status);
|
||||||
|
console.log( status);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ function IKInstance({ modelUrl, setIkSolver, ikSolver, robot, groupRef, processe
|
|||||||
|
|
||||||
const helper = new CCDIKHelper(OOI.Skinned_Mesh, iks, 0.05)
|
const helper = new CCDIKHelper(OOI.Skinned_Mesh, iks, 0.05)
|
||||||
|
|
||||||
scene.add(helper)
|
// scene.add(helper)
|
||||||
|
|
||||||
|
|
||||||
}, [gltf]);
|
}, [gltf]);
|
||||||
|
|||||||
Reference in New Issue
Block a user