@wandelbots/wandelbots-js-react-components 6.4.0-pr.revamp.667.bd2ec84 → 6.4.0-pr.revamp.667.ca77f09
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +172 -40
- package/dist/3d.cjs +1 -1
- package/dist/3d.d.ts +3 -4
- package/dist/3d.js +35 -38
- package/dist/CurrentPose/index.cjs +1 -1
- package/dist/CurrentPose/index.js +2 -2
- package/dist/CurrentPoseBar/index.cjs +1 -1
- package/dist/CurrentPoseBar/index.js +1 -1
- package/dist/JoggingButtons/index.cjs +1 -1
- package/dist/JoggingButtons/index.js +1 -1
- package/dist/JoggingGizmo/index.cjs +1 -1
- package/dist/JoggingGizmo/index.js +2 -2
- package/dist/JoggingJointSlider/index.cjs +1 -1
- package/dist/JoggingJointSlider/index.js +1 -1
- package/dist/RobotControl/index.cjs +1 -1
- package/dist/RobotControl/index.js +2 -2
- package/dist/RobotControlPanel/index.cjs +1 -1
- package/dist/RobotControlPanel/index.d.ts +1 -1
- package/dist/RobotControlPanel/index.js +1 -1
- package/dist/RobotHeader/index.cjs +1 -1
- package/dist/RobotHeader/index.d.ts +3 -5
- package/dist/RobotHeader/index.js +6 -7
- package/dist/RobotScene/index.cjs +1 -1
- package/dist/RobotScene/index.js +3 -3
- package/dist/RobotView/index.cjs +1 -1
- package/dist/RobotView/index.js +2 -2
- package/dist/SafetyBar/IndicatorWithExplanation.d.ts +12 -1
- package/dist/SafetyBar/SafetyBar.d.ts +15 -1
- package/dist/SafetyBar/index.cjs +1 -1
- package/dist/SafetyBar/index.d.ts +0 -1
- package/dist/SafetyBar/index.js +3 -4
- package/dist/SafetyBar/robotSafetyOf.d.ts +1 -0
- package/dist/chunks/{ConnectedMotionGroup-BifrgwV1.js → ConnectedMotionGroup-DNYakgxy.js} +6 -5
- package/dist/chunks/ConnectedMotionGroup-IRTsTxwB.cjs +3 -0
- package/dist/chunks/{CurrentPose-CMqO8oqX.cjs → CurrentPose-CAq9e9JY.cjs} +1 -1
- package/dist/chunks/{CurrentPose-CdD2ZB7B.js → CurrentPose-CgdINEh2.js} +3 -3
- package/dist/chunks/{CurrentPoseBar-CX1xFBtm.js → CurrentPoseBar--HkZBGnN.js} +11 -11
- package/dist/chunks/{CurrentPoseBar-BTBAwIO4.cjs → CurrentPoseBar-DoOUfRRs.cjs} +1 -1
- package/dist/chunks/{JoggingButtons-aijK-3g6.js → JoggingButtons-BNOnpcTH.js} +1 -1
- package/dist/chunks/{JoggingButtons-BOHl7hVq.cjs → JoggingButtons-Boaym2hQ.cjs} +1 -1
- package/dist/chunks/{JoggingGizmo-CoKYUtXq.cjs → JoggingGizmo-CNFjpWDv.cjs} +1 -1
- package/dist/chunks/{JoggingGizmo-DHvrJouR.js → JoggingGizmo-RDiEVQes.js} +1 -1
- package/dist/chunks/{JoggingGizmoOrientation-CIvIAIeO.js → JoggingGizmoOrientation-Dzzz2gEz.js} +1 -1
- package/dist/chunks/{JoggingGizmoOrientation-DVcagPRJ.cjs → JoggingGizmoOrientation-laUrgY0N.cjs} +1 -1
- package/dist/chunks/{JoggingJointSlider-DQtt4-pa.js → JoggingJointSlider-BY-Tof8G.js} +1 -1
- package/dist/chunks/{JoggingJointSlider-CTFYKzsU.cjs → JoggingJointSlider-Dm3vILd3.cjs} +1 -1
- package/dist/chunks/{JoggingRefusedError-BIkUM6-g.js → JoggingRefusedError-C4D8_YR_.js} +5 -3
- package/dist/chunks/JoggingRefusedError-DqyrfUcc.cjs +1 -0
- package/dist/chunks/Pose3-BfBNPRDM.cjs +1 -0
- package/dist/chunks/{Pose3-B_fLR-Wv.js → Pose3-DWxfC6Dj.js} +1 -2
- package/dist/chunks/{Robot-C-IWfxP9.js → Robot-B-VAYuAr.js} +5 -5
- package/dist/chunks/{Robot-Cfhjv9Z8.cjs → Robot-DRf8T9Zf.cjs} +1 -1
- package/dist/chunks/RobotActivation-CRVxXvlx.cjs +1 -0
- package/dist/chunks/RobotActivation-oR-8Y0iq.js +143 -0
- package/dist/chunks/RobotControl-Dbe50ZKM.cjs +1 -0
- package/dist/chunks/RobotControl-Ms1F7fFe.js +332 -0
- package/dist/chunks/RobotControlPanel-B7NxoHsO.cjs +1 -0
- package/dist/chunks/RobotControlPanel-CkQlkq8x.js +1029 -0
- package/dist/chunks/RobotHeader-CjOaf9s6.cjs +1 -0
- package/dist/chunks/RobotHeader-LSuRTDFB.js +395 -0
- package/dist/chunks/RobotScene-Au6zpHH1.cjs +1 -0
- package/dist/chunks/RobotScene-C6XEgaVR.js +1284 -0
- package/dist/chunks/RobotSessionProvider-CoF_tX0O.cjs +1 -0
- package/dist/chunks/RobotSessionProvider-DuHi-dtw.js +30 -0
- package/dist/chunks/{RobotView-BGYlAWj-.cjs → RobotView-Cg6JfGiY.cjs} +1 -1
- package/dist/chunks/{RobotView-D-v8jCM7.js → RobotView-CrAxNkyG.js} +3 -3
- package/dist/chunks/{robotSafetyOf-DuKKma1_.js → SafetyBar-C85BAKsL.js} +244 -215
- package/dist/chunks/SafetyBar-D2l81Omq.cjs +1 -0
- package/dist/chunks/externalizeComponent-CA_sHzyH.cjs +2 -0
- package/dist/chunks/{externalizeComponent-4juwPKL5.js → externalizeComponent-CChY_1bN.js} +34 -8
- package/dist/chunks/{useSmoothedMotionState-BSSV8aZN.js → hooks-BWoeBWLV.js} +43 -87
- package/dist/chunks/hooks-BXe2bNMo.cjs +1 -0
- package/dist/chunks/loadRobotSession-BzY9H3F8.cjs +1 -0
- package/dist/chunks/{loadRobotSession-GHHtv5dv.js → loadRobotSession-Ts2MumBB.js} +1065 -679
- package/dist/chunks/poseText-BxG4Caa-.js +48 -0
- package/dist/chunks/poseText-CwplkbDM.cjs +1 -0
- package/dist/chunks/useSmoothedMotionState-CCXmMZ0S.cjs +1 -0
- package/dist/chunks/useSmoothedMotionState-CELh-YJa.js +50 -0
- package/dist/components/VelocitySlider.d.ts +14 -1
- package/dist/components/connectionWarning/ConnectionWarning.d.ts +18 -4
- package/dist/components/connectionWarning/connectionWarningOf.d.ts +1 -11
- package/dist/components/jogging/JoggingCartesianAxisControl.d.ts +7 -1
- package/dist/components/jogging/JoggingCartesianTab.d.ts +6 -0
- package/dist/components/jogging/JoggingJointTab.d.ts +5 -0
- package/dist/components/jogging/JoggingJointValueControl.d.ts +7 -1
- package/dist/components/jogging/JoggingPanel.d.ts +11 -0
- package/dist/components/jogging/JoggingRefusedError.d.ts +8 -3
- package/dist/components/jogging/JoggingStore.d.ts +206 -17
- package/dist/components/jogging/joggingColors.d.ts +6 -0
- package/dist/components/robotControl/CartesianJogTab.d.ts +14 -3
- package/dist/components/robotControl/JogArea.d.ts +6 -3
- package/dist/components/robotControl/JogDisabledReason.d.ts +15 -0
- package/dist/components/robotControl/JointJogTab.d.ts +10 -2
- package/dist/components/robotControl/MoveToTab.d.ts +24 -3
- package/dist/components/robotControl/PoseField.d.ts +3 -1
- package/dist/components/robotControl/RobotControl.d.ts +3 -0
- package/dist/components/robotControl/RobotControlPanel.d.ts +91 -22
- package/dist/components/robotControl/VelocityRow.d.ts +8 -2
- package/dist/components/robotControl/atPose.d.ts +6 -0
- package/dist/components/robotControl/poseText.d.ts +13 -1
- package/dist/components/robotControl/units.d.ts +10 -2
- package/dist/components/robotControl/useRobotControlProps.d.ts +7 -4
- package/dist/components/robotControl/velocityText.d.ts +18 -0
- package/dist/components/robotHeader/ActivationSwitch.d.ts +13 -2
- package/dist/components/robotHeader/RobotHeader.d.ts +25 -4
- package/dist/components/robotHeader/robotActivationOf.d.ts +1 -8
- package/dist/components/robotScene/RobotScene.d.ts +7 -1
- package/dist/components/robots/MotionGroupVisualizer.d.ts +6 -4
- package/dist/components/robots/SupportedLinearAxis.d.ts +6 -4
- package/dist/components/robots/SupportedRobot.d.ts +7 -5
- package/dist/components/robots/useFrameSmoothedMotionState.d.ts +25 -0
- package/dist/components/utils/useSmoothedMotionState.d.ts +11 -2
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +8 -10
- package/dist/core.js +60 -69
- package/dist/index.cjs +1 -1
- package/dist/index.js +100 -113
- package/dist/lib/ConnectedMotionGroup.d.ts +11 -0
- package/dist/lib/ControllerStateStream.d.ts +9 -9
- package/dist/lib/JoggerConnection.d.ts +48 -13
- package/dist/lib/MotionStreamConnection.d.ts +3 -2
- package/dist/lib/TrajectoryExecutionStore.d.ts +58 -20
- package/dist/lib/controllerStateSource.d.ts +6 -5
- package/dist/lib/robotSession/RobotActivation.d.ts +52 -21
- package/dist/lib/robotSession/RobotSession.d.ts +27 -8
- package/dist/lib/robotSession/RobotTargetPose.d.ts +4 -2
- package/dist/lib/robotSession/loadRobotSession.d.ts +1 -1
- package/dist/lib/robotSession/robotPose.d.ts +0 -6
- package/dist/session.cjs +1 -1
- package/dist/session.d.ts +6 -6
- package/dist/session.js +30 -38
- package/package.json +22 -1
- package/dist/chunks/ConnectedMotionGroup-CybwJHkh.cjs +0 -3
- package/dist/chunks/JoggingRefusedError-BuCGsVsa.cjs +0 -1
- package/dist/chunks/Pose3-Ch4xVeXV.cjs +0 -1
- package/dist/chunks/RobotActivation-Bb0oNSBN.cjs +0 -1
- package/dist/chunks/RobotActivation-C0rrwpQZ.js +0 -115
- package/dist/chunks/RobotControl-Cv6Sr1Ni.js +0 -289
- package/dist/chunks/RobotControl-DFnOYMAa.cjs +0 -1
- package/dist/chunks/RobotControlPanel-B1_9g9D-.js +0 -850
- package/dist/chunks/RobotControlPanel-BpTpRBgy.cjs +0 -1
- package/dist/chunks/RobotScene-0ZJzXL50.cjs +0 -1
- package/dist/chunks/RobotScene-DpFeFpnx.js +0 -1255
- package/dist/chunks/RobotSessionProvider--AekyPqD.cjs +0 -1
- package/dist/chunks/RobotSessionProvider-TVaKGzqa.js +0 -25
- package/dist/chunks/externalizeComponent-Br_U-QAr.cjs +0 -2
- package/dist/chunks/loadRobotSession-DYbeNnTI.cjs +0 -1
- package/dist/chunks/poseText-BXUaQWnK.cjs +0 -1
- package/dist/chunks/poseText-pg4cxE8R.js +0 -41
- package/dist/chunks/robotActivationOf-B4oV10Za.cjs +0 -1
- package/dist/chunks/robotActivationOf-EzcT9g07.js +0 -368
- package/dist/chunks/robotSafetyOf-Dxm6s7Pp.cjs +0 -1
- package/dist/chunks/useSmoothedMotionState-B9WO73k0.cjs +0 -1
- package/dist/components/robotHeader/robotSafetyOf.d.ts +0 -11
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),x=require("@mui/material/Divider"),T=require("@mui/material/Stack"),m=require("mobx-react-lite"),A=require("./RobotSessionProvider-CoF_tX0O.cjs"),M=require("./externalizeComponent-CA_sHzyH.cjs"),v=require("@mui/material/styles"),d=require("react"),p=require("react-i18next"),O=require("@mui/material/Popover"),_=require("@mui/material/SvgIcon"),E=require("@mui/material/Typography"),w=require("axios"),R=require("./json-Bd6uGfgP.cjs");function B(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const l=B(d);function j(e,t){throw new Error(`${t} ${JSON.stringify(e)}`)}function N(e){var t,o,r,a;return e instanceof w.AxiosError&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof w.AxiosError&&e.response?`${(t=e.response)==null?void 0:t.status} ${(o=e.response)==null?void 0:o.statusText} from ${(r=e.response)==null?void 0:r.config.url}: ${JSON.stringify((a=e.response)==null?void 0:a.data)}`:e instanceof Error?e.message:`Unexpected error: ${R.tryStringifyJson(e)||e}`}function $(e){const{controllerState:t}=e.state;return{isVirtual:e.description.isVirtual,motionGroupId:e.motionGroupId,operationMode:t.operation_mode,safetyState:t.safety_state}}const F=({title:e,titleId:t,...o},r)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...o},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M5.248 21c-.334 0-.619-.116-.853-.35a1.153 1.153 0 0 1-.351-.848c0-.333.117-.616.351-.85.234-.233.519-.35.853-.35H7.24L4.558 9.87a2.881 2.881 0 0 1-1.126-1.042A2.77 2.77 0 0 1 3 7.317c0-.793.28-1.467.838-2.023a2.774 2.774 0 0 1 2.033-.834 2.71 2.71 0 0 1 1.728.585c.494.389.832.887 1.014 1.493h3.58V5.239c0-.22.076-.406.226-.555a.76.76 0 0 1 .558-.224c.136 0 .263.035.381.104.118.07.209.167.273.292v.14l1.835-1.702a.979.979 0 0 1 .52-.279.881.881 0 0 1 .58.091l4.01 1.85a.74.74 0 0 1 .36.364.537.537 0 0 1-.002.474.592.592 0 0 1-.366.323.657.657 0 0 1-.477-.039l-3.858-1.774L13.76 6.59v1.454l2.473 2.233 3.858-1.774a.648.648 0 0 1 .485-.03.571.571 0 0 1 .358.314.513.513 0 0 1 .01.482.79.79 0 0 1-.367.357l-4.011 1.882a.881.881 0 0 1-.58.09.979.979 0 0 1-.52-.278L13.63 9.638v.14a.92.92 0 0 1-.273.275.665.665 0 0 1-.381.12.76.76 0 0 1-.558-.224.752.752 0 0 1-.225-.555V8.096h-3.58a2.82 2.82 0 0 1-.215.54 2.552 2.552 0 0 1-.323.479l5.139 9.488h2.673c.335 0 .62.116.854.35.234.233.35.516.35.849 0 .332-.116.615-.35.849a1.167 1.167 0 0 1-.854.349H5.248Zm.623-12.385c.362 0 .67-.126.924-.378a1.25 1.25 0 0 0 .38-.92 1.25 1.25 0 0 0-.38-.92 1.261 1.261 0 0 0-.924-.379 1.26 1.26 0 0 0-.925.379 1.25 1.25 0 0 0-.38.92c0 .36.127.667.38.92.254.252.562.378.925.378Z"})),C=d.forwardRef(F),P=({title:e,titleId:t,...o},r)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...o},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"m13.37 9.12 1.69 1.69 2.99-2.99-3.73-3.73-.95-.95-7.66 7.66-.95.95 3.99 3.99v3.44h7.55v-3.55l-4.72-4.72 1.79-1.79Zm-.91-2.99.91-.91 2.6 2.6-.91.91-2.6-2.6Zm-2.25 10.24h3.74l-1.34-1.34-.04-.04h-2.5l-3.25-3.25 4.59-4.59.92.92L9.5 10.9l5.33 5.33v1.48H10.2v-1.35l.01.01ZM2 2v4.99h1.41V3.4h3.58V2H2ZM22.21 2h-4.98v1.41h3.59v3.58h1.4V2h-.01ZM20.81 20.65h-3.58v1.4h4.98v-4.99h-1.4v3.59ZM3.4 17.06H2v4.98h4.99v-1.4H3.4v-3.58Z"})),Z=d.forwardRef(P),f=m.observer(({id:e,testId:t,accessibleName:o,icon:r,color:a,title:s,name:c,label:i,explanation:S,literalValue:y,anchorOrigin:h,transformOrigin:b})=>{const u=m.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!u.anchorEl},openPopover(g){u.anchorEl=g.currentTarget},closePopover(){u.anchorEl=null}}));return n.jsxs(n.Fragment,{children:[n.jsxs(T,{"data-testid":t,role:"img","aria-label":o,"aria-owns":u.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:u.openPopover,onMouseLeave:u.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[n.jsx(_,{component:r,sx:{color:a}}),i&&n.jsx("div",{style:{color:a},children:i})]}),n.jsx(O,{id:e,sx:{pointerEvents:"none"},open:u.isPopoverOpen,anchorEl:u.anchorEl,anchorOrigin:h??{vertical:"bottom",horizontal:"left"},transformOrigin:b??{vertical:"top",horizontal:"left"},onClose:u.closePopover,disableRestoreFocus:!0,children:n.jsxs(T,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[n.jsxs("div",{children:[s&&n.jsx(E,{component:"span",fontSize:"14px",children:`${s}: `}),n.jsx(E,{component:"span",color:a,fontWeight:"bold",fontSize:"14px",children:c})]}),n.jsx(E,{fontSize:"14px",children:S}),y&&n.jsx(E,{fontSize:"12px",children:y})]})})]})}),I=m.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:o,transformOrigin:r,compact:a})=>{const s=v.useTheme(),c=d.useId(),{t:i}=p.useTranslation(),S=y=>`${i("SafetyBar.ControllerType.ti")}: ${y}`;return e?n.jsx(f,{id:`motion-group-virtual-${c}`,testId:"controller-type-indicator",accessibleName:S(i("SafetyBar.ControllerType.Virtual.lb")),icon:Z,color:s.palette.tertiary.main,name:i("SafetyBar.ControllerType.Virtual.lb"),label:a?null:i("SafetyBar.ControllerType.Virtual.lb"),explanation:n.jsxs(p.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",n.jsx("code",{children:t})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:o,transformOrigin:r}):n.jsx(f,{id:`motion-group-physical-${c}`,testId:"controller-type-indicator",accessibleName:S(i("SafetyBar.ControllerType.Physical.lb")),icon:C,color:s.palette.primary.main,name:i("SafetyBar.ControllerType.Physical.lb"),label:a?null:i("SafetyBar.ControllerType.Physical.lb"),explanation:n.jsx(p.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:n.jsx("code",{}),strong:n.jsx("strong",{})}}),anchorOrigin:o,transformOrigin:r})}),V=({title:e,titleId:t,...o},r)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...o},e?l.createElement("title",{id:t},e):null,l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.306 2.768c0-.424.344-.768.768-.768h.406C19.53 2 22 4.551 22 7.699c0 3.237-2.51 5.587-5.31 5.703-.84 1.595-2.478 2.677-4.36 2.677a4.845 4.845 0 0 1-3.146-1.163c-.6 1.783 0 3.922 1.79 4.99 1.929 1.149 4.395.467 5.508-1.524l.212-.378a.75.75 0 1 1 1.308.732l-.231.414c-1.524 2.725-4.9 3.66-7.54 2.085-2.716-1.618-3.432-5.037-2.129-7.599a5.22 5.22 0 0 1-.73-2.677c0-2.192 1.335-4.063 3.212-4.793-1.195-1.427-3.29-1.96-5.08-.892-1.928 1.15-2.589 3.696-1.475 5.687l.231.413a.75.75 0 0 1-1.308.732l-.212-.377c-1.524-2.726-.62-6.211 2.02-7.785 2.716-1.619 5.943-.55 7.44 1.897l.13-.001c2.739 0 4.96 2.292 4.96 5.12 0 .284-.023.563-.066.834 1.795-.354 3.288-1.96 3.288-4.095 0-2.3-1.805-4.163-4.032-4.163h-.406a.768.768 0 0 1-.768-.768Zm.496 8.191c0 .286-.033.564-.094.831a3.62 3.62 0 0 1-.672 1.415 3.425 3.425 0 0 1-2.706 1.338 3.402 3.402 0 0 1-2.384-.98 3.598 3.598 0 0 1-.852-1.306 3.677 3.677 0 0 1-.235-1.298c0-1.623 1.046-2.994 2.48-3.435a3.37 3.37 0 0 1 1.522-.107c1.665.264 2.94 1.75 2.94 3.542Z"})),q=d.forwardRef(V),Y=({title:e,titleId:t,...o},r)=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...o},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z",fill:"#fff",fillOpacity:.56})),L=d.forwardRef(Y),K=({title:e,titleId:t,...o},r)=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...o},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M12.953 5.09a1.497 1.497 0 0 0-1.653-.518l-1.35.43a1.504 1.504 0 0 0-1.726-.376L2.858 6.97c-.736.321-1.06 1.155-.726 1.862.334.707 1.202 1.02 1.937.698l4.27-1.865 1.466 1.973v.402c0 .873-.627 1.63-1.512 1.827l-2.56.567c-1.329.295-2.27 1.431-2.27 2.74v.107c0 .26.22.469.489.469h11.117c1.329 0 2.618.435 3.656 1.233l1.665 1.28A1 1 0 0 0 22 17.47V11.062c0-.312-.108-.616-.308-.863l-3.415-4.218a1.5 1.5 0 0 0-1.618-.471l-.378.12-.866-.475a1.516 1.516 0 0 0-1.188-.114l-1.06.338-.214-.289Z"})),D=d.forwardRef(K),H=m.observer(({operationMode:e,anchorOrigin:t,transformOrigin:o,compact:r})=>{const{t:a}=p.useTranslation(),s=v.useTheme(),c=d.useId(),i=S=>`${a("SafetyBar.OperationMode.ti")}: ${S}`;switch(e){case"OPERATION_MODE_AUTO":return n.jsx(f,{id:`operation-mode-auto-${c}`,testId:"operation-mode-indicator",accessibleName:i(a("SafetyBar.OperationMode.Automatic.ti")),icon:q,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Automatic.ti"),label:r?null:a("SafetyBar.OperationMode.Automatic.ti"),color:s.palette.text.secondary,explanation:n.jsx(p.Trans,{i18nKey:"SafetyBar.OperationMode.Auto.Explanation.lb",children:"The robot controller is in automatic operation mode. Automated movement without manual confirmation is possible in this mode."}),anchorOrigin:t,transformOrigin:o});case"OPERATION_MODE_MANUAL":case"OPERATION_MODE_MANUAL_T1":case"OPERATION_MODE_MANUAL_T2":return n.jsx(f,{id:`operation-mode-manual-${c}`,testId:"operation-mode-indicator",accessibleName:i(a("SafetyBar.OperationMode.Manual.lb")),icon:D,color:s.palette.warning.main,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Manual.lb"),label:r?null:a("SafetyBar.OperationMode.Manual.lb"),explanation:n.jsx(p.Trans,{i18nKey:"SafetyBar.OperationMode.Manual.Explanation.lb",children:"The robot controller is in manual operation mode. On a physical robot, this generally indicates that an enabling switch must be held for the robot to move successfully."}),literalValue:e,anchorOrigin:t,transformOrigin:o});default:return n.jsx(f,{id:`operation-mode-error-${c}`,testId:"operation-mode-indicator",accessibleName:i(a("SafetyBar.OperationMode.Error.lb")),icon:L,color:s.palette.warning.main,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Error.lb"),label:r?null:a("SafetyBar.OperationMode.Error.lb"),explanation:n.jsx(p.Trans,{i18nKey:"SafetyBar.OperationMode.Error.Explanation.lb",children:"The robot controller has entered an unexpected operation mode. Motion group movement may not be possible."}),literalValue:e,anchorOrigin:t,transformOrigin:o})}}),U=({title:e,titleId:t,...o},r)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...o},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z"})),z=d.forwardRef(U),k=({title:e,titleId:t,...o},r)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...o},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.364 12a6.364 6.364 0 1 1-12.728 0 6.364 6.364 0 0 1 12.728 0ZM7.909 9.273 12 16.546l4.09-7.273H7.91Z"}),l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.364 0a8.636 8.636 0 1 1-17.273 0 8.636 8.636 0 0 1 17.273 0Z"})),G=d.forwardRef(k),W=({title:e,titleId:t,...o},r)=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...o},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M9.057 15.115c-1.681 0-3.111-.59-4.29-1.768C3.59 12.17 3 10.74 3 9.057c0-.29.021-.582.064-.876a4.1 4.1 0 0 1 .214-.844.78.78 0 0 1 .273-.36c.115-.077.244-.133.389-.168a.857.857 0 0 1 .437.008c.146.04.28.12.4.24l2.806 2.787 2.26-2.261-2.775-2.786a.903.903 0 0 1-.241-.405.875.875 0 0 1-.008-.442 1.13 1.13 0 0 1 .174-.389.82.82 0 0 1 .355-.273c.268-.107.548-.182.838-.224.29-.043.581-.064.871-.064 1.682 0 3.112.59 4.29 1.768 1.179 1.178 1.768 2.608 1.768 4.29 0 .444-.042.858-.126 1.241-.084.384-.21.755-.377 1.113l5.726 5.692A2.2 2.2 0 0 1 21 18.721a2.2 2.2 0 0 1-.662 1.617A2.2 2.2 0 0 1 18.72 21a2.173 2.173 0 0 1-1.617-.679l-5.692-5.709c-.372.161-.75.285-1.133.372-.383.087-.79.13-1.222.13Z",fill:"#fff",fillOpacity:.56})),J=d.forwardRef(W),Q=({title:e,titleId:t,...o},r)=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...o},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"m10.6 13.8-2.15-2.15a.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275.948.948 0 0 0-.275.7c0 .283.092.517.275.7L9.9 15.9c.2.2.433.3.7.3.267 0 .5-.1.7-.3l5.65-5.65a.948.948 0 0 0 .275-.7.948.948 0 0 0-.275-.7.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275L10.6 13.8ZM12 22a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),X=d.forwardRef(Q),ee=({title:e,titleId:t,...o},r)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...o},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M9 16h6c.283 0 .52-.096.713-.287A.968.968 0 0 0 16 15V9a.967.967 0 0 0-.287-.713A.968.968 0 0 0 15 8H9a.968.968 0 0 0-.713.287A.968.968 0 0 0 8 9v6c0 .283.096.52.287.713.192.191.43.287.713.287Zm3 6a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),te=d.forwardRef(ee),ae=m.observer(({safetyState:e,anchorOrigin:t,transformOrigin:o,compact:r})=>{const{t:a}=p.useTranslation(),s=v.useTheme(),c=d.useId(),i=S=>`${a("SafetyBar.SafetyState.ti")}: ${S}`;switch(e){case"SAFETY_STATE_NORMAL":return n.jsx(f,{id:`safety-state-normal-${c}`,testId:"safety-state-indicator",accessibleName:i(a("SafetyBar.SafetyState.Normal.lb")),title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Normal.lb"),label:r?null:a("SafetyBar.SafetyState.Normal.lb"),icon:X,color:s.palette.text.secondary,explanation:n.jsx(p.Trans,{i18nKey:"SafetyBar.SafetyState.Normal.Explanation.lb",children:"The robot controller is in a normal safety state. Movement is not prevented by this state."}),anchorOrigin:t,transformOrigin:o});case"SAFETY_STATE_DEVICE_EMERGENCY_STOP":case"SAFETY_STATE_ROBOT_EMERGENCY_STOP":return n.jsx(f,{id:`safety-state-estop-${c}`,testId:"safety-state-indicator",accessibleName:i(a("SafetyBar.SafetyState.Estop.lb")),title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Estop.lb"),label:r?null:a("SafetyBar.SafetyState.Estop.lb"),icon:G,color:s.palette.error.main,explanation:n.jsx(p.Trans,{i18nKey:"SafetyBar.StopState.Estop.Explanation.lb",children:"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released."}),literalValue:e,anchorOrigin:t,transformOrigin:o});case"SAFETY_STATE_STOP_0":case"SAFETY_STATE_STOP_1":case"SAFETY_STATE_STOP_2":case"SAFETY_STATE_PROTECTIVE_STOP":case"SAFETY_STATE_STOP":return n.jsx(f,{id:`safety-state-stop-${c}`,testId:"safety-state-indicator",accessibleName:i(a("SafetyBar.SafetyState.Stop.lb")),icon:te,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Stop.lb"),label:r?null:a("SafetyBar.SafetyState.Stop.lb"),color:s.palette.warning.main,explanation:n.jsx(p.Trans,{i18nKey:"SafetyBar.SafetyState.Stop.Explanation.lb",children:"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved."}),literalValue:e,anchorOrigin:t,transformOrigin:o});case"SAFETY_STATE_REDUCED":case"SAFETY_STATE_MASTERING":case"SAFETY_STATE_CONFIRM_SAFETY":case"SAFETY_STATE_OPERATOR_SAFETY":case"SAFETY_STATE_RECOVERY":case"SAFETY_STATE_VIOLATION":return n.jsx(f,{id:`safety-state-manual-action-required-${c}`,testId:"safety-state-indicator",accessibleName:i(a("SafetyBar.SafetyState.ManualActionRequired.lb")),icon:J,color:s.palette.warning.main,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.ManualActionRequired.lb"),label:r?null:a("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:n.jsx(p.Trans,{i18nKey:"SafetyBar.SafetyState.ManualActionRequired.Explanation.lb",children:"The robot controller has entered a safety state requiring manual action to resolve."}),literalValue:e,anchorOrigin:t,transformOrigin:o});case"SAFETY_STATE_UNKNOWN":case"SAFETY_STATE_FAULT":return n.jsx(f,{id:`safety-state-error-${c}`,testId:"safety-state-indicator",accessibleName:i(a("SafetyBar.SafetyState.Error.lb")),icon:z,color:s.palette.error.main,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Error.lb"),label:r?null:a("SafetyBar.SafetyState.Error.lb"),explanation:n.jsx(p.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:o});default:j(e,`Unknown safety state ${e}`)}}),oe=M.externalizeComponent(m.observer(e=>{const{session:t,anchorOrigin:o,transformOrigin:r,compact:a=!0,...s}=e,c=A.useOptionalRobotSessionOf(t),{isVirtual:i,motionGroupId:S,operationMode:y,safetyState:h}={...c&&$(c),...s};if(i===void 0||S===void 0||y===void 0||h===void 0)return null;const b=a?1:2;return n.jsxs(T,{direction:"row",gap:b,alignItems:"center",sx:{height:"24px"},children:[n.jsx(ae,{safetyState:h,anchorOrigin:o,transformOrigin:r,compact:a}),n.jsx(x,{orientation:"vertical",flexItem:!0}),n.jsx(H,{operationMode:y,anchorOrigin:o,transformOrigin:r,compact:a}),n.jsx(x,{orientation:"vertical",flexItem:!0}),n.jsx(I,{isVirtual:i,motionGroupId:S,anchorOrigin:o,transformOrigin:r,compact:a})]})}));exports.SafetyBar=oe;exports.makeErrorMessage=N;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const o=require("react/jsx-runtime"),i=require("react"),a=require("react-i18next"),l=require("i18next"),g=require("i18next-browser-languagedetector"),b={"Jogging.Cartesian.Translation.velocityMmPerSec.lb":"{{amount}} mm/s","Jogging.Cartesian.Rotation.velocityDegPerSec.lb":"{{amount}}°/s","Jogging.Velocity.lb":"Geschwindigkeit","General.degree.variable":"{{amount}}°","General.mm.variable":"{{amount}} mm","Jogging.Blocked.ti":"Verbindung blockiert","Jogging.Blocked.lb":"Ein anderer Client kontrolliert das Jogging.","Jogging.Blocked.Reenable.bt":"Neu verbinden","Jogging.Cartesian.MotionType.lb":"Bewegungstyp","Jogging.Cartesian.Translation.bt":"Translation","Jogging.Cartesian.Rotation.bt":"Rotation","Jogging.Joints.JointValues.lb":"Gelenkwerte","Jogging.Increment.Continuous.dd":"Fortlaufend","Jogging.Cartesian.Orientation.lb":"Orientierung","Jogging.JointLimitsReached.lb":"Gelenkgrenzen für Gelenk {{jointNumbers}} erreicht","Jogging.Orientation.coordsys":"Roboterbasis","Jogging.Orientation.tool":"Werkzeug","Jogging.StreamStateSection.lb":"Status Stream:","Jogging.StreamStateSection.RUNNING.lb":"In Bewegung","Jogging.StreamStateSection.PAUSED_BY_USER.lb":"Pausiert (Nutzer)","Jogging.StreamStateSection.PAUSED_NEAR_COLLISION.lb":"Pausiert (Kollisionsnähe)","Jogging.StreamStateSection.PAUSED_NEAR_JOINT_LIMIT.lb":"Pausiert (nahe Gelenkgrenze)","Jogging.StreamStateSection.PAUSED_NEAR_SINGULARITY.lb":"Pausiert (nahe Singularität)","Jogging.StreamStateSection.PAUSED_ON_IO.lb":"Pausiert (I/O-Ereignis)","Jogging.StreamStateSection.END_OF_TRAJECTORY.lb":"Trajektorie beendet","Jogging.StreamStateSection.WAIT_FOR_IO.lb":"Warte auf I/O","Jogging.StreamStateSection.KIND_UNKNOWN.lb":"Bereit","Jogging.StreamStateSection.Error.Collision.lb":"Bewegung kann nicht geplant werden: sie würde zu einer Kollision führen","Jogging.StreamStateSection.Error.JointLimit.lb":"Bewegung kann nicht geplant werden: eine Gelenkgrenze würde überschritten","Jogging.StreamStateSection.Error.NoSolutionInConfiguration.lb":"Bewegung kann in der aktuellen Roboterkonfiguration nicht geplant werden","Jogging.StreamStateSection.Error.OutOfWorkspace.lb":"Bewegung kann nicht geplant werden: das Ziel liegt außerhalb des Arbeitsraums","Jogging.StreamStateSection.Error.PlanningFailed.lb":"Die angeforderte Bewegung konnte nicht geplant werden","Jogging.StreamStateSection.Error.Singularity.lb":"Bewegung kann nicht geplant werden: der Pfad führt durch eine Singularität. Versuche eine andere Achse oder bewege die Gelenke direkt","Jogging.TargetPose.Error.Collision.lb":"Die Bewegung zur aktuellen Pose würde eine Kollision verursachen. Bitte ändere die Posen-Koordinaten.","Jogging.TargetPose.Error.MoveFailed.lb":"Die Bewegung zu dieser Pose ist fehlgeschlagen: {{message}}","Jogging.TargetPose.Error.NotReachable.lb":"Die aktuelle Pose ist nicht erreichbar. Bitte ändere die Posen-Koordinaten.","Jogging.TargetPose.Error.PlanningFailed.lb":"Die Bewegung zu dieser Pose konnte nicht geplant werden. Bitte ändere die Posen-Koordinaten.","Jogging.TargetPose.Error.Singularity.lb":"Die aktuelle Pose würde eine Singularität erzeugen. Bitte ändere die Posen-Koordinaten.","SafetyBar.ActivationToggle.Activate.bt":"Aktivieren","SafetyBar.ActivationToggle.Activated.bt":"Aktiviert","SafetyBar.ActivationToggle.Activating.bt":"Wird aktiviert…","SafetyBar.ActivationToggle.Deactivating.bt":"Wird deaktiviert…","SafetyBar.ControllerType.Physical.lb":"Physisch","SafetyBar.ControllerType.Virtual.lb":"Virtuell","SafetyBar.ControllerType.ti":"Steuerungstyp","SafetyBar.MotionGroup.Physical.Explanation.lb":"<code>{{motionGroupId}}</code> ist ein physische Robotersteuerung. Für die Bewegung dieses Roboters sind <strong>Sicherheitsmaßnahmen</strong> aktiv.","SafetyBar.MotionGroup.Virtual.Explanation.lb":"<1>{{motionGroupId}}</1> ist eine virtuelle Robotersteuerung ohne physisches Gegenstück. Der Roboter kann ohne Sicherheitsmaßnahmen bewegt werden.","SafetyBar.OperationMode.Auto.Explanation.lb":"Automatischer Betriebsmodus der Robotersteuerung aktiv. Automatisierte Bewegung ohne manuelle Bestätigung freigegeben.","SafetyBar.OperationMode.Automatic.ti":"Automatisch","SafetyBar.OperationMode.Error.Explanation.lb":"Fehler beim Abrufen des Betriebsmodus. Originalhandbediengerät des Roboters verwenden, um Fehler zu lösen.","SafetyBar.OperationMode.Error.lb":"Fehler","SafetyBar.OperationMode.Manual.Explanation.lb":`Die Robotersteuerung befindet sich im manuellen Betriebsmodus.
|
|
2
|
+
Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabeschalter gedrückt werden muss, damit sich der Roboter erfolgreich bewegen kann.`,"SafetyBar.OperationMode.Manual.lb":"Manuell","SafetyBar.OperationMode.ti":"Betriebsmodus","SafetyBar.SafetyState.Error.Explanation.lb":"Die Robotersteuerung ist in einen unerwarteten Sicherheitszustand eingetreten.","SafetyBar.SafetyState.Error.lb":"Fehler","SafetyBar.SafetyState.Estop.lb":"NOT-AUS","SafetyBar.SafetyState.ManualActionRequired.Explanation.lb":"Die Robotersteuerung ist in einen Sicherheitszustand eingetreten, der manuelle Maßnahmen zur Behebung erfordert.","SafetyBar.SafetyState.ManualActionRequired.lb":"Aktion erforderlich","SafetyBar.SafetyState.Normal.Explanation.lb":"Die Robotersteuerung befindet sich in einem sicheren Zustand. Roboterbewegungen sind möglich.","SafetyBar.SafetyState.Normal.lb":"Sicher","SafetyBar.SafetyState.Stop.Explanation.lb":"Die Robotersteuerung ist in einen Stoppzustand übergegangen. Bis der Stoppzustand aufgelöst ist, ist keine Bewegung mehr möglich.","SafetyBar.SafetyState.Stop.lb":"Stopp","SafetyBar.SafetyState.ti":"Sicherheitszustand","SafetyBar.StopState.Estop.Explanation.lb":"NOT-AUS aktiviert. NOT-AUS freischalten, um Roboter zu bewegen.","Jogging.Increment.hlb":"Schrittgröße","Jogging.CoordinateSystem.hlb":"Koordinatensystem","Jogging.Cartesian.bt":"Kartesisch","Jogging.Joints.bt":"Gelenke","Jogging.Velocity.bt":"Geschwindigkeit","Jogging.Handle.lb":"{{handle}} verfahren","RobotControl.Title.ti":"Robotersteuerung","RobotControl.Close.bt":"Schließen","RobotControl.Tab.Translate.bt":"Verschieben","RobotControl.Tab.Rotate.bt":"Drehen","RobotControl.Tcp.lb":"TCP","RobotControl.JogFrame.lb":"Bewegen relativ zu","RobotControl.JogMode.lb":"Verfahrmodus","RobotControl.JogMode.Continuous.bt":"Fortlaufend","RobotControl.JogMode.Increment.bt":"Schrittweise","RobotControl.Velocity.lb":"Geschwindigkeit","RobotControl.Velocity.NotANumber.lb":"Zahl eingeben","RobotControl.Velocity.OutOfRange.lb":"Wert zwischen {{min}} und {{max}} eingeben","RobotControl.StepSize.lb":"Schrittgröße","RobotControl.JogArea.ShowGizmo.bt":"Gizmo-Steuerung","RobotControl.JogArea.ShowButtons.bt":"Tasten-Steuerung","RobotControl.JogArea.Hint.HoldHandle.lb":"Griff halten zum Verfahren · Loslassen zum Stoppen","RobotControl.JogArea.Hint.HoldButton.lb":"Taste halten zum Verfahren · Loslassen zum Stoppen","RobotControl.JogArea.Hint.ClickHandle.lb":"Griff klicken für einen Schritt","RobotControl.JogArea.Hint.ClickButton.lb":"Taste klicken für einen Schritt","RobotControl.Tab.Joint.bt":"Gelenk","RobotControl.Joint.Base.lb":"Basis","RobotControl.Joint.Shoulder.lb":"Schulter","RobotControl.Joint.Elbow.lb":"Ellbogen","RobotControl.Joint.Forearm.lb":"Unterarm","RobotControl.Joint.Wrist.lb":"Handgelenk","RobotControl.Joint.Flange.lb":"Flansch","RobotControl.Tab.MoveTo.bt":"Bewegen zu","RobotControl.MoveTo.TargetPose.lb":"Zielpose","RobotControl.MoveTo.RelativeTo.lb":"Relativ zu","RobotControl.MoveTo.Coordinates.lb":"Koordinaten XYZ (mm) · Rotationsvektor (rad)","RobotControl.MoveTo.JointPositions.lb":"Gelenkpositionen ({{unit}})","RobotControl.MoveTo.Copy.bt":"Kopieren","RobotControl.MoveTo.Copied.lb":"Pose kopiert","RobotControl.MoveTo.Edit.bt":"Pose bearbeiten","RobotControl.MoveTo.Cancel.bt":"Abbrechen","RobotControl.MoveTo.ConfirmEdit.lb":"Bearbeitete Pose übernehmen","RobotControl.MoveTo.InvalidPose.lb":"Bitte gültige Posen-Koordinaten eingeben.","RobotControl.MoveTo.Reset.lb":"Pose auf vorherige Position zurücksetzen","RobotControl.MoveTo.PlanDropped.lb":"Die Bewegung zu diesem Ziel ist nicht mehr geplant.","RobotControl.MoveTo.PlanAgain.lb":"Bewegung erneut planen","RobotControl.MoveTo.MoveTo.bt":"Hierhin bewegen","RobotControl.MoveTo.Moving.bt":"Bewegung aktiv…","RobotControl.MoveTo.Stopping.bt":"Anhalten","RobotControl.MoveTo.HoldToMove.lb":"Zum Bewegen gedrückt halten","RobotControl.MoveTo.AtPose.lb":"Der Roboter befindet sich bereits in dieser Pose","CurrentPose.Title.lb":"Aktuelle Position","CurrentPose.RelativeTo.lb":"Relativ zu","CurrentPose.Copy.bt":"Kopieren","CurrentPose.Copied.lb":"Pose kopiert","CurrentPose.OrientationFormat.ti":"Orientierungsformat","CurrentPose.Format.lb":"Format","CurrentPose.Format.RotationVector.lb":"Rotationsvektor","CurrentPose.Format.EulerAngles.lb":"Euler-Winkel","CurrentPose.Format.Quaternion.lb":"Quaternion","CurrentPose.AngleUnit.lb":"Winkeleinheit","CurrentPose.AngleUnit.Radians.lb":"Radiant","CurrentPose.AngleUnit.Degrees.lb":"Grad","CurrentPose.EulerConvention.lb":"Euler-Konvention","CurrentPose.EulerConvention.Intrinsic.hlb":"Intrinsische Rotationen","CurrentPose.EulerConvention.Extrinsic.hlb":"Extrinsische Rotationen","CurrentPose.EulerConvention.Intrinsic.lb":"Intrinsisch {{axes}}","CurrentPose.EulerConvention.Extrinsic.lb":"Extrinsisch {{axes}}","RobotHeader.Apps.bt":"Apps","RobotHeader.Search.bt":"Suchen","RobotHeader.MotionGroup.lb":"Bewegungsgruppe","Jogging.MoveRelativeTo.SelectedTcp.dd":"Ausgewählter TCP","ConnectionWarning.Interrupted.ti":"Verbindung unterbrochen","ConnectionWarning.LastUpdate.lb":"Kommunikation mit der Robotersteuerung nicht möglich. Die letzte Bewegungsmeldung kam {{time}}.","ConnectionWarning.ErrorState.lb":"Fehlermeldung {{time}}:","RobotView.WebGLUnavailable.ti":"3D-Ansicht nicht verfügbar","RobotView.WebGLUnavailable.pg":"Aktiviere WebGL in deinem Browser, damit das 3D-Modell angezeigt werden kann. Wird WebGL von den Grafiktreibern oder vom Browser nicht unterstützt, aktualisiere die Grafiktreiber und wechsle den Browser.","RobotView.WebGLUnavailable.Reload.bt":"Neu laden","JoggingGizmo.WebGLUnavailable.lb":"Die Gizmo-Steuerung braucht WebGL, das dieser Browser nicht bietet.","RobotControl.MoveTo.NotMoveable.Deactivated.lb":"Der Roboter ist deaktiviert.","RobotControl.MoveTo.NotMoveable.Disconnected.lb":"Keine Verbindung zum Roboter","RobotControl.MoveTo.NotMoveable.OperationMode.lb":"Der Roboter befindet sich in einem nicht beweglichen Betriebsmodus: {{value}}","RobotControl.MoveTo.NotMoveable.SafetyState.lb":"Der Roboter befindet sich in einem nicht beweglichen Sicherheitszustand: {{value}}","RobotControl.JogDisabled.Moving.lb":"Der Roboter bewegt sich zu einer Pose","RobotControl.JogDisabled.Retry.bt":"Erneut versuchen"},s={"Jogging.Cartesian.Translation.velocityMmPerSec.lb":"{{amount}} mm/s","Jogging.Cartesian.Rotation.velocityDegPerSec.lb":"{{amount}}°/s","Jogging.Velocity.lb":"Velocity","General.degree.variable":"{{amount}}°","General.mm.variable":"{{amount}} mm","Jogging.Blocked.ti":"Connection blocked","Jogging.Blocked.lb":"Another client is currently controlling the jogging.","Jogging.Blocked.Reenable.bt":"Reconnect","Jogging.Cartesian.MotionType.lb":"Motion type","Jogging.Cartesian.Translation.bt":"Translation","Jogging.Cartesian.Rotation.bt":"Rotation","Jogging.Joints.JointValues.lb":"Joint values","Jogging.Increment.Continuous.dd":"Continuous","Jogging.Cartesian.Orientation.lb":"Orientation","Jogging.Activating.lb":"Activating jogging","Jogging.JointLimitsReached.lb":"Joint limit reached for joint {{jointNumbers}}","Jogging.Orientation.coordsys":"Robot base","Jogging.Orientation.tool":"Tool","Jogging.StreamStateSection.lb":"State stream:","Jogging.StreamStateSection.RUNNING.lb":"Running","Jogging.StreamStateSection.PAUSED_BY_USER.lb":"Paused (by user)","Jogging.StreamStateSection.PAUSED_NEAR_COLLISION.lb":"Paused (collision proximity)","Jogging.StreamStateSection.PAUSED_NEAR_JOINT_LIMIT.lb":"Paused (near joint limit)","Jogging.StreamStateSection.PAUSED_NEAR_SINGULARITY.lb":"Paused (near singularity)","Jogging.StreamStateSection.PAUSED_ON_IO.lb":"Paused (I/O event)","Jogging.StreamStateSection.END_OF_TRAJECTORY.lb":"End of trajectory","Jogging.StreamStateSection.WAIT_FOR_IO.lb":"Waiting for I/O","Jogging.StreamStateSection.KIND_UNKNOWN.lb":"Ready","Jogging.StreamStateSection.Error.Collision.lb":"Cannot plan this motion: it would cause a collision","Jogging.StreamStateSection.Error.JointLimit.lb":"Cannot plan this motion: a joint limit would be exceeded","Jogging.StreamStateSection.Error.NoSolutionInConfiguration.lb":"Cannot plan this motion in the current robot configuration","Jogging.StreamStateSection.Error.OutOfWorkspace.lb":"Cannot plan this motion: the target is outside the robot's workspace","Jogging.StreamStateSection.Error.PlanningFailed.lb":"The requested motion could not be planned","Jogging.StreamStateSection.Error.Singularity.lb":"Cannot plan this motion: the path passes through a singularity. Try a different axis or jog the joints directly","Jogging.TargetPose.Error.Collision.lb":"Moving to the current pose would cause a collision. Please change the pose coordinates.","Jogging.TargetPose.Error.MoveFailed.lb":"The move to this pose failed: {{message}}","Jogging.TargetPose.Error.NotReachable.lb":"The current pose is not reachable. Please change the pose coordinates.","Jogging.TargetPose.Error.PlanningFailed.lb":"Planning a motion to this pose failed. Please change the pose coordinates.","Jogging.TargetPose.Error.Singularity.lb":"The current pose would create a singularity. Please change the pose coordinates.","SafetyBar.ActivationToggle.Activate.bt":"Activate","SafetyBar.ActivationToggle.Activated.bt":"Activated","SafetyBar.ActivationToggle.Activating.bt":"Activating","SafetyBar.ActivationToggle.Deactivating.bt":"Deactivating","SafetyBar.ControllerType.Physical.lb":"Physical","SafetyBar.ControllerType.Virtual.lb":"Virtual","SafetyBar.ControllerType.ti":"Controller type","SafetyBar.MotionGroup.Physical.Explanation.lb":"<code>{{motionGroupId}}</code> is a physical robot controller. <strong>Safety precautions</strong> are active for the movement of this robot.","SafetyBar.MotionGroup.Virtual.Explanation.lb":"<1>{{motionGroupId}}</1> is a virtual robot controller with no physical counterpart. It can be freely manipulated without safety precautions.","SafetyBar.OperationMode.Auto.Explanation.lb":"Automatic operation mode active. Automated movement without manual confirmation enabled.","SafetyBar.OperationMode.Automatic.ti":"Automatic","SafetyBar.OperationMode.Error.Explanation.lb":"Failed to get operation mode. Use the original control panel to resolve the error.","SafetyBar.OperationMode.Error.lb":"Error","SafetyBar.OperationMode.Manual.Explanation.lb":"The robot controller is in manual operation mode. On a physical robot, this generally indicates that an enabling switch must be held for the robot to move successfully.","SafetyBar.OperationMode.Manual.lb":"Manual","SafetyBar.OperationMode.ti":"Operation mode","SafetyBar.SafetyState.Error.Explanation.lb":"The robot controller has entered an unexpected safety state.","SafetyBar.SafetyState.Error.lb":"Error","SafetyBar.SafetyState.Estop.lb":"E-Stop","SafetyBar.SafetyState.ManualActionRequired.Explanation.lb":"The robot controller has entered a safety state requiring manual action to resolve.","SafetyBar.SafetyState.ManualActionRequired.lb":"Action required","SafetyBar.SafetyState.Normal.Explanation.lb":"The robot controller is in a safe state. Robot movement is enabled.","SafetyBar.SafetyState.Normal.lb":"Safe","SafetyBar.SafetyState.Stop.Explanation.lb":"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved.","SafetyBar.SafetyState.Stop.lb":"Stop","SafetyBar.SafetyState.ti":"Safety state","SafetyBar.StopState.Estop.Explanation.lb":"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released.","Jogging.Increment.hlb":"Increment","Jogging.CoordinateSystem.hlb":"Coordinate system","Jogging.Cartesian.bt":"Cartesian","Jogging.Joints.bt":"Joints","Jogging.Velocity.bt":"Velocity","Jogging.Handle.lb":"Jog {{handle}}","RobotControl.Title.ti":"Robot control","RobotControl.Close.bt":"Close","RobotControl.Tab.Translate.bt":"Translate","RobotControl.Tab.Rotate.bt":"Rotate","RobotControl.Tcp.lb":"TCP","RobotControl.JogFrame.lb":"Move relative to","RobotControl.JogMode.lb":"Jog mode","RobotControl.JogMode.Continuous.bt":"Continuous","RobotControl.JogMode.Increment.bt":"Increment","RobotControl.Velocity.lb":"Velocity","RobotControl.Velocity.NotANumber.lb":"Enter a number","RobotControl.Velocity.OutOfRange.lb":"Enter a value between {{min}} and {{max}}","RobotControl.StepSize.lb":"Step size","RobotControl.JogArea.ShowGizmo.bt":"Gizmo controls","RobotControl.JogArea.ShowButtons.bt":"Button controls","RobotControl.JogArea.Hint.HoldHandle.lb":"Hold a handle to jog · Release to stop","RobotControl.JogArea.Hint.HoldButton.lb":"Hold a button to jog · Release to stop","RobotControl.JogArea.Hint.ClickHandle.lb":"Click a handle to jog one step","RobotControl.JogArea.Hint.ClickButton.lb":"Click a button to jog one step","RobotControl.Tab.Joint.bt":"Joint","RobotControl.Joint.Base.lb":"Base","RobotControl.Joint.Shoulder.lb":"Shoulder","RobotControl.Joint.Elbow.lb":"Elbow","RobotControl.Joint.Forearm.lb":"Forearm","RobotControl.Joint.Wrist.lb":"Wrist","RobotControl.Joint.Flange.lb":"Flange","RobotControl.Tab.MoveTo.bt":"Move to","RobotControl.MoveTo.TargetPose.lb":"Target pose","RobotControl.MoveTo.RelativeTo.lb":"Relative to","RobotControl.MoveTo.Coordinates.lb":"Coordinates XYZ (mm) · Rotation vector (rad)","RobotControl.MoveTo.JointPositions.lb":"Joint positions ({{unit}})","RobotControl.MoveTo.Copy.bt":"Copy","RobotControl.MoveTo.Copied.lb":"Pose copied","RobotControl.MoveTo.Edit.bt":"Edit pose","RobotControl.MoveTo.Cancel.bt":"Cancel","RobotControl.MoveTo.ConfirmEdit.lb":"Save pose edit","RobotControl.MoveTo.InvalidPose.lb":"Please enter valid pose coordinates.","RobotControl.MoveTo.Reset.lb":"Reset pose to previous one","RobotControl.MoveTo.PlanDropped.lb":"The move to this target is no longer planned.","RobotControl.MoveTo.PlanAgain.lb":"Plan the move again","RobotControl.MoveTo.MoveTo.bt":"Move to","RobotControl.MoveTo.Moving.bt":"Moving…","RobotControl.MoveTo.Stopping.bt":"Stopping…","RobotControl.MoveTo.HoldToMove.lb":"Click and hold to move","RobotControl.MoveTo.AtPose.lb":"Robot is already at this pose","CurrentPose.Title.lb":"Current position","CurrentPose.RelativeTo.lb":"Relative to","CurrentPose.Copy.bt":"Copy","CurrentPose.Copied.lb":"Pose copied","CurrentPose.OrientationFormat.ti":"Orientation format","CurrentPose.Format.lb":"Format","CurrentPose.Format.RotationVector.lb":"Rotation vector","CurrentPose.Format.EulerAngles.lb":"Euler angles","CurrentPose.Format.Quaternion.lb":"Quaternion","CurrentPose.AngleUnit.lb":"Angle unit","CurrentPose.AngleUnit.Radians.lb":"Radians","CurrentPose.AngleUnit.Degrees.lb":"Degrees","CurrentPose.EulerConvention.lb":"Euler convention","CurrentPose.EulerConvention.Intrinsic.hlb":"Intrinsic rotations","CurrentPose.EulerConvention.Extrinsic.hlb":"Extrinsic rotations","CurrentPose.EulerConvention.Intrinsic.lb":"Intrinsic {{axes}}","CurrentPose.EulerConvention.Extrinsic.lb":"Extrinsic {{axes}}","RobotHeader.Apps.bt":"Apps","RobotHeader.Search.bt":"Search","RobotHeader.MotionGroup.lb":"Motion group","Jogging.MoveRelativeTo.SelectedTcp.dd":"Selected TCP","ConnectionWarning.Interrupted.ti":"Connection interrupted","ConnectionWarning.LastUpdate.lb":"Communication with the robot controller interrupted. The last motion update was received {{time}}.","ConnectionWarning.ErrorState.lb":"Error message from {{time}}:","RobotView.WebGLUnavailable.ti":"3D view not available","RobotView.WebGLUnavailable.pg":"Activate WebGL in your browser to display the 3D model. If neither the browser nor graphics driver support WebGL, update the graphics driver and switch to another browser.","RobotView.WebGLUnavailable.Reload.bt":"Reload","JoggingGizmo.WebGLUnavailable.lb":"Gizmo controls need WebGL, which this browser does not provide.","RobotControl.MoveTo.NotMoveable.Deactivated.lb":"The robot must be activated first","RobotControl.MoveTo.NotMoveable.Disconnected.lb":"No connection to the robot","RobotControl.MoveTo.NotMoveable.OperationMode.lb":"The robot is in a non-moveable operation mode: {{value}}","RobotControl.MoveTo.NotMoveable.SafetyState.lb":"The robot is in a non-moveable safety state: {{value}}","RobotControl.JogDisabled.Moving.lb":"The robot is moving to a pose","RobotControl.JogDisabled.Retry.bt":"Try again"},t=l.createInstance();t.use(g).init({supportedLngs:["en","de"],resources:{en:{translations:s},de:{translations:b}},ns:["translations"],defaultNS:"translations",detection:{order:["navigator","htmlTag"]}});function u(e){const n=i.memo(e);return(r=>o.jsx(c,{children:o.jsx(n,{...r})}))}const c=({children:e})=>o.jsx(a.I18nextProvider,{i18n:t,children:e});exports.externalizeComponent=u;exports.i18n=t;
|
|
@@ -3,7 +3,7 @@ import { memo as i } from "react";
|
|
|
3
3
|
import { I18nextProvider as a } from "react-i18next";
|
|
4
4
|
import l from "i18next";
|
|
5
5
|
import g from "i18next-browser-languagedetector";
|
|
6
|
-
const
|
|
6
|
+
const b = {
|
|
7
7
|
"Jogging.Cartesian.Translation.velocityMmPerSec.lb": "{{amount}} mm/s",
|
|
8
8
|
"Jogging.Cartesian.Rotation.velocityDegPerSec.lb": "{{amount}}°/s",
|
|
9
9
|
"Jogging.Velocity.lb": "Geschwindigkeit",
|
|
@@ -48,6 +48,7 @@ const s = {
|
|
|
48
48
|
"SafetyBar.ActivationToggle.Deactivating.bt": "Wird deaktiviert…",
|
|
49
49
|
"SafetyBar.ControllerType.Physical.lb": "Physisch",
|
|
50
50
|
"SafetyBar.ControllerType.Virtual.lb": "Virtuell",
|
|
51
|
+
"SafetyBar.ControllerType.ti": "Steuerungstyp",
|
|
51
52
|
"SafetyBar.MotionGroup.Physical.Explanation.lb": "<code>{{motionGroupId}}</code> ist ein physische Robotersteuerung. Für die Bewegung dieses Roboters sind <strong>Sicherheitsmaßnahmen</strong> aktiv.",
|
|
52
53
|
"SafetyBar.MotionGroup.Virtual.Explanation.lb": "<1>{{motionGroupId}}</1> ist eine virtuelle Robotersteuerung ohne physisches Gegenstück. Der Roboter kann ohne Sicherheitsmaßnahmen bewegt werden.",
|
|
53
54
|
"SafetyBar.OperationMode.Auto.Explanation.lb": "Automatischer Betriebsmodus der Robotersteuerung aktiv. Automatisierte Bewegung ohne manuelle Bestätigung freigegeben.",
|
|
@@ -85,6 +86,8 @@ Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabescha
|
|
|
85
86
|
"RobotControl.JogMode.Continuous.bt": "Fortlaufend",
|
|
86
87
|
"RobotControl.JogMode.Increment.bt": "Schrittweise",
|
|
87
88
|
"RobotControl.Velocity.lb": "Geschwindigkeit",
|
|
89
|
+
"RobotControl.Velocity.NotANumber.lb": "Zahl eingeben",
|
|
90
|
+
"RobotControl.Velocity.OutOfRange.lb": "Wert zwischen {{min}} und {{max}} eingeben",
|
|
88
91
|
"RobotControl.StepSize.lb": "Schrittgröße",
|
|
89
92
|
"RobotControl.JogArea.ShowGizmo.bt": "Gizmo-Steuerung",
|
|
90
93
|
"RobotControl.JogArea.ShowButtons.bt": "Tasten-Steuerung",
|
|
@@ -93,10 +96,17 @@ Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabescha
|
|
|
93
96
|
"RobotControl.JogArea.Hint.ClickHandle.lb": "Griff klicken für einen Schritt",
|
|
94
97
|
"RobotControl.JogArea.Hint.ClickButton.lb": "Taste klicken für einen Schritt",
|
|
95
98
|
"RobotControl.Tab.Joint.bt": "Gelenk",
|
|
99
|
+
"RobotControl.Joint.Base.lb": "Basis",
|
|
100
|
+
"RobotControl.Joint.Shoulder.lb": "Schulter",
|
|
101
|
+
"RobotControl.Joint.Elbow.lb": "Ellbogen",
|
|
102
|
+
"RobotControl.Joint.Forearm.lb": "Unterarm",
|
|
103
|
+
"RobotControl.Joint.Wrist.lb": "Handgelenk",
|
|
104
|
+
"RobotControl.Joint.Flange.lb": "Flansch",
|
|
96
105
|
"RobotControl.Tab.MoveTo.bt": "Bewegen zu",
|
|
97
106
|
"RobotControl.MoveTo.TargetPose.lb": "Zielpose",
|
|
98
107
|
"RobotControl.MoveTo.RelativeTo.lb": "Relativ zu",
|
|
99
108
|
"RobotControl.MoveTo.Coordinates.lb": "Koordinaten XYZ (mm) · Rotationsvektor (rad)",
|
|
109
|
+
"RobotControl.MoveTo.JointPositions.lb": "Gelenkpositionen ({{unit}})",
|
|
100
110
|
"RobotControl.MoveTo.Copy.bt": "Kopieren",
|
|
101
111
|
"RobotControl.MoveTo.Copied.lb": "Pose kopiert",
|
|
102
112
|
"RobotControl.MoveTo.Edit.bt": "Pose bearbeiten",
|
|
@@ -104,6 +114,7 @@ Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabescha
|
|
|
104
114
|
"RobotControl.MoveTo.ConfirmEdit.lb": "Bearbeitete Pose übernehmen",
|
|
105
115
|
"RobotControl.MoveTo.InvalidPose.lb": "Bitte gültige Posen-Koordinaten eingeben.",
|
|
106
116
|
"RobotControl.MoveTo.Reset.lb": "Pose auf vorherige Position zurücksetzen",
|
|
117
|
+
"RobotControl.MoveTo.PlanDropped.lb": "Die Bewegung zu diesem Ziel ist nicht mehr geplant.",
|
|
107
118
|
"RobotControl.MoveTo.PlanAgain.lb": "Bewegung erneut planen",
|
|
108
119
|
"RobotControl.MoveTo.MoveTo.bt": "Hierhin bewegen",
|
|
109
120
|
"RobotControl.MoveTo.Moving.bt": "Bewegung aktiv…",
|
|
@@ -141,8 +152,10 @@ Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabescha
|
|
|
141
152
|
"RobotControl.MoveTo.NotMoveable.Deactivated.lb": "Der Roboter ist deaktiviert.",
|
|
142
153
|
"RobotControl.MoveTo.NotMoveable.Disconnected.lb": "Keine Verbindung zum Roboter",
|
|
143
154
|
"RobotControl.MoveTo.NotMoveable.OperationMode.lb": "Der Roboter befindet sich in einem nicht beweglichen Betriebsmodus: {{value}}",
|
|
144
|
-
"RobotControl.MoveTo.NotMoveable.SafetyState.lb": "Der Roboter befindet sich in einem nicht beweglichen Sicherheitszustand: {{value}}"
|
|
145
|
-
|
|
155
|
+
"RobotControl.MoveTo.NotMoveable.SafetyState.lb": "Der Roboter befindet sich in einem nicht beweglichen Sicherheitszustand: {{value}}",
|
|
156
|
+
"RobotControl.JogDisabled.Moving.lb": "Der Roboter bewegt sich zu einer Pose",
|
|
157
|
+
"RobotControl.JogDisabled.Retry.bt": "Erneut versuchen"
|
|
158
|
+
}, s = {
|
|
146
159
|
"Jogging.Cartesian.Translation.velocityMmPerSec.lb": "{{amount}} mm/s",
|
|
147
160
|
"Jogging.Cartesian.Rotation.velocityDegPerSec.lb": "{{amount}}°/s",
|
|
148
161
|
"Jogging.Velocity.lb": "Velocity",
|
|
@@ -188,6 +201,7 @@ Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabescha
|
|
|
188
201
|
"SafetyBar.ActivationToggle.Deactivating.bt": "Deactivating",
|
|
189
202
|
"SafetyBar.ControllerType.Physical.lb": "Physical",
|
|
190
203
|
"SafetyBar.ControllerType.Virtual.lb": "Virtual",
|
|
204
|
+
"SafetyBar.ControllerType.ti": "Controller type",
|
|
191
205
|
"SafetyBar.MotionGroup.Physical.Explanation.lb": "<code>{{motionGroupId}}</code> is a physical robot controller. <strong>Safety precautions</strong> are active for the movement of this robot.",
|
|
192
206
|
"SafetyBar.MotionGroup.Virtual.Explanation.lb": "<1>{{motionGroupId}}</1> is a virtual robot controller with no physical counterpart. It can be freely manipulated without safety precautions.",
|
|
193
207
|
"SafetyBar.OperationMode.Auto.Explanation.lb": "Automatic operation mode active. Automated movement without manual confirmation enabled.",
|
|
@@ -224,6 +238,8 @@ Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabescha
|
|
|
224
238
|
"RobotControl.JogMode.Continuous.bt": "Continuous",
|
|
225
239
|
"RobotControl.JogMode.Increment.bt": "Increment",
|
|
226
240
|
"RobotControl.Velocity.lb": "Velocity",
|
|
241
|
+
"RobotControl.Velocity.NotANumber.lb": "Enter a number",
|
|
242
|
+
"RobotControl.Velocity.OutOfRange.lb": "Enter a value between {{min}} and {{max}}",
|
|
227
243
|
"RobotControl.StepSize.lb": "Step size",
|
|
228
244
|
"RobotControl.JogArea.ShowGizmo.bt": "Gizmo controls",
|
|
229
245
|
"RobotControl.JogArea.ShowButtons.bt": "Button controls",
|
|
@@ -232,10 +248,17 @@ Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabescha
|
|
|
232
248
|
"RobotControl.JogArea.Hint.ClickHandle.lb": "Click a handle to jog one step",
|
|
233
249
|
"RobotControl.JogArea.Hint.ClickButton.lb": "Click a button to jog one step",
|
|
234
250
|
"RobotControl.Tab.Joint.bt": "Joint",
|
|
251
|
+
"RobotControl.Joint.Base.lb": "Base",
|
|
252
|
+
"RobotControl.Joint.Shoulder.lb": "Shoulder",
|
|
253
|
+
"RobotControl.Joint.Elbow.lb": "Elbow",
|
|
254
|
+
"RobotControl.Joint.Forearm.lb": "Forearm",
|
|
255
|
+
"RobotControl.Joint.Wrist.lb": "Wrist",
|
|
256
|
+
"RobotControl.Joint.Flange.lb": "Flange",
|
|
235
257
|
"RobotControl.Tab.MoveTo.bt": "Move to",
|
|
236
258
|
"RobotControl.MoveTo.TargetPose.lb": "Target pose",
|
|
237
259
|
"RobotControl.MoveTo.RelativeTo.lb": "Relative to",
|
|
238
260
|
"RobotControl.MoveTo.Coordinates.lb": "Coordinates XYZ (mm) · Rotation vector (rad)",
|
|
261
|
+
"RobotControl.MoveTo.JointPositions.lb": "Joint positions ({{unit}})",
|
|
239
262
|
"RobotControl.MoveTo.Copy.bt": "Copy",
|
|
240
263
|
"RobotControl.MoveTo.Copied.lb": "Pose copied",
|
|
241
264
|
"RobotControl.MoveTo.Edit.bt": "Edit pose",
|
|
@@ -243,6 +266,7 @@ Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabescha
|
|
|
243
266
|
"RobotControl.MoveTo.ConfirmEdit.lb": "Save pose edit",
|
|
244
267
|
"RobotControl.MoveTo.InvalidPose.lb": "Please enter valid pose coordinates.",
|
|
245
268
|
"RobotControl.MoveTo.Reset.lb": "Reset pose to previous one",
|
|
269
|
+
"RobotControl.MoveTo.PlanDropped.lb": "The move to this target is no longer planned.",
|
|
246
270
|
"RobotControl.MoveTo.PlanAgain.lb": "Plan the move again",
|
|
247
271
|
"RobotControl.MoveTo.MoveTo.bt": "Move to",
|
|
248
272
|
"RobotControl.MoveTo.Moving.bt": "Moving…",
|
|
@@ -280,16 +304,18 @@ Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabescha
|
|
|
280
304
|
"RobotControl.MoveTo.NotMoveable.Deactivated.lb": "The robot must be activated first",
|
|
281
305
|
"RobotControl.MoveTo.NotMoveable.Disconnected.lb": "No connection to the robot",
|
|
282
306
|
"RobotControl.MoveTo.NotMoveable.OperationMode.lb": "The robot is in a non-moveable operation mode: {{value}}",
|
|
283
|
-
"RobotControl.MoveTo.NotMoveable.SafetyState.lb": "The robot is in a non-moveable safety state: {{value}}"
|
|
307
|
+
"RobotControl.MoveTo.NotMoveable.SafetyState.lb": "The robot is in a non-moveable safety state: {{value}}",
|
|
308
|
+
"RobotControl.JogDisabled.Moving.lb": "The robot is moving to a pose",
|
|
309
|
+
"RobotControl.JogDisabled.Retry.bt": "Try again"
|
|
284
310
|
}, t = l.createInstance();
|
|
285
311
|
t.use(g).init({
|
|
286
312
|
supportedLngs: ["en", "de"],
|
|
287
313
|
resources: {
|
|
288
314
|
en: {
|
|
289
|
-
translations:
|
|
315
|
+
translations: s
|
|
290
316
|
},
|
|
291
317
|
de: {
|
|
292
|
-
translations:
|
|
318
|
+
translations: b
|
|
293
319
|
}
|
|
294
320
|
},
|
|
295
321
|
ns: ["translations"],
|
|
@@ -298,7 +324,7 @@ t.use(g).init({
|
|
|
298
324
|
order: ["navigator", "htmlTag"]
|
|
299
325
|
}
|
|
300
326
|
});
|
|
301
|
-
function
|
|
327
|
+
function p(e) {
|
|
302
328
|
const n = i(e);
|
|
303
329
|
return ((r) => /* @__PURE__ */ o(u, { children: /* @__PURE__ */ o(n, { ...r }) }));
|
|
304
330
|
}
|
|
@@ -306,6 +332,6 @@ const u = ({
|
|
|
306
332
|
children: e
|
|
307
333
|
}) => /* @__PURE__ */ o(a, { i18n: t, children: e });
|
|
308
334
|
export {
|
|
309
|
-
|
|
335
|
+
p as e,
|
|
310
336
|
t as i
|
|
311
337
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
class
|
|
4
|
-
constructor(t = [],
|
|
1
|
+
import c, { useEffect as C } from "react";
|
|
2
|
+
import { autorun as I } from "mobx";
|
|
3
|
+
class v {
|
|
4
|
+
constructor(t = [], s = {}) {
|
|
5
5
|
this.currentValues = [], this.targetValues = [], this.previousTargetValues = [], this.targetUpdateTime = 0, this.animationId = null, this.updateCount = 0, this.velocities = [], this.animate = () => {
|
|
6
6
|
this.update(0.016666666666666666) ? this.animationId = null : this.animationId = requestAnimationFrame(this.animate);
|
|
7
7
|
}, this.options = {
|
|
@@ -12,7 +12,7 @@ class A {
|
|
|
12
12
|
},
|
|
13
13
|
onComplete: () => {
|
|
14
14
|
},
|
|
15
|
-
...
|
|
15
|
+
...s
|
|
16
16
|
}, this.currentValues = [...t], this.targetValues = [...t], this.previousTargetValues = [...t], this.velocities = new Array(t.length).fill(0), this.targetUpdateTime = performance.now(), this.updateCount = 0;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
@@ -25,14 +25,14 @@ class A {
|
|
|
25
25
|
* @returns true when interpolation is complete (all values reached their targets)
|
|
26
26
|
*/
|
|
27
27
|
update(t = 1 / 60) {
|
|
28
|
-
let
|
|
28
|
+
let s = !1, i = !0;
|
|
29
29
|
this.updateCount++;
|
|
30
|
-
const
|
|
31
|
-
for (let
|
|
32
|
-
const
|
|
33
|
-
Math.abs(
|
|
30
|
+
const u = Math.min(t, 1 / 15), o = this.updateCount === 1 ? 0.7 : 1;
|
|
31
|
+
for (let e = 0; e < this.currentValues.length; e++) {
|
|
32
|
+
const r = this.currentValues[e], a = this.targetValues[e], h = this.velocities[e], p = a - r, g = p * this.options.tension * o, f = h * this.options.friction, d = g - f, l = h + d * u, V = r + l * u;
|
|
33
|
+
Math.abs(p) < this.options.threshold && Math.abs(l) < this.options.threshold * 10 ? this.currentValues[e] !== a && (this.currentValues[e] = a, this.velocities[e] = 0, s = !0) : (i = !1, this.currentValues[e] = V, this.velocities[e] = l, s = !0);
|
|
34
34
|
}
|
|
35
|
-
return
|
|
35
|
+
return s && this.options.onChange(this.currentValues), i && this.options.onComplete(this.currentValues), i;
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* Set new target values for the interpolation to move towards
|
|
@@ -41,16 +41,16 @@ class A {
|
|
|
41
41
|
* to prevent jarring movements when targets change frequently.
|
|
42
42
|
*/
|
|
43
43
|
setTarget(t) {
|
|
44
|
-
const
|
|
45
|
-
this.previousTargetValues = [...this.targetValues], this.targetValues = [...t], this.targetUpdateTime =
|
|
46
|
-
const
|
|
47
|
-
(
|
|
44
|
+
const s = performance.now(), i = s - this.targetUpdateTime;
|
|
45
|
+
this.previousTargetValues = [...this.targetValues], this.targetValues = [...t], this.targetUpdateTime = s, this.updateCount = 0;
|
|
46
|
+
const u = this.previousTargetValues.every(
|
|
47
|
+
(o, e) => o === this.currentValues[e]
|
|
48
48
|
);
|
|
49
|
-
if (
|
|
50
|
-
const
|
|
51
|
-
for (let
|
|
52
|
-
const
|
|
53
|
-
Math.abs(
|
|
49
|
+
if (i < 8 && i > 0 && this.previousTargetValues.length > 0 && !u) {
|
|
50
|
+
const o = Math.min(i / 8, 1);
|
|
51
|
+
for (let e = 0; e < this.targetValues.length; e++) {
|
|
52
|
+
const r = this.previousTargetValues[e] || 0, a = t[e] || 0;
|
|
53
|
+
Math.abs(a - r) > 0.1 && (this.targetValues[e] = r + (a - r) * o);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
for (; this.currentValues.length < t.length; )
|
|
@@ -122,81 +122,37 @@ class A {
|
|
|
122
122
|
this.animationId === null && this.animate();
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
const
|
|
127
|
-
return
|
|
128
|
-
var
|
|
129
|
-
(
|
|
130
|
-
}, [t]),
|
|
131
|
-
var
|
|
132
|
-
(
|
|
133
|
-
}, []), [
|
|
125
|
+
function y(n = [], t = {}) {
|
|
126
|
+
const s = c.useRef(null);
|
|
127
|
+
return s.current || (s.current = new v(n, t)), c.useEffect(() => {
|
|
128
|
+
var i;
|
|
129
|
+
(i = s.current) == null || i.updateOptions(t);
|
|
130
|
+
}, [t]), c.useEffect(() => () => {
|
|
131
|
+
var i;
|
|
132
|
+
(i = s.current) == null || i.destroy();
|
|
133
|
+
}, []), [s.current];
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
C(
|
|
135
|
+
function m(n) {
|
|
136
|
+
C(n, []);
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
|
|
138
|
+
function M(n) {
|
|
139
|
+
m(() => I(n));
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
return
|
|
141
|
+
function U(n) {
|
|
142
|
+
return m(() => {
|
|
143
143
|
let t;
|
|
144
|
-
function
|
|
145
|
-
|
|
144
|
+
function s() {
|
|
145
|
+
n(), t = requestAnimationFrame(s);
|
|
146
146
|
}
|
|
147
|
-
return t = requestAnimationFrame(
|
|
147
|
+
return t = requestAnimationFrame(s), () => {
|
|
148
148
|
cancelAnimationFrame(t);
|
|
149
149
|
};
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
|
-
function j(r, t) {
|
|
153
|
-
const [e] = y(
|
|
154
|
-
() => F({ ...r })
|
|
155
|
-
), n = V(null), o = V(null), u = V(0);
|
|
156
|
-
function i() {
|
|
157
|
-
o.current !== null && (cancelAnimationFrame(o.current), o.current = null);
|
|
158
|
-
}
|
|
159
|
-
function c() {
|
|
160
|
-
const s = n.current;
|
|
161
|
-
if (!s) return;
|
|
162
|
-
const a = performance.now(), m = (a - u.current) / 1e3;
|
|
163
|
-
u.current = a;
|
|
164
|
-
const l = s.update(m);
|
|
165
|
-
I(() => {
|
|
166
|
-
e.joint_position = s.getCurrentValues();
|
|
167
|
-
}), o.current = l ? null : requestAnimationFrame(c);
|
|
168
|
-
}
|
|
169
|
-
function h() {
|
|
170
|
-
o.current === null && (u.current = performance.now(), o.current = requestAnimationFrame(c));
|
|
171
|
-
}
|
|
172
|
-
function g(s) {
|
|
173
|
-
var m;
|
|
174
|
-
const a = s.joint_position.filter(
|
|
175
|
-
(l) => l !== void 0
|
|
176
|
-
);
|
|
177
|
-
(m = n.current) == null || m.setTarget(a), I(() => {
|
|
178
|
-
const l = s, f = e;
|
|
179
|
-
for (const p of Object.keys(l))
|
|
180
|
-
p !== "joint_position" && f[p] !== l[p] && (f[p] = l[p]);
|
|
181
|
-
}), h();
|
|
182
|
-
}
|
|
183
|
-
return v(() => {
|
|
184
|
-
const s = r.joint_position.filter(
|
|
185
|
-
(a) => a !== void 0
|
|
186
|
-
);
|
|
187
|
-
return n.current = new A(s, t), () => {
|
|
188
|
-
var a;
|
|
189
|
-
i(), (a = n.current) == null || a.destroy();
|
|
190
|
-
};
|
|
191
|
-
}), C(() => {
|
|
192
|
-
var s;
|
|
193
|
-
t && ((s = n.current) == null || s.updateOptions(t));
|
|
194
|
-
}, [t]), C(() => T(() => g(r)), [r]), e;
|
|
195
|
-
}
|
|
196
152
|
export {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
153
|
+
v as V,
|
|
154
|
+
m as a,
|
|
155
|
+
M as b,
|
|
156
|
+
U as c,
|
|
157
|
+
y as u
|
|
202
158
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const h=require("react"),C=require("mobx");class g{constructor(t=[],s={}){this.currentValues=[],this.targetValues=[],this.previousTargetValues=[],this.targetUpdateTime=0,this.animationId=null,this.updateCount=0,this.velocities=[],this.animate=()=>{this.update(.016666666666666666)?this.animationId=null:this.animationId=requestAnimationFrame(this.animate)},this.options={tension:120,friction:20,threshold:.001,onChange:()=>{},onComplete:()=>{},...s},this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0}update(t=1/60){let s=!1,i=!0;this.updateCount++;const u=Math.min(t,1/15),o=this.updateCount===1?.7:1;for(let e=0;e<this.currentValues.length;e++){const r=this.currentValues[e],a=this.targetValues[e],l=this.velocities[e],m=a-r,d=m*this.options.tension*o,f=l*this.options.friction,V=d-f,c=l+V*u,I=r+c*u;Math.abs(m)<this.options.threshold&&Math.abs(c)<this.options.threshold*10?this.currentValues[e]!==a&&(this.currentValues[e]=a,this.velocities[e]=0,s=!0):(i=!1,this.currentValues[e]=I,this.velocities[e]=c,s=!0)}return s&&this.options.onChange(this.currentValues),i&&this.options.onComplete(this.currentValues),i}setTarget(t){const s=performance.now(),i=s-this.targetUpdateTime;this.previousTargetValues=[...this.targetValues],this.targetValues=[...t],this.targetUpdateTime=s,this.updateCount=0;const u=this.previousTargetValues.every((o,e)=>o===this.currentValues[e]);if(i<8&&i>0&&this.previousTargetValues.length>0&&!u){const o=Math.min(i/8,1);for(let e=0;e<this.targetValues.length;e++){const r=this.previousTargetValues[e]||0,a=t[e]||0;Math.abs(a-r)>.1&&(this.targetValues[e]=r+(a-r)*o)}}for(;this.currentValues.length<t.length;)this.currentValues.push(t[this.currentValues.length]),this.velocities.push(0);this.currentValues.length>t.length&&(this.currentValues=this.currentValues.slice(0,t.length),this.velocities=this.velocities.slice(0,t.length))}getCurrentValues(){return[...this.currentValues]}getValue(t){return this.currentValues[t]??0}isInterpolating(){return this.animationId!==null}stop(){this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null)}setImmediate(t){this.stop(),this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0,this.options.onChange(this.currentValues)}updateOptions(t){this.options={...this.options,...t}}startAutoInterpolation(){this.startInterpolation()}destroy(){this.stop()}startInterpolation(){this.animationId===null&&this.animate()}}function v(n=[],t={}){const s=h.useRef(null);return s.current||(s.current=new g(n,t)),h.useEffect(()=>{var i;(i=s.current)==null||i.updateOptions(t)},[t]),h.useEffect(()=>()=>{var i;(i=s.current)==null||i.destroy()},[]),[s.current]}function p(n){h.useEffect(n,[])}function T(n){p(()=>C.autorun(n))}function A(n){return p(()=>{let t;function s(){n(),t=requestAnimationFrame(s)}return t=requestAnimationFrame(s),()=>{cancelAnimationFrame(t)}})}exports.ValueInterpolator=g;exports.useAnimationFrame=A;exports.useAutorun=T;exports.useInterpolation=v;exports.useMounted=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const E=require("@wandelbots/nova-js"),u=require("mobx"),et=require("./json-Bd6uGfgP.cjs"),p=require("./PoseTransformer-2QIzECOZ.cjs"),R=require("@wandelbots/nova-js/v2"),O=require("lodash-es"),M=require("./JoggingRefusedError-DqyrfUcc.cjs"),H=require("./RobotActivation-CRVxXvlx.cjs"),C=require("./poseText-CwplkbDM.cjs");function wt({currentTcpPose:s,axis:t,direction:e,motion:o,useToolCoordinateSystem:i,coordinateSystemRotation:n}){const r=e==="-"?-1:1;if(o.type==="translate"){if(!s.position)throw new Error("Current pose has no position, cannot perform translation");let d=p.vectorAlongAxis(t,o.distanceMm*r);if(i){if(!s.orientation)throw new Error("Current pose has no orientation, cannot translate relative to tool");d=p.rotateVector(d,p.quaternionOfOrientation(s.orientation,"ROTATION_VECTOR"))}else n&&(d=p.rotateVector(d,n));const g=[...s.position];return g[0]=(g[0]??0)+d[0],g[1]=(g[1]??0)+d[1],g[2]=(g[2]??0)+d[2],{position:g,orientation:s.orientation}}if(!s.orientation)throw new Error("Current pose has no orientation, cannot perform rotation");const l=p.quaternionOfOrientation(s.orientation,"ROTATION_VECTOR");let h=p.vectorAlongAxis(t,1);!i&&n&&(h=p.rotateVector(h,n));const c=p.quaternionOfAxisAngle(h,o.distanceRads*r),a=i?p.multiplyQuaternions(l,c):p.multiplyQuaternions(c,l);return{position:s.position,orientation:p.rotationVectorOfQuaternion(a)}}function J(s,t,e){return t.length!==s.length?!1:it(s,t,e)}function ot(s,t,e){return t.length!==s.length?!0:it(s,t,e)}function it(s,t,e){for(let o=0;o<t.length;o++)if(Math.abs((t[o]??0)-(s[o]??0))>e)return!1;return!0}function st(s,t,e){if(s===void 0&&t||s&&t===void 0||(s==null?void 0:s.orientation)===void 0||(t==null?void 0:t.orientation)===void 0||(s==null?void 0:s.position)===void 0||(t==null?void 0:t.position)===void 0)return!1;if(s===void 0||t===void 0)return!0;let o=0;return o+=Math.abs(s.orientation[0]-t.orientation[0]),o+=Math.abs(s.orientation[1]-t.orientation[1]),o+=Math.abs(s.orientation[2]-t.orientation[2]),o+=Math.abs(s.position[0]-t.position[0]),o+=Math.abs(s.position[1]-t.position[1]),o+=Math.abs(s.position[2]-t.position[2]),o<=e}function nt(s,t,e){return s.coordinate_system===t.coordinate_system&&s.tcp===t.tcp&&st(s.tcp_pose,t.tcp_pose,e)}function q(s,t){const[e=0,o=0,i=0]=t,n=[e,o,i],[r=0,l=0,h=0]=s,c=[r,l,h],a=p.vectorLength(n),d=p.normalizeVector(n);let g=p.vectorLength(c),S=p.normalizeVector(c);p.dotVectors(S,d)<0&&(g=-g,S=p.scaleVector(S,-1));let f=g-a;return f-=2*Math.PI*Math.floor((f+Math.PI)/(2*Math.PI)),g=a+f,p.scaleVector(S,g)}const bt=2e-4;function rt(s){const{joint_position:t,tcp_pose:e,tcp:o,coordinate_system:i}=s;return{joint_position:t,tcp_pose:e,tcp:o,coordinate_system:i}}function at(s,t){return s.tcp===t.tcp&&s.coordinate_system===t.coordinate_system&&s.tcp_pose===void 0==(t.tcp_pose===void 0)&&J(s.joint_position,t.joint_position,bt)}const K=1e-4;class D{constructor(t,e,o,i,n,r,l="cell",h={}){this.controller=e,this.motionGroup=o,this.description=i,this.initialMotionState=n,this.motionStateSocket=r,this.cellId=l,this.nova=p.createNovaClient(t),this.logger=h.logger??console,this.rapidlyChangingMotionState=n,r.addEventListener("message",c=>{var S;const a=(S=E.tryParseJson(c.data))==null?void 0:S.result;if(!a)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${c.data}`);nt(this.rapidlyChangingMotionState,a,K)||u.runInAction(()=>{var f,_,m;this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=a.tcp_pose:(f=a.tcp_pose)!=null&&f.orientation&&((_=a.tcp_pose)!=null&&_.position)&&((m=this.rapidlyChangingMotionState.tcp_pose)!=null&&m.orientation)?this.rapidlyChangingMotionState.tcp_pose={position:a.tcp_pose.position,orientation:q(a.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation)}:this.logger.debug("Received incomplete tcp_pose, ignoring",{tcpPose:a.tcp_pose})}),ot(this.rapidlyChangingMotionState.joint_position,a.joint_position,K)||u.runInAction(()=>{this.rapidlyChangingMotionState.joint_position=a.joint_position}),a.tcp!==void 0&&this.rapidlyChangingMotionState.tcp!==a.tcp&&u.runInAction(()=>{this.rapidlyChangingMotionState.tcp=a.tcp}),this.rapidlyChangingMotionState.standstill!==a.standstill&&u.runInAction(()=>{this.rapidlyChangingMotionState.standstill=a.standstill});const d=this.rapidlyChangingMotionState.joint_limit_reached.limit_reached,g=a.joint_limit_reached.limit_reached;d.some((f,_)=>f!==g[_])&&u.runInAction(()=>{this.rapidlyChangingMotionState.joint_limit_reached=a.joint_limit_reached}),this.rapidlyChangingMotionState.execute!==a.execute&&u.runInAction(()=>{this.rapidlyChangingMotionState.execute=a.execute})}),u.makeAutoObservable(this,{logger:!1,readoutState:u.computed({equals:at,keepAlive:!0})})}static async open(t,e,o={}){var _;const i=p.createNovaClient(t),n=o.cellId??p.cellIdOf(t)??"cell",[r,l]=e.split("@"),h=await i.api.controller.getCurrentRobotControllerState(n,l),c=h==null?void 0:h.motion_groups.find(m=>m.motion_group===e);if(!h||!c)throw new Error(`Controller ${l} or motion group ${e} not found`);const a=i.openReconnectingWebsocket(`/cells/${n}/controllers/${l}/motion-groups/${e}/state-stream`),d=await a.firstMessage(),g=(_=E.tryParseJson(d.data))==null?void 0:_.result;if(!g)throw new Error(`Unable to parse initial motion state message ${d.data}`);const S=o.logger??console;S.info("Connected motion state websocket to motion group",{motionGroup:c.motion_group,initialMotionState:g});const f=await i.api.motionGroup.getMotionGroupDescription(n,l,c.motion_group);return new D(i,h,c,f,g,a,n,{logger:S})}get readoutState(){return rt(this.rapidlyChangingMotionState)}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get joints(){return this.initialMotionState.joint_position.map((t,e)=>({index:e}))}dispose(){this.motionStateSocket.close()}}const Y="Movement request rejected. Another client is currently executing a 'Jogging' motion!",Ot=1,Rt=5e3;function Ct(s){var e;return(((e=s.times)==null?void 0:e[s.times.length-1])??0)*2e3+Rt}class ${constructor(t,e={}){this.motionStream=t,this.options=e,this.DEFAULT_MODE="off",this.DEFAULT_TCP="Flange",this.NO_TCP=void 0,this.DEFAULT_INIT_TIMEOUT=5e3,this.DEFAULT_ORIENTATION="coordsys",this.mode="off",this.joggingSocket=null,this.trajectorySocket=null,this.timeout=this.DEFAULT_INIT_TIMEOUT,this.incrementalMotionInFlight=!1,this.ownsMotionStream=!1,this.tcp=(e==null?void 0:e.tcp)||t.motionGroup.tcp||this.getDefaultTcp(t),this.coordinateSystem=e==null?void 0:e.coordinateSystem,this.orientation=(e==null?void 0:e.orientation)||this.DEFAULT_ORIENTATION,this.timeout=(e==null?void 0:e.timeout)||this.DEFAULT_INIT_TIMEOUT,this.mode=(e==null?void 0:e.mode)||this.DEFAULT_MODE,this.onError=e==null?void 0:e.onError,this.logger=(e==null?void 0:e.logger)??console}static async open(t,e,o={}){const i=await D.open(t,e,{cellId:o.cellId,logger:o.logger}),n=new $(i,o);n.ownsMotionStream=!0;try{await n.setJoggingMode(n.mode)}catch(r){throw n.dispose(),r}return n}getDefaultTcp(t){var o,i;const e=(i=(o=t.description.dh_parameters)==null?void 0:o[0])==null?void 0:i.type;return t.joints.length<6&&(e===R.JointTypeEnum.RevoluteJoint||e===R.JointTypeEnum.PrismaticJoint)?this.NO_TCP:this.DEFAULT_TCP}async setOptions(t){return t.tcp&&(this.tcp=t.tcp),t.orientation&&(this.orientation=t.orientation),"coordinateSystem"in t&&(this.coordinateSystem=t.coordinateSystem),t.timeout&&(this.timeout=t.timeout),t.mode&&(this.mode=t.mode),t.onError&&(this.onError=t.onError),this.setJoggingMode(this.mode,!1)}get motionGroupId(){return this.motionStream.motionGroupId}get nova(){return this.motionStream.nova}get cellId(){return this.motionStream.cellId}get numJoints(){return this.motionStream.joints.length}async stop(){if(this.joggingSocket){const t=new Array(this.numJoints).fill(0);this.joggingSocket.sendJson({message_type:"JointVelocityRequest",velocity:t})}this.trajectorySocket&&this.trajectorySocket.sendJson({message_type:"PauseMovementRequest"})}async dispose(){const t=this.closeJoggingSockets();return this.ownsMotionStream&&this.motionStream.dispose(),t}closeJoggingSockets(){var e,o;(e=this.endJoggingInit)==null||e.call(this),(o=this.endIncrementalMotion)==null||o.call(this);const t=[this.joggingSocket,this.trajectorySocket].filter(i=>i!==null);return t.forEach(i=>{i.dispose()}),this.joggingSocket=null,this.trajectorySocket=null,Promise.all(t.map(i=>i.closed()))}async setJoggingMode(t,e=!0){if(!(this.mode===t&&e)&&(this.closeJoggingSockets(),this.mode=t,this.mode==="jogging"))return this.initializeJoggingWebsocket()}async initializeJoggingWebsocket(){return new Promise((t,e)=>{const o=this.nova.openReconnectingWebsocket(`/cells/${this.cellId}/controllers/${this.motionStream.controllerId}/execution/jogging`);this.joggingSocket=o;let i=!1;const n=setTimeout(()=>{r(new Error(`Jogging initialization timeout after ${this.timeout} ms`))},this.timeout),r=c=>{i||(i=!0,clearTimeout(n),o.removeEventListener("close",h),this.endJoggingInit===l&&(this.endJoggingInit=void 0),c?e(c):t())},l=()=>r(),h=()=>{o.disposed&&r()};this.endJoggingInit=l,o.addEventListener("close",h),o.addEventListener("message",c=>{var d,g,S;const a=E.tryParseJson(c.data);if(((d=a==null?void 0:a.result)==null?void 0:d.kind)==="INITIALIZE_RECEIVED"){r();return}if(((g=a==null?void 0:a.result)==null?void 0:g.kind)==="MOTION_ERROR")if(this.onBlocked&&((S=a==null?void 0:a.result)!=null&&S.message.includes(Y))){r(),o.dispose(),this.onBlocked();return}else this.onError?(r(),this.onError(c.data)):r(new Error(c.data))}),o.sendJson({message_type:"InitializeJoggingRequest",motion_group:this.motionGroupId,...this.tcp?{tcp:this.tcp}:{}})})}async rotateJoints({joint:t,direction:e,velocityValue:o,velocityUnit:i}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Joint jogging websocket not connected; create one by setting jogging mode to 'jogging'");const n=new Array(this.numJoints).fill(0);n[t]=e==="-"?-o:o,this.joggingSocket.sendJson({message_type:"JointVelocityRequest",velocity:n})}async translateTCP({axis:t,direction:e,velocityMmPerSec:o}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'");this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:this.velocityAlongAxis(t,e==="-"?-o:o),rotation:[0,0,0],use_tool_coordinate_system:this.orientation==="tool"})}async rotateTCP({axis:t,direction:e,velocityRadsPerSec:o}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'");this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:[0,0,0],rotation:this.velocityAlongAxis(t,e==="-"?-o:o),use_tool_coordinate_system:this.orientation==="tool"})}get coordinateSystemRotation(){if(!(this.orientation==="tool"||!this.coordinateSystem))return p.poseOfFrame(this.coordinateSystem).quaternion}velocityAlongAxis(t,e){const o=p.vectorAlongAxis(t,e),i=this.coordinateSystemRotation;return i?p.rotateVector(o,i):o}async runIncrementalCartesianMotion(t){if(this.mode!=="trajectory")throw new Error("Set jogging mode to 'trajectory' to run incremental cartesian motions");if(!this.incrementalMotionInFlight){this.incrementalMotionInFlight=!0;try{const e=await this.planIncrementalCartesianMotion(t);e&&await this.executeTrajectory(e,t.refusedReason)}finally{this.incrementalMotionInFlight=!1}}}async planIncrementalCartesianMotion({currentTcpPose:t,currentJoints:e,velocityInRelevantUnits:o,axis:i,direction:n,motion:r}){var _,m,y;const l=[],h=wt({currentTcpPose:t,axis:i,direction:n,motion:r,useToolCoordinateSystem:this.orientation==="tool",coordinateSystemRotation:this.coordinateSystemRotation});l.push({limits_override:r.type==="translate"?{tcp_velocity_limit:o}:{tcp_orientation_velocity_limit:o},path:{path_definition_name:"PathLine",target_pose:{position:h.position,orientation:h.orientation}}});const c=this.motionStream.description;if(c.cycle_time===void 0){this.logger.warn("Current motion group has no cycle time, cannot plan jogging motion");return}const a=this.motionStream.rapidlyChangingMotionState.tcp,d=a?(m=(_=c.tcps)==null?void 0:_[a])==null?void 0:m.pose:void 0,g={motion_group_model:((y=this.options)==null?void 0:y.motionGroupModel)??c.motion_group_model,cycle_time:c.cycle_time,mounting:c.mounting,tcp_offset:d,global:c.operation_limits.auto_limits},S=await this.nova.api.trajectoryPlanning.planTrajectory(this.cellId,{motion_group_setup:g,start_joint_position:e,motion_commands:l}),f=S.response;if(!f)throw new Error(`Failed to plan jogging increment motion ${JSON.stringify(S)}`);if("error_feedback"in f){if(this.onError){this.onError(f);return}throw new Error(`Failed to plan jogging increment motion: ${JSON.stringify(f.error_feedback)}`)}return f}async executeTrajectory(t,e=()=>null){const o=e();if(o)throw new M.JoggingRefusedError(o);const i=this.nova.openReconnectingWebsocket(`/cells/${this.cellId}/controllers/${this.motionStream.controllerId}/execution/trajectory`);this.trajectorySocket=i;const n=new AbortController;let r,l;try{await new Promise((h,c)=>{let a=!1;const d=()=>{a||(a=!0,h())},g=m=>{if(!a){if(a=!0,this.onError){this.onError(m),h();return}c(m instanceof Error?m:new Error(`Failed to execute trajectory: ${JSON.stringify(m)}`))}},S=()=>{const m=e();return m?(a||(a=!0,c(new M.JoggingRefusedError(m))),!0):!1};l=d,this.endIncrementalMotion=d;const f=Ct(t);r=setTimeout(()=>{g(new Error(`Jogging motion did not complete within ${f}ms`))},f),i.addEventListener("message",m=>{var w,b;const y=(w=E.tryParseJson(m.data))==null?void 0:w.result;if(!(y!=null&&y.kind)){g(new Error(`Failed to execute trajectory: Received invalid message ${m.data}`));return}if(this.onBlocked&&((b=y.message)!=null&&b.includes(Y))){this.onBlocked(),d();return}if(y.kind==="INITIALIZE_RECEIVED"){if(y.add_trajectory_error||y.message){g(y);return}if(S())return;i.sendJson({message_type:"StartMovementRequest",direction:"DIRECTION_FORWARD"})}else if(y.kind==="START_RECEIVED"){if(y.message){g(y);return}this.waitForMotionToFinish(t,n.signal).then(d,g)}else y.kind==="PAUSE_RECEIVED"?this.waitUntilStopped(n.signal).then(d,g):y.kind==="MOTION_ERROR"&&y.message?g(y):g(new Error(`Failed to execute trajectory, cannot handle message type "${y.kind}"`))});const _=()=>{S()||i.sendJson({message_type:"InitializeMovementRequest",trajectory:{message_type:"TrajectoryData",motion_group:this.motionGroupId,data:t,tcp:this.tcp}})};if(i.readyState===Ot)_();else{const m=()=>{i.removeEventListener("open",m),_()};i.addEventListener("open",m)}})}finally{clearTimeout(r),n.abort(),this.endIncrementalMotion===l&&(this.endIncrementalMotion=void 0),i.dispose(),this.trajectorySocket===i&&(this.trajectorySocket=null)}}async waitForMotionToFinish(t,e){const{locations:o}=t,i=(((o==null?void 0:o[0])??0)+((o==null?void 0:o[o.length-1])??0))/2,n=()=>{const r=this.executedTrajectory;return(r==null?void 0:r.state.kind)==="END_OF_TRAJECTORY"&&r.location>=i};await u.when(()=>this.isTrajectoryRunning||n(),{signal:e}),await this.waitUntilStopped(e)}async waitUntilStopped(t){await u.when(()=>!this.isTrajectoryRunning&&this.motionStream.rapidlyChangingMotionState.standstill,{signal:t})}get executedTrajectory(){var e;const t=(e=this.motionStream.rapidlyChangingMotionState.execute)==null?void 0:e.details;return(t==null?void 0:t.kind)==="TRAJECTORY"?t:void 0}get isTrajectoryRunning(){var e;const t=(e=this.executedTrajectory)==null?void 0:e.state.kind;return t==="RUNNING"||t==="WAIT_FOR_IO"}}function ct(s){var t,e,o,i,n;if(typeof s=="string"){const r=E.tryParseJson(s);return r?ct(r):s}if(s&&typeof s=="object"){const r=s;return((t=r.error_feedback)==null?void 0:t.error_feedback_name)||((e=r.add_trajectory_error)==null?void 0:e.message)||r.message||((i=(o=r.result)==null?void 0:o.add_trajectory_error)==null?void 0:i.message)||((n=r.result)==null?void 0:n.message)||"Jogging motion failed"}return"Jogging motion failed"}const Pt=[{pattern:/^FeedbackSingularity$/,translationKey:"Jogging.StreamStateSection.Error.Singularity.lb"},{pattern:/^FeedbackJointLimitExceeded$/,translationKey:"Jogging.StreamStateSection.Error.JointLimit.lb"},{pattern:/^FeedbackOutOfWorkspace$/,translationKey:"Jogging.StreamStateSection.Error.OutOfWorkspace.lb"},{pattern:/^FeedbackCollision$/,translationKey:"Jogging.StreamStateSection.Error.Collision.lb"},{pattern:/^FeedbackNoSolutionInCurrentConfiguration$/,translationKey:"Jogging.StreamStateSection.Error.NoSolutionInConfiguration.lb"},{pattern:/^Feedback\w+$/,translationKey:"Jogging.StreamStateSection.Error.PlanningFailed.lb"}];function At(s){var t;return((t=Pt.find(({pattern:e})=>e.test(s)))==null?void 0:t.translationKey)??null}const kt=5,Jt=250;function Dt(s){var o,i,n,r;const t=[(i=(o=s==null?void 0:s.manual_t1_limits)==null?void 0:o.tcp)==null?void 0:i.velocity,(r=(n=s==null?void 0:s.manual_limits)==null?void 0:n.tcp)==null?void 0:r.velocity].filter(l=>typeof l=="number"&&Number.isFinite(l)&&l>0);return Math.min(Jt,...t)/10}const U=[{id:"0.1",mm:.1,degrees:.05},{id:"1",mm:1,degrees:.5},{id:"5",mm:5,degrees:2.5},{id:"10",mm:10,degrees:5}],Lt=[{id:"continuous"},...U],Ft=["coordsys","tool"],Q="joggingToolStore",z={code:"locked"},Nt=()=>typeof localStorage>"u"?void 0:localStorage;class k{constructor(t,e,o,i,n,r={}){var h,c,a;this.jogger=t,this.coordSystems=e,this.motionGroupDescription=o,this.tcps=i,this.inverseSolverValue=n,this.selectedTabId="cartesian",this.locks=new Set,this.blocked=!1,this.selectedCoordSystemId="world",this.jogCoordSystemId="world",this.selectedTcpId="",this.tcpChangeInProgress=!1,this.selectedOrientation="coordsys",this.selectedIncrementId="continuous",this.selectedCartesianMotionType="translate",this.incrementJogInProgress=null,this.lastJogError=null,this.onBeforeActivate=null,this.rotationVelocityDegPerSec=kt,this.minTranslationVelocityMmPerSec=1,this.maxTranslationVelocityMmPerSec=250,this.minRotationVelocityDegPerSec=1,this.maxRotationVelocityDegPerSec=60,this.showCoordSystemSelect=!1,this.showTcpSelect=!0,this.showOrientationSelect=!0,this.showIncrementSelect=!0,this.showTabIcons=!1,this.showVelocitySliderLabel=!0,this.showVelocityLegend=!1,this.showJointsLegend=!1,this.disposers=[],this.inverseSolver=void 0,this.jointType=R.JointTypeEnum.RevoluteJoint,this.jogPress=0,this.stoppedLast=!1,this.runningStep=null,this.disposed=!1,this.endHeldJogWatch=null,this.storage=r.storage??Nt(),this.notMoveableReason=r.notMoveableReason;for(const d of e)if(d.coordinate_system===""){d.coordinate_system="world";break}this.selectedCoordSystemId=((h=e[0])==null?void 0:h.coordinate_system)||"world",this.jogCoordSystemId=this.selectedCoordSystemId,this.selectedTcpId=t.motionStream.rapidlyChangingMotionState.tcp??"",this.tcpChangeInProgress=this.tcps.length>0&&!this.selectedTcpId,this.inverseSolver=n,this.translationVelocityMmPerSec=Dt(o==null?void 0:o.operation_limits),this.jointType=((a=(c=o==null?void 0:o.dh_parameters)==null?void 0:c[0])==null?void 0:a.type)??R.JointTypeEnum.RevoluteJoint,u.makeAutoObservable(this,{storage:!1,notMoveableReason:!1,jogPress:!1,stoppedLast:!1,runningStep:!1,endHeldJogWatch:!1},{autoBind:!0}),this.jogger.onBlocked=()=>{this.block()};const l=this.jogger.onError;this.jogger.onError=d=>{this.setLastJogError(ct(d)),l==null||l(d)},this.loadFromLocalStorage(),this.disposers.push(u.autorun(()=>this.saveToLocalStorage())),this.disposers.push(u.autorun(()=>{const d=this.jogger.motionStream.rapidlyChangingMotionState.tcp;d&&d!==this.selectedTcpId&&u.runInAction(()=>{this.selectedTcpId=d,this.tcpChangeInProgress=!1})}))}static async loadFor(t,e={}){const{nova:o,cellId:i}=t,[n,r]=await Promise.all([o.api.controller.listCoordinateSystems(i,t.motionStream.controllerId,"ROTATION_VECTOR"),o.api.motionGroup.getMotionGroupDescription(i,t.motionStream.controllerId,t.motionGroupId)]),l=await o.api.motionGroupModels.getMotionGroupKinematicModel(r.motion_group_model);return k.create(t,{coordinateSystems:n||[],description:r,kinematicModel:l},e)}static create(t,e,o={}){const{coordinateSystems:i,description:n,kinematicModel:r}=e,l=Object.entries(n.tcps||{}).map(([h,c])=>({id:h,readable_name:c.name,position:c.pose.position,orientation:c.pose.orientation}));return new k(t,i,n,l,r.inverse_solver,o)}dispose(){this.disposed=!0;for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return O.countBy(this.coordSystems,t=>t.name)}async deactivate(){this.jogger.mode==="jogging"&&await this.jogger.setJoggingMode("off")}async activate(){return this.currentTab.id!=="cartesian"?this.activateFor("joint"):this.activateFor(this.activeDiscreteIncrement?"cartesianStep":"cartesian")}async activateFor(t,e){var o;return this.refuseUnlessJoggable(e),this.lastJogError=null,await((o=this.onBeforeActivate)==null?void 0:o.call(this)),this.refuseUnlessJoggable(e),t!=="joint"&&((this.jogger.tcp!==this.selectedTcpId||this.jogger.orientation!==this.selectedOrientation)&&await this.jogger.setOptions({tcp:this.selectedTcpId||void 0,orientation:this.selectedOrientation}),this.jogger.coordinateSystem=this.jogCoordSystem),t==="cartesianStep"?await this.jogger.setJoggingMode("trajectory"):await this.openJoggingWebsocket(),this.jogger}async openJoggingWebsocket(t=!1){this.refuseUnlessJoggable(),t?await this.jogger.setJoggingMode("jogging",!1):await this.jogger.setJoggingMode("jogging");try{this.refuseUnlessJoggable()}catch(e){throw await this.deactivate(),e}}async claimForJogging(){await this.openJoggingWebsocket()}refuseUnlessJoggable(t){const e=this.refusedReason(t);if(e)throw new M.JoggingRefusedError(e)}refusedReason(t){var o;if(this.disposed)return{code:"disconnected"};const e=((o=this.notMoveableReason)==null?void 0:o.call(this))??null;if(e)return e;if(this.blocked)return{code:"blocked"};for(const i of this.locks)if(i!==t)return{code:"locked"};return null}async startCartesianJogging(t,e,o){await this.openForHeldJog("cartesian")&&(t==="translate"?await this.jogger.translateTCP({axis:e,direction:o,velocityMmPerSec:this.translationVelocityMmPerSec}):await this.jogger.rotateTCP({axis:e,direction:o,velocityRadsPerSec:this.rotationVelocityRadsPerSec}),this.watchHeldJog())}async startJointJogging(t,e){if(!await this.openForHeldJog("joint"))return;const o=this.jointType===R.JointTypeEnum.PrismaticJoint;await this.jogger.rotateJoints({joint:t,direction:e,velocityUnit:o?"mm/s":"rad/s",velocityValue:o?this.translationVelocityMmPerSec:this.rotationVelocityRadsPerSec}),this.watchHeldJog()}watchHeldJog(){var o;(o=this.endHeldJogWatch)==null||o.call(this);const t=u.reaction(()=>this.refusedReason(),i=>{i&&this.stopJogging().catch(n=>{console.error("Failed to stop jogging:",n)})}),e=()=>{t(),this.endHeldJogWatch===e&&(this.endHeldJogWatch=null)};this.endHeldJogWatch=e}async openForHeldJog(t){const e=++this.jogPress;this.stoppedLast=!1;try{await this.activateFor(t)}catch(o){throw(e===this.jogPress||this.stoppedLast)&&await this.deactivate().catch(()=>{}),o}return e===this.jogPress?!0:(this.stoppedLast&&await this.deactivate(),!1)}async stopJogging(){var e;const t=++this.jogPress;this.stoppedLast=!0,(e=this.endHeldJogWatch)==null||e.call(this),this.runningStep||await this.jogger.stop(),t===this.jogPress&&await this.deactivate()}async runIncrementalCartesianJog(t,e,o,i){this.refuseUnlessJoggable(),await this.withOwnLock(async n=>{const r=this.watchStep(n);try{const l=await this.activateFor("cartesianStep",n),h=l.motionStream.rapidlyChangingMotionState;if(!h.tcp_pose)return;this.setCurrentIncrementJog({axis:e,direction:o}),await l.runIncrementalCartesianMotion({currentTcpPose:h.tcp_pose,currentJoints:h.joint_position,velocityInRelevantUnits:t==="translate"?this.translationVelocityMmPerSec:this.rotationVelocityRadsPerSec,axis:e,direction:o,motion:t==="translate"?{type:"translate",distanceMm:i.mm}:{type:"rotate",distanceRads:E.degreesToRadians(i.degrees)},refusedReason:r.refusedReason})}catch(l){if(r.stoppedByStarter()&&l instanceof M.JoggingRefusedError)return;throw l}finally{r.end(),this.setCurrentIncrementJog(null),await this.deactivate()}})}async stopIncrementalJog(t){const e=this.runningStep;e&&(e.stop(t),await e.over)}watchStep(t){let e=null,o=()=>{};const i={stop:(r=z)=>{e||(e=r,this.jogger.stop().catch(l=>{console.error("Failed to stop the step:",l)}))},over:new Promise(r=>{o=r})};this.runningStep=i;const n=u.reaction(()=>this.refusedReason(t),r=>{r&&i.stop(r)});return{refusedReason:()=>e??this.refusedReason(t),stoppedByStarter:()=>e===z,end:()=>{n(),this.runningStep===i&&(this.runningStep=null),o()}}}loadFromLocalStorage(){var o;const t=(o=this.storage)==null?void 0:o.getItem(Q),e=t?E.tryParseJson(t):void 0;e&&(this.tabsById[e.selectedTabId]&&(this.selectedTabId=e.selectedTabId),this.coordSystemsById[e.selectedCoordSystemId]&&(this.selectedCoordSystemId=e.selectedCoordSystemId),this.coordSystemsById[e.jogCoordSystemId]&&(this.jogCoordSystemId=e.jogCoordSystemId),this.incrementOptionsById[e.selectedIncrementId]&&(this.selectedIncrementId=e.selectedIncrementId),["translate","rotate"].includes(e.selectedCartesianMotionType)&&(this.selectedCartesianMotionType=e.selectedCartesianMotionType),["coordsys","tool"].includes(e.selectedOrientation)&&(this.selectedOrientation=e.selectedOrientation))}saveToLocalStorage(){var t;(t=this.storage)==null||t.setItem(Q,JSON.stringify(this.localStorageSave))}get isLocked(){return this.locks.size>0}get lastJogErrorTranslationKey(){return this.lastJogError?At(this.lastJogError):null}get localStorageSave(){return{selectedTabId:this.selectedTabId,selectedCoordSystemId:this.selectedCoordSystemId,jogCoordSystemId:this.jogCoordSystemId,selectedOrientation:this.selectedOrientation,selectedIncrementId:this.selectedIncrementId,selectedCartesianMotionType:this.selectedCartesianMotionType}}get canJogCartesian(){return this.inverseSolver!==null}get tabs(){const t=[{id:"joint",label:"Joints"}];return this.canJogCartesian&&t.unshift({id:"cartesian",label:"Cartesian"}),t}get incrementOptions(){return Lt}get discreteIncrementOptions(){return U}get incrementOptionsById(){return O.keyBy(this.incrementOptions,t=>t.id)}get tabsById(){return O.keyBy(this.tabs,t=>t.id)}get currentTab(){return this.tabsById[this.selectedTabId]||this.tabs[0]}get tabIndex(){return this.tabs.indexOf(this.currentTab)}get coordSystemsById(){return O.keyBy(this.coordSystems,t=>t.coordinate_system)}get activeCoordSystemId(){return this.selectedOrientation==="tool"?"tool":this.selectedCoordSystemId}get jogCoordSystem(){return p.resolveCoordinateSystemInWorld(this.jogCoordSystemId,this.coordSystems)}get tcpPoseInSelectedCoordSystem(){const{tcp_pose:t,coordinate_system:e}=this.jogger.motionStream.readoutState;return!(t!=null&&t.position)||!t.orientation?t:p.transformPoseToCoordinateSystem({pose:{position:t.position,orientation:t.orientation},coordinateSystemId:e||"world"},this.selectedCoordSystemId,this.coordSystems).pose}get tcpsById(){return O.keyBy(this.tcps,t=>t.id)}tcpPoseIn(t,e){const{tcp_pose:o,tcp:i,coordinate_system:n}=this.jogger.motionStream.readoutState,r=this.tcpsById[i||this.selectedTcpId],l=this.tcpsById[t];if(!(!(o!=null&&o.position)||!o.orientation)&&!(!r||!l))try{return p.transformPoseToCoordinateSystem({pose:p.transformPoseToTcp(o,r,l),coordinateSystemId:n||"world"},e,this.coordSystems).pose}catch{return}}get activeDiscreteIncrement(){return U.find(t=>t.id===this.selectedIncrementId)}get rotationVelocityRadsPerSec(){return this.rotationVelocityDegPerSec*Math.PI/180}velocityInDisplayUnits(t){return t?this.rotationVelocityDegPerSec:this.translationVelocityMmPerSec}minVelocityInDisplayUnits(t){return t?this.minRotationVelocityDegPerSec:this.minTranslationVelocityMmPerSec}maxVelocityInDisplayUnits(t){return t?this.maxRotationVelocityDegPerSec:this.maxTranslationVelocityMmPerSec}onTabChange(t,e){const o=this.tabs[e]||this.tabs[0];this.selectedTabId=o.id}setSelectedCoordSystemId(t){this.selectedCoordSystemId=t}setSelectedTcpId(t){this.requestTcpChange(t).catch(e=>{console.error("Failed to change TCP:",e)})}async requestTcpChange(t){var n;if(t===this.selectedTcpId)return;this.refuseUnlessJoggable(),this.tcpChangeInProgress=!0;const e=this.jogger.tcp;let o=!0,i=!1;try{await((n=this.onBeforeActivate)==null?void 0:n.call(this)),o=this.jogger.mode!=="jogging",this.jogger.tcp=t,i=!0,await this.openJoggingWebsocket(!o);let r=await this.waitForTcpConfirmation(t,1e3);o&&await this.jogger.setJoggingMode("off"),r||(r=await this.waitForTcpConfirmation(t,2e3)),u.runInAction(()=>{r?this.selectedTcpId=t:(this.jogger.tcp=e,this.selectedTcpId=this.jogger.motionStream.rapidlyChangingMotionState.tcp??"")})}catch(r){throw i&&o&&await this.jogger.setJoggingMode("off").catch(()=>{}),u.runInAction(()=>{this.jogger.tcp=e,this.selectedTcpId=this.jogger.motionStream.rapidlyChangingMotionState.tcp??""}),r}finally{u.runInAction(()=>{this.tcpChangeInProgress=!1})}}waitForTcpConfirmation(t,e){return new Promise(o=>{const i=setTimeout(()=>{n(),o(!1)},e),n=u.when(()=>this.jogger.motionStream.rapidlyChangingMotionState.tcp===t,()=>{clearTimeout(i),o(!0)})})}setSelectedOrientation(t){this.selectedOrientation=t}setMoveRelativeToSelectedTcp(){this.selectedOrientation="tool"}setMoveRelativeToCoordSystem(t){this.selectedOrientation="coordsys",this.jogCoordSystemId=t}setSelectedIncrementId(t){this.selectedIncrementId=t}setCurrentIncrementJog(t){this.incrementJogInProgress=t}setLastJogError(t){this.lastJogError=t}setVelocityFromSlider(t,e){!Number.isFinite(t)||t<this.minVelocityInDisplayUnits(e)||t>this.maxVelocityInDisplayUnits(e)||(e?this.rotationVelocityDegPerSec=t:this.translationVelocityMmPerSec=t)}setSelectedCartesianMotionType(t){this.selectedCartesianMotionType=t}lock(t){this.locks.add(t)}unlock(t){this.locks.delete(t)}block(){this.blocked=!0}unblock(){if(this.blocked=!1,this.jogger.mode==="jogging"){try{this.refuseUnlessJoggable()}catch{this.deactivate().catch(t=>{console.error("Failed to stop jogging:",t)});return}this.jogger.initializeJoggingWebsocket().catch(t=>{console.error("Failed to initialize jogging:",t)})}}async withMotionLock(t){return this.withOwnLock(()=>t())}async withOwnLock(t){const e=O.uniqueId();this.lock(e);try{return await t(e)}finally{this.unlock(e)}}}const lt=1e-4,Vt=new Set(["timestamp","sequence_number","joint_position","joint_torque","joint_current","flange_pose","tcp_pose","flange_velocity","tcp_velocity"]),$t=1,Z=s=>Array.isArray(s)&&s.length===3&&s.every(t=>typeof t=="number");class dt{constructor(t,e,o,i={}){this.source=t,this.motionGroupId=e,this.lastMessageReceivedAt=Date.now(),this.lastInvalidStateMessage=null,this.connectionQuality="good";const n=o.motion_groups.find(r=>r.motion_group===e);if(!n)throw new Error(`Motion group ${e} not found in initial controller state`);this.isVirtual=i.isVirtual??!1,this.onError=i.onError,this.reconnectsOnFocus=(i.reconnectOnFocus??!0)&&typeof window<"u",this.rapidlyChangingMotionState=n,this.lastValidStateMessage={receivedAt:Date.now(),data:o},u.makeAutoObservable(this,{source:!1,lastMessageReceivedAt:!1,connectionQualityInterval:!1,isVirtual:!1,onError:!1,reconnectsOnFocus:!1,readoutState:u.computed({equals:at,keepAlive:!0})},{autoBind:!0}),this.source.addEventListener("message",this.handleMessage),this.connectionQualityInterval=setInterval(this.updateConnectionQuality,500),this.reconnectsOnFocus&&window.addEventListener("focus",this.handleWindowFocus)}get controllerState(){return this.lastValidStateMessage.data}get readoutState(){return rt(this.rapidlyChangingMotionState)}async nextMotionState(){var o,i;const t=await this.source.nextMessage(),e=(i=(o=this.source.parse(t.data))==null?void 0:o.motion_groups)==null?void 0:i.find(n=>n.motion_group===this.motionGroupId);if(!e)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${t.data}`);return e}setLastInvalidStateMessage(t){this.lastInvalidStateMessage={receivedAt:Date.now(),data:t}}setLastValidStateMessage(t){this.lastValidStateMessage={receivedAt:Date.now(),data:t}}updateRapidlyChangingMotionState(t,e){const o=this.rapidlyChangingMotionState,i=t;for(const n of Object.keys(i))e!=null&&e.has(n)||O.isEqual(o[n],i[n])||(o[n]=i[n]);for(const n of Object.keys(o))e!=null&&e.has(n)||n in i||delete o[n]}setConnectionQuality(t){this.connectionQuality=t}handleWindowFocus(){this.source.reconnect()}updateConnectionQuality(){const t=Date.now()-this.lastMessageReceivedAt,e=this.isVirtual?3e3:1e3,o=this.isVirtual?6e3:3e3;if(t>o){this.source.readyState===$t&&this.source.reconnect(),this.setConnectionQuality("critical");return}if(t>e){this.setConnectionQuality("struggling");return}this.setConnectionQuality("good")}dispose(){this.source.removeEventListener("message",this.handleMessage),clearInterval(this.connectionQualityInterval),this.reconnectsOnFocus&&window.removeEventListener("focus",this.handleWindowFocus),this.setConnectionQuality("critical")}handleMessage(t){var c,a;const e=this.source.parse(t.data);if(!(e!=null&&e.motion_groups)){(c=this.onError)==null||c.call(this,{message:E.makeErrorMessage(t.data),url:this.source.url}),this.setLastInvalidStateMessage(t.data);return}this.lastMessageReceivedAt=Date.now();const o=this.lastValidStateMessage.data;(o.safety_state!==e.safety_state||o.operation_mode!==e.operation_mode||o.mode!==e.mode)&&this.setLastValidStateMessage(e);const i=e.motion_groups.find(d=>d.motion_group===this.motionGroupId);if(!i){(a=this.onError)==null||a.call(this,{message:`Motion group ${this.motionGroupId} not found in controller state: ${JSON.stringify(t.data)}`,url:this.source.url}),this.setLastInvalidStateMessage(t.data);return}const n=!J(this.rapidlyChangingMotionState.joint_position,i.joint_position,lt),r=this.rapidlyChangingMotionState.tcp!==i.tcp;if(!n&&!r){this.updateRapidlyChangingMotionState(i,Vt);return}const l=this.rapidlyChangingMotionState.flange_pose,h=i.flange_pose;if((h==null?void 0:h.orientation)==null||!Z(h.orientation)){const d=h==null?void 0:h.orientation;throw new Error(`Invalid newFlangePose.orientation: expected [number, number, number] (got ${d==null?"null":d.length})`)}if((l==null?void 0:l.orientation)==null||!Z(l.orientation)){const d=l==null?void 0:l.orientation;throw new Error(`Invalid oldFlangePose.orientation: expected [number, number, number] (got ${d==null?"null":d.length})`)}h.orientation=q(h.orientation,l.orientation),this.updateRapidlyChangingMotionState(i)}}const xt=["FeedbackOutOfWorkspace","FeedbackJointLimitExceeded","FeedbackAxisRangeExceeded","FeedbackNoSolutionInCurrentConfiguration"];function ht(s){return s==="FeedbackSingularity"?"Jogging.TargetPose.Error.Singularity.lb":s==="FeedbackCollision"?"Jogging.TargetPose.Error.Collision.lb":xt.includes(s)?"Jogging.TargetPose.Error.NotReachable.lb":"Jogging.TargetPose.Error.PlanningFailed.lb"}function Gt(s){return{get url(){return s.url},get readyState(){return s.readyState},addEventListener:(t,e)=>s.addEventListener(t,e),removeEventListener:(t,e)=>s.removeEventListener(t,e),firstMessage:()=>s.firstMessage(),nextMessage:()=>s.nextMessage(),reconnect:()=>s.reconnect(),close:()=>s.close(),parse:t=>{var e;return(e=et.tryParseJson(t))==null?void 0:e.result}}}function Bt(s,{controllerId:t,cellId:e,responseRateMs:o}){const i=p.createNovaClient(s),n=e??p.cellIdOf(s)??"cell",r=o===void 0?"":`?response_rate=${o}`;return Gt(i.openReconnectingWebsocket(`/cells/${n}/controllers/${t}/state-stream${r}`))}const gt=["motionGroupDescription","controllerConfiguration","kinematicModel","motionGroupModel","coordinateSystems","controllerState","motionStateStream","controllerStateStream"];class W extends Error{constructor(t,e,o){super(o),this.stepId=t,this.cause=e,this.name="RobotLoadStepError"}}function V(s){return s instanceof W}class ut{constructor(t=null,e=null){this.motionGroupId=null,this.controllerId=null,this.steps=[],this.retryAttempt=0,this.fatalError=null,this.currentStepStartedAt=null,this.motionGroupId=t,this.controllerId=e,this.steps=gt.map(o=>({id:o,status:"pending",url:null,error:null})),u.makeAutoObservable(this,{},{autoBind:!0})}beginRetry(t){for(const e of this.steps)e.status="pending",e.url=null,e.error=null;this.retryAttempt=t,this.fatalError=null,this.currentStepStartedAt=null}stepById(t){return this.steps.find(e=>e.id===t)}startStep(t,e){const o=this.stepById(t);o&&(o.status="running",o.url=e,o.error=null,this.currentStepStartedAt=Date.now())}updateStepUrl(t,e){const o=this.stepById(t);o&&(o.url=e)}succeedStep(t){const e=this.stepById(t);e&&(e.status="succeeded",this.currentStepStartedAt=null)}failStep(t,e){const o=this.stepById(t);o&&(o.status="failed",o.error=e,this.currentStepStartedAt=null)}failWith(t){this.fatalError=t,this.currentStepStartedAt=null}get totalCount(){return this.steps.length}get succeededCount(){return this.steps.filter(t=>t.status==="succeeded").length}get runningStep(){return this.steps.find(t=>t.status==="running")}get failedStep(){return this.steps.find(t=>t.status==="failed")}get isFailed(){return this.fatalError!==null||this.failedStep!==void 0}get isComplete(){return this.steps.length>0&&this.steps.every(t=>t.status==="succeeded")}}const Ut=1e4;async function X(s,t,e){let o;s.catch(()=>{});try{return await Promise.race([s,new Promise((i,n)=>{o=setTimeout(()=>n(new Error(e)),t)})])}finally{clearTimeout(o)}}async function qt({nova:s,cellId:t,controllerId:e,motionGroupId:o,progress:i,createStateSource:n,isStale:r=()=>!1,socketTimeoutMs:l=Ut}){let h,c,a=!1;function d(){h==null||h.dispose(),c==null||c.close()}async function g(S,f,_){i.startStep(S,f);try{const m=await _();return i.succeedStep(S),m}catch(m){throw i.failStep(S,m),new W(S,m,E.makeErrorMessage(m))}}try{if(r())return null;const S=`/cells/${t}/controllers/${e}/motion-groups/${o}`,f=`/cells/${t}/controllers/${e}`,_=await g("motionGroupDescription",`${S}/description`,()=>s.api.motionGroup.getMotionGroupDescription(t,e,o));if(r())return null;const{configuration:m}=await g("controllerConfiguration",f,()=>s.api.controller.getRobotController(t,e));if(r())return null;const y={model:_.motion_group_model,serialNumber:_.serial_number},w=y.serialNumber?`?serial_number=${encodeURIComponent(y.serialNumber)}`:"",b=await g("kinematicModel",`/experimental/motion-group-models/${encodeURIComponent(y.model)}/kinematic${w}`,()=>p.getMotionGroupModelResource(s,y.model,y.serialNumber,"kinematic",I=>i.updateStepUrl("kinematicModel",I)));if(r())return null;const L=await g("motionGroupModel",`/experimental/motion-group-models/${encodeURIComponent(y.model)}/description${w}`,()=>p.resolveMotionGroupModelName(s,y.model,y.serialNumber,I=>i.updateStepUrl("motionGroupModel",I)));if(r())return null;const F=await g("coordinateSystems",`${f}/coordinate-systems?orientation_type=ROTATION_VECTOR`,async()=>await s.api.controller.listCoordinateSystems(t,e,"ROTATION_VECTOR")??[]);if(r())return null;const{controllerState:j,motionGroupState:N}=await g("controllerState",`${f}/state`,async()=>{const I=await s.api.controller.getCurrentRobotControllerState(t,e),T=I==null?void 0:I.motion_groups.find(v=>v.motion_group===o);if(!I||!T)throw new Error(`Controller ${e} or motion group ${o} not found`);return{controllerState:I,motionGroupState:T}});if(r())return null;const x=`${S}/state-stream`,{socket:Et,initialMotionState:jt}=await g("motionStateStream",x,async()=>{var A;const I=s.openReconnectingWebsocket(x);h=I;const T=await X(I.firstMessage(),l,`No motion state received from ${x} within ${l/1e3}s`),v=(A=et.tryParseJson(T.data))==null?void 0:A.result;if(!v)throw new Error(`Unable to parse initial motion state message ${T.data}`);return{socket:I,initialMotionState:v}});if(r())return null;const{source:Tt,initialControllerState:vt}=await g("controllerStateStream",`${f}/state`,async()=>{var A;const I=n({cellId:t,controllerId:e});c=I,i.updateStepUrl("controllerStateStream",I.url);const T=await X(I.firstMessage(),l,`No controller state received from ${I.url} within ${l/1e3}s`),v=I.parse(T.data);if(!v)throw new Error(`Unable to parse initial controller state message ${T.data}`);if(!((A=v.motion_groups)!=null&&A.some(Mt=>Mt.motion_group===o)))throw new Error(`Controller state from ${I.url} does not list motion group ${o} yet`);return{source:I,initialControllerState:v}});return r()?null:(a=!0,{motionGroupDescription:_,controllerConfiguration:m,kinematicModel:b,motionGroupModelName:L,coordinateSystems:F,controllerState:j,motionGroupState:N,initialMotionState:jt,motionStateSocket:Et,stateSource:Tt,initialControllerState:vt,dispose:d})}finally{a||d()}}const P=s=>s??[0,0,0],G=(s,t)=>s.length===t.length&&s.every((e,o)=>e===t[o]);function Wt(s,t){return s.type==="joint"?t.type==="joint"&&G(s.joints,t.joints):t.type==="joint"?!1:(s.coordinateSystemId||"world")===(t.coordinateSystemId||"world")&&G(P(s.pose.position),P(t.pose.position))&&G(P(s.pose.orientation),P(t.pose.orientation))}function Ht(s){return s.type==="joint"?{type:"joint",joints:[...s.joints]}:{type:"cartesian",pose:{position:[...P(s.pose.position)],orientation:[...P(s.pose.orientation)]},coordinateSystemId:s.coordinateSystemId}}class pt{constructor(t){this.options=t,this.plannedTrajectory=null,this.trajectoryState="idle",this.lastError=null,this.armed=!1,this.plannedFor=null,this.motion=null,this.releaseOnStart=!1,this.disposed=!1,this.disposers=[],this.logger=t.logger??console,u.makeAutoObservable(this,{socket:!1,disposers:!1,logger:!1,options:!1},{autoBind:!0}),this.socket=this.openSocket(),this.disposers.push(u.reaction(()=>this.executionState,e=>{e==="END_OF_TRAJECTORY"&&(this.motion=null,this.reset())}))}get joggingStore(){return this.options.joggingStore}get jogger(){return this.options.joggingStore.jogger}get motionStream(){return this.options.joggingStore.jogger.motionStream}get holdsExecutionSession(){return this.armed}get isPlanOutdated(){return this.plannedFor!==null&&!Object.is(this.plannedFor.velocity,this.velocityFor(this.plannedFor.target))}targetOf(t){return"motionGroupId"in t?t.motionGroupId!==this.jogger.motionGroupId?null:M.trajectoryTargetOf(t):t}get executionState(){var t,e;return(e=(t=this.motionStream.rapidlyChangingMotionState.execute)==null?void 0:t.details)==null?void 0:e.state.kind}async planTrajectory(t){var b,L,F;const e=this.targetOf(t);if(!e)throw new Error(`Not planning a pose of motion group "${t.motionGroupId}" for motion group "${this.jogger.motionGroupId}"`);await this.dropPlanIfRefused(),this.armed&&!this.plannedTrajectory&&await this.stopAndReset(),await this.ensureMovementOwnership();const o=this.motionStream.rapidlyChangingMotionState.joint_position??[],{cycle_time:i,mounting:n,motion_group_model:r,tcps:l}=this.motionStream.description,h=this.joggingStore.selectedTcpId,c=h?(b=l==null?void 0:l[h])==null?void 0:b.pose:void 0,a={motion_group_model:((L=this.jogger.options)==null?void 0:L.motionGroupModel)??r,cycle_time:i??0,mounting:n,...c&&{tcp_offset:c}},d=this.velocityFor(e);let g;if(e.type==="cartesian"){let j=e.pose;const N=e.coordinateSystemId||"world";if(N!=="world")try{j=p.transformPoseToCoordinateSystem({pose:{position:j.position??[0,0,0],orientation:j.orientation??[0,0,0]},coordinateSystemId:N},"world",this.joggingStore.coordSystems).pose}catch{return await this.dropPlan(),{ok:!1,errorFeedbackName:"FeedbackUnknown"}}g={limits_override:{tcp_velocity_limit:d},path:{target_pose:j,path_definition_name:"PathCartesianPTP"}}}else g={limits_override:{joint_velocity_limits:Array(o.length).fill(d)},path:{target_joint_position:e.joints,path_definition_name:"PathJointPTP"}};u.runInAction(()=>{this.lastError=null,this.trajectoryState="planning"});let S;try{S=await this.jogger.nova.api.trajectoryPlanning.planTrajectory(this.jogger.cellId,{motion_group_setup:a,start_joint_position:o,motion_commands:[g]})}catch(j){throw await this.dropPlan(),j}const f=S.response;if("error_feedback"in f){const j=((F=f.error_feedback)==null?void 0:F.error_feedback_name)??"FeedbackUnknown";return await this.dropPlan(),{ok:!1,errorFeedbackName:j}}const _=f.joint_positions,m=_[0],y=_[_.length-1];if(!m||!y)throw await this.dropPlan(),new Error("Trajectory returned invalid joint positions");const w={message_type:"InitializeMovementRequest",trajectory:{message_type:"TrajectoryData",motion_group:this.jogger.motionGroupId,tcp:h||void 0,data:f}};return await this.dropPlanIfRefused(),this.socket.sendJson(w),u.runInAction(()=>{this.armed=!0,this.plannedTrajectory={startJoints:m,endJoints:y},this.plannedFor={target:Ht(e),velocity:d}}),{ok:!0}}hold(t){if(!this.plannedTrajectory)return!1;if(t){const e=this.targetOf(t);if(!e||!(this.plannedFor&&Wt(e,this.plannedFor.target)))return!1}return this.motion==="starting"?!this.releaseOnStart:this.trajectoryState==="moving"?this.motion==="running":this.trajectoryState!=="planned"||this.motion==="pausing"||this.executionState==="RUNNING"||this.isPlanOutdated||this.refusal()!==null?!1:(this.sendStart(),!0)}async release(){this.motion==="starting"?(this.releaseOnStart=!0,await u.when(()=>this.motion!=="starting")):this.motion==="running"&&this.sendPause(),this.motion==="pausing"&&await this.settlePause()}start(){if(!this.plannedTrajectory)throw new Error("Cannot start trajectory: no planned trajectory exists");if(this.trajectoryState!=="planned")throw new Error(`Cannot start trajectory: expected state "planned", got "${this.trajectoryState}"`);if(this.executionState==="RUNNING")throw new Error("Cannot start trajectory: robot is already running");if(this.motion==="starting")return;const t=this.refusal();if(t)throw new Error(`Cannot start trajectory: ${t}`);this.sendStart()}refusal(){var e,o,i,n;if((o=(e=this.options).isLocked)!=null&&o.call(e))return"the robot is locked";const t=(n=(i=this.options).notMoveableReason)==null?void 0:n.call(i);return t?`the robot may not move (${t.code})`:null}async dropPlanIfRefused(){const t=this.refusal();if(t)throw await this.dropPlan(),new Error(`Cannot plan trajectory: ${t}`)}async pause(){if(this.trajectoryState!=="moving")throw new Error(`Cannot pause trajectory: expected state "moving", got "${this.trajectoryState}"`);this.sendPause(),await this.settlePause()}async stopAndReset(){try{(this.executionState==="RUNNING"||this.trajectoryState==="moving"||this.motion)&&(this.sendPause(),await this.waitUntilStopped())}catch(t){this.logger.warn("Failed to stop trajectory execution cleanly",t)}finally{this.reset(),this.closeSocket(),this.disposed||(this.socket=this.openSocket())}}reset(){this.plannedTrajectory=null,this.plannedFor=null,this.trajectoryState="idle"}async dropPlan(){this.armed?await this.stopAndReset():this.reset()}clearError(){this.lastError=null}dispose(){this.disposed=!0;for(const t of this.disposers)t();this.closeSocket()}velocityFor(t){return t.type==="cartesian"||this.joggingStore.jointType===R.JointTypeEnum.PrismaticJoint?this.joggingStore.translationVelocityMmPerSec:this.joggingStore.rotationVelocityRadsPerSec}async ensureMovementOwnership(){if(this.options.ensureMovementOwnership){await this.options.ensureMovementOwnership();return}this.jogger.mode!=="trajectory"&&(await this.joggingStore.deactivate(),await this.jogger.setJoggingMode("trajectory"))}sendStart(){const t={message_type:"StartMovementRequest",direction:"DIRECTION_FORWARD"};this.socket.sendJson(t),this.motion="starting",this.releaseOnStart=!1}sendPause(){if(this.motion==="pausing")return;const t={message_type:"PauseMovementRequest"};this.socket.sendJson(t),this.motion="pausing"}async settlePause(){await this.waitUntilStopped(),u.runInAction(()=>{this.motion==="pausing"&&(this.motion=null,(this.trajectoryState==="moving"||this.trajectoryState==="stopping")&&(this.trajectoryState=this.plannedTrajectory?"planned":"idle"))})}async waitUntilStopped(){await u.when(()=>this.motionStream.rapidlyChangingMotionState.standstill)}handleMessage(t){var o,i;const e=(o=E.tryParseJson(t.data))==null?void 0:o.result;if(e)switch(e.kind){case"INITIALIZE_RECEIVED":e.add_trajectory_error||e.message?(this.lastError=((i=e.add_trajectory_error)==null?void 0:i.message)??e.message??"NOVA refused the trajectory",this.reset()):this.trajectoryState="planned";break;case"START_RECEIVED":this.motion="running",this.trajectoryState="moving",this.releaseOnStart&&(this.releaseOnStart=!1,this.sendPause(),this.settlePause());break;case"PAUSE_RECEIVED":this.trajectoryState==="moving"&&(this.trajectoryState="stopping");break;case"MOTION_ERROR":this.lastError=e.message,this.motion==="starting"&&(this.motion=null),this.reset();break}}openSocket(){const t=this.jogger.nova.openReconnectingWebsocket(`/cells/${this.jogger.cellId}/controllers/${this.motionStream.controllerId}/execution/trajectory`);return t.addEventListener("message",this.handleMessage),t}closeSocket(){this.socket.removeEventListener("message",this.handleMessage),this.socket.dispose(),this.armed=!1,this.motion=null}}const Kt={a:0,d:0,alpha:0,theta:0,reverse_rotation_direction:!1};class mt{constructor(t,e,o,i,n){this.motionGroupDescription=t,this.controllerConfiguration=e,this.kinematicModel=o,this.resolvedMotionGroupModel=i,this.coordinateSystems=n,this.dhParameters=(t.dh_parameters??[]).map(r=>({...Kt,...r}))}get isVirtual(){return this.controllerConfiguration.kind==="VirtualController"}get motionGroupModel(){return this.motionGroupDescription.motion_group_model}get serialNumber(){return this.motionGroupDescription.serial_number}get inverseSolver(){return this.kinematicModel.inverse_solver}get jointType(){var t,e;return((e=(t=this.motionGroupDescription.dh_parameters)==null?void 0:t[0])==null?void 0:e.type)??R.JointTypeEnum.RevoluteJoint}get jointLimits(){var t;return((t=this.motionGroupDescription.operation_limits.auto_limits)==null?void 0:t.joints)??[]}get safetyZones(){return this.motionGroupDescription.safety_zones}get safetyLinkColliders(){return this.motionGroupDescription.safety_link_colliders}get safetyToolColliders(){return this.motionGroupDescription.safety_tool_colliders}get kinematicChainOffset(){return this.kinematicModel.kinematic_chain_offset??this.motionGroupDescription.kinematic_chain_offset??null}get flangeOffset(){return this.kinematicModel.flange_offset??this.motionGroupDescription.flange_offset??null}get mounting(){return this.motionGroupDescription.mounting??null}get tcps(){return Object.entries(this.motionGroupDescription.tcps??{}).map(([t,e])=>({id:t,name:e.name}))}get tcpOffsetsById(){return this.motionGroupDescription.tcps??{}}}const tt=s=>Array.isArray(s)&&s.length===3&&s.every(t=>typeof t=="number"),Yt=.001,Qt=.5,zt=.01,B=(s,t,e)=>!!(s&&t&&J([...s],[...t],e));class ft{constructor(t,e,o){this.stream=t,this.description=e,this.jogging=o,u.makeAutoObservable(this,{stream:!1,description:!1,jogging:!1},{autoBind:!0})}get controllerState(){return this.stream.controllerState}get rapidlyChangingMotionState(){return this.stream.rapidlyChangingMotionState}get readoutState(){return this.stream.readoutState}get jointPose(){return this.stream.readoutState.joint_position}get connectionQuality(){return this.stream.connectionQuality}get lastValidStateMessage(){return this.stream.lastValidStateMessage}get lastInvalidStateMessage(){return this.stream.lastInvalidStateMessage}get measuredTcpPoseReference(){return this.tcpPoseReferenceOf(this.rapidlyChangingMotionState)}get displayedTcpPoseReference(){return this.inSelectedFrame(this.measuredTcpPoseReference)}get displayedTcpPose(){return this.readoutState.tcp_pose?this.inSelectedFrame(this.tcpPoseReferenceOf(this.readoutState)).pose:null}isAt(t){if(t.type==="joint")return B(t.joints,this.rapidlyChangingMotionState.joint_position,Yt);try{const e=p.deriveSelectedTcpPose({inputPose:this.measuredTcpPoseReference,selectedTcpId:t.tcpPose.tcpId,selectedCoordinateSystemId:t.tcpPose.coordSystemId,tcpOffsetsById:this.description.tcpOffsetsById,coordinateSystems:this.jogging.coordSystems});return B(t.tcpPose.pose.position,e.pose.position,Qt)&&B(t.tcpPose.pose.orientation,e.pose.orientation,zt)}catch{return!1}}nextMotionState(){return this.stream.nextMotionState()}async waitUntilStopped(){let t=await this.stream.nextMotionState(),e=await this.stream.nextMotionState();for(;!J(t.joint_position,e.joint_position,lt);)t=e,e=await this.stream.nextMotionState()}tcpPoseReferenceOf(t){var i,n;const e=(i=t.tcp_pose)==null?void 0:i.position,o=(n=t.tcp_pose)==null?void 0:n.orientation;if(!e||!tt(e))throw new Error(`Invalid current TCP pose position for motion group ${this.stream.motionGroupId}`);if(!o||!tt(o))throw new Error(`Invalid current TCP pose orientation for motion group ${this.stream.motionGroupId}`);return{pose:{position:e,orientation:o},tcpId:t.tcp??"",coordinateSystemId:t.coordinate_system??"world"}}inSelectedFrame(t){return p.deriveSelectedTcpPose({inputPose:t,selectedTcpId:this.jogging.selectedTcpId,selectedCoordinateSystemId:this.jogging.selectedCoordSystemId,tcpOffsetsById:this.description.tcpOffsetsById,coordinateSystems:this.jogging.coordSystems})}}const Zt=["SAFETY_STATE_ROBOT_EMERGENCY_STOP","SAFETY_STATE_DEVICE_EMERGENCY_STOP"],Xt=["SAFETY_STATE_NORMAL","SAFETY_STATE_REDUCED"],te=["SAFETY_STATE_STOP","SAFETY_STATE_STOP_0","SAFETY_STATE_STOP_1","SAFETY_STATE_STOP_2"],ee=["OPERATION_MODE_AUTO","OPERATION_MODE_MANUAL","OPERATION_MODE_MANUAL_T1","OPERATION_MODE_MANUAL_T2"];class yt{constructor(t,e){this.state=t,this.activationState=e,u.makeAutoObservable(this,{state:!1,activationState:!1},{autoBind:!0})}get safetyState(){return this.state.controllerState.safety_state}get operationMode(){return this.state.controllerState.operation_mode}get isEstopActive(){return Zt.includes(this.safetyState)}get isMoveableSafetyState(){return Xt.includes(this.safetyState)}get isMoveableOperationMode(){return ee.includes(this.operationMode)}get isActivatableSafetyState(){return this.isMoveableSafetyState||te.includes(this.safetyState)}get activationBlockedReason(){return this.isEstopActive?`an emergency stop is active (${this.safetyState})`:this.isActivatableSafetyState?this.isMoveableOperationMode?null:`the operation mode is ${this.operationMode}`:`the safety state is ${this.safetyState}`}get canBeActive(){return this.activationBlockedReason===null}get notMoveableReason(){return this.state.connectionQuality==="critical"?{code:"disconnected"}:this.isMoveableSafetyState?this.isMoveableOperationMode?this.activationState()==="inactive"?{code:"deactivated"}:null:{code:"operation_mode",value:this.operationMode}:{code:"safety_state",value:this.safetyState}}get canBeMoved(){return this.isMoveableSafetyState&&this.isMoveableOperationMode&&this.activationState()==="active"&&this.state.connectionQuality!=="critical"}}const oe="Jogging.TargetPose.Error.MoveFailed.lb";class St{constructor(t,e){this.robot=t,this.logger=e,this.editing=!1,this.draft="",this.confirming=!1,this.staged=null,this.moveStarted=!1,this.disposers=[],u.makeAutoObservable(this,{robot:!1,logger:!1,disposers:!1,onBeforePlan:!1},{autoBind:!0}),this.disposers.push(u.reaction(()=>this.robot.jogging.selectedTabId,()=>{(this.editing||this.staged)&&this.resetToLive()})),this.disposers.push(u.reaction(()=>({trajectoryState:this.robot.trajectory.trajectoryState,executionState:this.robot.trajectory.executionState,isRobotAtStagedPose:this.isRobotAtStagedPose}),({trajectoryState:o,executionState:i,isRobotAtStagedPose:n})=>{if(!this.stagedPose)return;if(o==="moving"){this.moveStarted=!0;return}(i==="END_OF_TRAJECTORY"||this.moveStarted&&n&&o!=="stopping")&&this.resetToLive()})),this.disposers.push(u.reaction(()=>this.robot.trajectory.lastError,o=>{o&&this.staged&&!this.staged.errorKey&&(this.staged={...this.staged,errorKey:oe,errorMessage:o})})),this.disposers.push(u.reaction(()=>!this.confirming&&this.robot.trajectory.trajectoryState==="planned"&&this.robot.trajectory.isPlanOutdated,o=>{o&&this.stagedPose&&this.plan(this.stagedPose)}))}dispose(){for(const t of this.disposers)t()}get phase(){return this.editing?"editing":this.staged?this.staged.errorKey?"error":"staged":"view"}get isJointTab(){return this.robot.jogging.selectedTabId==="joint"}get liveDisplayString(){if(this.isJointTab)return C.jointsToText(this.robot.state.jointPose);const t=this.robot.state.displayedTcpPose;return t?C.poseToText(t):""}get displayString(){var t;return((t=this.staged)==null?void 0:t.displayString)??this.liveDisplayString}get parsedDraft(){const{state:t,motionGroupId:e}=this.robot;if(this.isJointTab){const n=C.parseJointsText(this.draft,t.jointPose.length);return n?{type:"joint",motionGroupId:e,joints:n}:null}const o=C.parsePoseText(this.draft);if(!o||!t.displayedTcpPose)return null;const i=t.displayedTcpPoseReference;return{type:"cartesian",motionGroupId:e,tcpPose:{pose:{position:o.position,orientation:o.orientation},coordSystemId:i.coordinateSystemId,tcpId:i.tcpId}}}get draftValid(){return this.parsedDraft!==null}beginEdit(){this.draft=this.displayString,this.editing=!0}setDraft(t){this.draft=t}cancelEdit(){this.editing=!1,this.draft=""}async confirmEdit(){const t=this.parsedDraft;t&&await this.plan(t)}async plan(t){var o;if(this.confirming)return;if(this.robot.notMoveableReason()){await this.dropStaged();return}const e=t.type==="joint"?C.jointsToText(t.joints):C.poseToText(t.tcpPose.pose);this.confirming=!0;try{await((o=this.onBeforePlan)==null?void 0:o.call(this));const i=await this.robot.trajectory.planTrajectory(M.trajectoryTargetOf(t));u.runInAction(()=>{this.staged={pose:t,displayString:e,errorKey:i.ok?null:ht(i.errorFeedbackName)},this.editing=!1,this.draft=""})}catch(i){this.logger.warn("Failed to plan trajectory to typed pose",i),u.runInAction(()=>{this.staged={pose:t,displayString:e,errorKey:"Jogging.TargetPose.Error.PlanningFailed.lb"},this.editing=!1,this.draft=""})}finally{u.runInAction(()=>{this.confirming=!1})}}holdMove(t){const e=this.stagedPose;return!e||!M.sameRobotPose(e,t)||this.robot.notMoveableReason()?!1:this.robot.trajectory.hold(M.trajectoryTargetOf(e))}async releaseMove(){await this.robot.trajectory.release()}async resetToLive(){this.editing=!1,this.draft="",await this.dropStaged()}async dropStaged(){const t=this.staged;this.staged=null,this.moveStarted=!1,t&&(!t.errorKey||this.robot.trajectory.holdsExecutionSession)&&await this.robot.trajectory.stopAndReset()}clear(){this.editing=!1,this.staged=null}get stagedPose(){return!this.staged||this.staged.errorKey?null:this.staged.pose}get isRobotAtStagedPose(){return this.stagedPose?this.robot.state.isAt(this.stagedPose):!1}}const ie={getItem:()=>null,setItem:()=>{}};class _t{constructor(t,e,o,i={}){const n=i.logger??console;this.onError=i.onError??(()=>{}),this.nova=t,this.motionGroupId=e.motionGroupId,this.controllerId=e.controllerId,this.cellId=e.cellId,this.stateSource=o.stateSource,this.motionStateSocket=o.motionStateSocket;const r=new D(t,o.controllerState,o.motionGroupState,o.motionGroupDescription,o.initialMotionState,o.motionStateSocket,e.cellId,{logger:n}),l=new $(r,{cellId:e.cellId,motionGroupModel:o.motionGroupModelName,logger:n,onError:c=>this.onError({kind:"jog",message:E.makeErrorMessage(c),url:l.motionStream.motionStateSocket.url,cause:c})});this.jogging=k.create(l,{coordinateSystems:o.coordinateSystems,description:o.motionGroupDescription,kinematicModel:o.kinematicModel},{storage:i.storage??ie,notMoveableReason:()=>this.jogRefusedReason}),this.description=new mt(o.motionGroupDescription,o.controllerConfiguration,o.kinematicModel,o.motionGroupModelName,this.jogging.coordSystems);const h=new dt(o.stateSource,e.motionGroupId,o.initialControllerState,{isVirtual:this.description.isVirtual,onError:c=>this.onError({kind:"stream",...c})});this.state=new ft(h,this.description,this.jogging),this.activation=new H.RobotActivation(t,e,this.state,()=>this.safety,n,()=>this.releaseControl()),this.safety=new yt(this.state,()=>this.activation.state),this.trajectory=new pt({joggingStore:this.jogging,isLocked:i.isLocked,notMoveableReason:()=>this.jogRefusedReason,ensureMovementOwnership:()=>this.ensureMovementOwnership("trajectory"),logger:n}),this.targetPose=new St({motionGroupId:e.motionGroupId,state:this.state,jogging:this.jogging,trajectory:this.trajectory,notMoveableReason:()=>{var c;return this.jogRefusedReason??((c=i.isLocked)!=null&&c.call(i)?{code:"locked"}:null)}},n),this.jogging.onBeforeActivate=async()=>{this.targetPose.staged&&await this.targetPose.resetToLive()},i.autoActivateVirtual&&this.description.isVirtual&&this.activation.state==="inactive"&&this.activation.activate().catch(c=>{this.onError({kind:"mode",message:E.makeErrorMessage(c),url:c instanceof H.RobotModeChangeError?c.url:void 0,cause:c})})}reportError(t){this.onError(t)}get movementOwner(){return this.jogging.jogger.mode}async ensureMovementOwnership(t){if(this.movementOwner!==t){if(t==="jogging"){await this.jogging.claimForJogging();return}await this.jogging.deactivate(),await this.jogging.jogger.setJoggingMode(t)}}get jogRefusedReason(){return this.safety.notMoveableReason??(this.safety.canBeMoved?null:{code:"deactivated"})}async releaseControl(){await this.jogging.stopIncrementalJog({code:"deactivated"}),await this.releasePlannedMove()}async releasePlannedMove(){this.targetPose.staged&&await this.targetPose.resetToLive(),(this.trajectory.plannedTrajectory||this.trajectory.trajectoryState!=="idle"||this.trajectory.holdsExecutionSession)&&await this.trajectory.stopAndReset()}dispose(){this.activation.dispose(),this.targetPose.dispose(),this.state.stream.dispose(),this.trajectory.dispose(),this.stateSource.close(),this.jogging.dispose(),this.motionStateSocket.dispose()}}const se=[1e3,2e3],ne=s=>new Promise(t=>setTimeout(t,s));class It{constructor(t,e,o,i){this.nova=t,this.motionGroupId=e,this.ids=o,this.options=i,this.state="loading",this.session=null,this.error=null,this.attempt=0,this.disposed=!1,this.progress=new ut(e,o.controllerId),u.makeAutoObservable(this,{nova:!1,ids:!1,options:!1,attempt:!1,disposed:!1,readyPromise:!1,settle:!1,progress:!1},{autoBind:!0}),this.start()}get ready(){return this.readyPromise}retry(){this.disposed||this.state!=="failed"||this.start()}dispose(){var t;this.disposed||(this.disposed=!0,this.attempt++,(t=this.session)==null||t.dispose(),this.session=null,this.settle.reject(new Error("The robot session load was disposed")))}start(){this.attempt++;const t=this.attempt;this.readyPromise=new Promise((e,o)=>{this.settle={resolve:e,reject:o}}),this.readyPromise.catch(()=>{}),u.runInAction(()=>{this.state="loading",this.error=null}),this.run(t)}isStale(t){return this.disposed||t!==this.attempt}async run(t){var l,h;const{cellId:e,controllerId:o}=this.ids,i=this.options.retryDelaysMs??se,n=this.options.logger??console,r=this.options.stateSource??(c=>Bt(this.nova,c));for(let c=0;;c++)try{const a=await qt({nova:this.nova,cellId:e,controllerId:o,motionGroupId:this.motionGroupId,progress:this.progress,createStateSource:r,isStale:()=>this.isStale(t),socketTimeoutMs:this.options.socketTimeoutMs});if(!a)return;if(this.isStale(t)){a.dispose();return}let d;try{d=new _t(this.nova,{cellId:e,controllerId:o,motionGroupId:this.motionGroupId},a,this.options)}catch(g){throw a.dispose(),g}if(this.isStale(t)){d.dispose();return}u.runInAction(()=>{this.session=d,this.state="ready"}),this.settle.resolve(d);return}catch(a){if(this.isStale(t))return;const d=V(a)?i[c]:void 0;if(d===void 0){u.runInAction(()=>{V(a)?this.progress.failStep(a.stepId,a.cause):this.progress.failWith(a),this.state="failed",this.error=a}),(h=(l=this.options).onEvent)==null||h.call(l,{type:"loadFailed",motionGroupId:this.motionGroupId,step:V(a)?a.stepId:"unknown",message:E.makeErrorMessage(a),attempts:c+1}),this.settle.reject(a);return}if(n.warn(`Retrying load of robot "${this.motionGroupId}" after: ${E.makeErrorMessage(a)}`),u.runInAction(()=>{this.progress.beginRetry(c+1)}),await ne(d),this.isStale(t))return}}}function re(s,t,e={}){return ae(p.createNovaClient(s),t,{...e,cellId:e.cellId??p.cellIdOf(s)})}function ae(s,t,e={}){const o=e.cellId??"cell",i=e.controllerId??t.split("@")[1]??"";return new It(s,t,{cellId:o,controllerId:i},e)}exports.ControllerStateStream=dt;exports.JoggerConnection=$;exports.JoggingStore=k;exports.MotionStreamConnection=D;exports.ORIENTATION_IDS=Ft;exports.ROBOT_LOAD_STEP_IDS=gt;exports.RobotDescription=mt;exports.RobotLiveState=ft;exports.RobotLoadProgress=ut;exports.RobotLoadStepError=W;exports.RobotSafety=yt;exports.RobotSession=_t;exports.RobotSessionLoad=It;exports.RobotTargetPose=St;exports.TrajectoryExecutionStore=pt;exports.isRobotLoadStepError=V;exports.jointValuesEqual=J;exports.jointValuesUnchanged=ot;exports.loadRobotSession=re;exports.planErrorTranslationKey=ht;exports.poseEqual=st;exports.tcpMotionEqual=nt;exports.unwrapRotationVector=q;
|