#
luxiaotao1123
2024-05-08 9efa735d68a8385a73290156b73850f7233e05fe
src/components/agv.jsx
@@ -14,7 +14,8 @@
} from '../config/setting'
const Agv = (props) => {
    const { agvNo, position, theta, trayList, hasBox } = props;
    const { agvNo, position, trayList, hasBox } = props;
    const theta = -props.theta;
    const height = props.height * 0.04;
    const forkLength = props.forkLength * 0.1;
    const loaderTheta = Number(props.loaderTheta?.toFixed(1));
@@ -50,8 +51,8 @@
        }
        // group theta
        if (groupTheta !== -theta && props.theta !== null) {
            const minTheta = Common.minDiffTheta(groupTheta, -theta);
        if (groupTheta !== theta && props.theta !== null) {
            const minTheta = Common.normalizeAngle(theta);
            new TWEEN.Tween({ value: groupTheta })
                .to({ value: minTheta }, INTERVAL_TIME)
                .easing(TWEEN.Easing.Linear.None)
@@ -83,9 +84,10 @@
        // console.log("loaderTheta", loaderTheta);
        // console.log("loaderAbsoluteAngle", loaderAbsoluteAngle);
        if (integrateTheta !== loaderAbsoluteAngle && props.loaderTheta !== null) {
            const minTheta = Common.normalizeAngle(loaderAbsoluteAngle);
            // const minTheta = Common.minDiffTheta(integrateTheta, loaderAbsoluteAngle);
            new TWEEN.Tween({ value: integrateTheta })
                .to({ value: loaderAbsoluteAngle }, INTERVAL_TIME)
                .to({ value: minTheta }, INTERVAL_TIME)
                .easing(TWEEN.Easing.Linear.None)
                .onUpdate((e) => {
                    setIntegrateTheta(e.value)