@wandelbots/wandelbots-js-react-components 2.54.5-pr.feat-upgrade-robot-motions-to-v2.407.caf8b62 → 2.54.5-pr.feat-jogging-blocked.406.76c87b3

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.
Files changed (55) hide show
  1. package/dist/components/ProgramStateIndicator.d.ts +3 -3
  2. package/dist/components/ProgramStateIndicator.d.ts.map +1 -1
  3. package/dist/components/RobotCard.d.ts +3 -4
  4. package/dist/components/RobotCard.d.ts.map +1 -1
  5. package/dist/components/jogging/JoggingBlocked.d.ts +7 -0
  6. package/dist/components/jogging/JoggingBlocked.d.ts.map +1 -0
  7. package/dist/components/jogging/JoggingPanel.d.ts.map +1 -1
  8. package/dist/components/jogging/JoggingStore.d.ts +4 -0
  9. package/dist/components/jogging/JoggingStore.d.ts.map +1 -1
  10. package/dist/components/robots/DHRobot.d.ts.map +1 -1
  11. package/dist/components/robots/Robot.d.ts +1 -1
  12. package/dist/components/robots/Robot.d.ts.map +1 -1
  13. package/dist/components/robots/RobotAnimator.d.ts +2 -2
  14. package/dist/components/robots/RobotAnimator.d.ts.map +1 -1
  15. package/dist/components/robots/SupportedRobot.d.ts +3 -3
  16. package/dist/components/robots/SupportedRobot.d.ts.map +1 -1
  17. package/dist/components/robots/manufacturerHomePositions.d.ts +1 -1
  18. package/dist/components/safetyBar/OperationModeIndicator.d.ts +2 -2
  19. package/dist/components/safetyBar/OperationModeIndicator.d.ts.map +1 -1
  20. package/dist/components/safetyBar/SafetyBar.d.ts +3 -3
  21. package/dist/components/safetyBar/SafetyBar.d.ts.map +1 -1
  22. package/dist/components/safetyBar/SafetyStateIndicator.d.ts +2 -2
  23. package/dist/components/safetyBar/SafetyStateIndicator.d.ts.map +1 -1
  24. package/dist/index.cjs +44 -44
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.js +3324 -3269
  27. package/dist/index.js.map +1 -1
  28. package/dist/lib/ConnectedMotionGroup.d.ts +1 -7
  29. package/dist/lib/ConnectedMotionGroup.d.ts.map +1 -1
  30. package/dist/lib/JoggerConnection.d.ts +2 -1
  31. package/dist/lib/JoggerConnection.d.ts.map +1 -1
  32. package/dist/lib/MotionStreamConnection.d.ts.map +1 -1
  33. package/dist/lib/motionStateUpdate.d.ts +0 -2
  34. package/dist/lib/motionStateUpdate.d.ts.map +1 -1
  35. package/package.json +1 -1
  36. package/src/components/ProgramStateIndicator.tsx +6 -3
  37. package/src/components/RobotCard.tsx +7 -4
  38. package/src/components/jogging/JoggingBlocked.tsx +37 -0
  39. package/src/components/jogging/JoggingPanel.tsx +3 -1
  40. package/src/components/jogging/JoggingStore.ts +22 -0
  41. package/src/components/robots/DHRobot.tsx +3 -2
  42. package/src/components/robots/Robot.tsx +1 -1
  43. package/src/components/robots/RobotAnimator.test.tsx +22 -7
  44. package/src/components/robots/RobotAnimator.tsx +13 -8
  45. package/src/components/robots/SupportedRobot.tsx +6 -3
  46. package/src/components/robots/manufacturerHomePositions.ts +1 -1
  47. package/src/components/safetyBar/OperationModeIndicator.tsx +2 -2
  48. package/src/components/safetyBar/SafetyBar.tsx +6 -3
  49. package/src/components/safetyBar/SafetyStateIndicator.tsx +2 -2
  50. package/src/i18n/locales/de/translations.json +3 -0
  51. package/src/i18n/locales/en/translations.json +3 -0
  52. package/src/lib/ConnectedMotionGroup.ts +4 -22
  53. package/src/lib/JoggerConnection.ts +21 -6
  54. package/src/lib/MotionStreamConnection.ts +42 -7
  55. package/src/lib/motionStateUpdate.ts +0 -41
@@ -48,13 +48,7 @@ export declare class ConnectedMotionGroup {
48
48
  get joints(): {
49
49
  index: number;
50
50
  }[];
51
- get dhParameters(): {
52
- alpha?: number;
53
- theta?: number;
54
- a?: number;
55
- d?: number;
56
- reverse_rotation_direction?: boolean;
57
- }[] | undefined;
51
+ get dhParameters(): import("@wandelbots/nova-api/v2").DHParameter[] | undefined;
58
52
  get safetyZones(): {
59
53
  [key: string]: import("@wandelbots/nova-api/v2").Collider;
60
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5C,eAAe,EAAE,oBAAoB,CAAA;IAErC;;;OAGG;IACH,eAAe,EAAE,UAAU,GAAG,YAAY,GAAG,cAAc,GAAG,QAAQ,CAC1D;gBAGD,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,oBAAoB,EAChC,WAAW,EAAE,gBAAgB,EAC7B,kBAAkB,EAAE,gBAAgB,EACpC,iBAAiB,EAAE,yBAAyB,EAC5C,SAAS,EAAE,OAAO,EAClB,IAAI,EAAE,YAAY,EAAE,EACpB,WAAW,EAAE,sBAAsB,EACnC,sBAAsB,EAAE,oBAAoB,EAC5C,qBAAqB,EAAE,yBAAyB;IAqE3D,IAAI,aAAa,WAEhB;IAED,IAAI,YAAY,WAEf;IAED,IAAI,mBAAmB,WAEtB;IAED,IAAI,sBAAsB,WAGzB;IAED,kEAAkE;IAClE,IAAI,mBAAmB,WAEtB;IAED,IAAI,MAAM;;QAMT;IAED,IAAI,YAAY,gEAEf;IAED,IAAI,WAAW;;kBAEd;IAED,oEAAoE;IACpE,IAAI,gBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAU/C;IAED,sEAAsE;IACtE,IAAI,kBAAkB,qBAWrB;IAED;;;OAGG;IACH,IAAI,aAAa,YAOhB;IAED;;;OAGG;IACH,IAAI,qBAAqB,YAOxB;IAED;;OAEG;IACH,IAAI,uBAAuB,YAS1B;IAED;;;OAGG;IACH,IAAI,UAAU,YAMb;IAEK,UAAU;IA2BV,QAAQ;IA2Bd,gBAAgB;IAQhB,OAAO;IAKP,kBAAkB,CAAC,QAAQ,EAAE,MAAM;CAGpC"}
@@ -32,6 +32,7 @@ export declare class JoggerConnection {
32
32
  tcp: string;
33
33
  orientation: JoggerOrientation;
34
34
  onError?: (err: unknown) => void;
35
+ onBlocked?: () => void;
35
36
  /**
36
37
  * Initialize the jogging connection using jogging endpoint or trajectory endpoint depending on the selected mode.
37
38
  *
@@ -93,7 +94,7 @@ export declare class JoggerConnection {
93
94
  * axis, either rotating or translating relative to the TCP.
94
95
  * Promise resolves only after the motion has completed.
95
96
  */
96
- runIncrementalCartesianMotion({ currentTcpPose, currentJoints, coordSystemId, velocityInRelevantUnits, axis, direction, motion, }: {
97
+ runIncrementalCartesianMotion({ currentTcpPose, currentJoints, velocityInRelevantUnits, axis, direction, motion, }: {
97
98
  currentTcpPose: Pose;
98
99
  currentJoints: Vector3Simple;
99
100
  coordSystemId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"JoggerConnection.d.ts","sourceRoot":"","sources":["../../src/lib/JoggerConnection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EAG1B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAGV,UAAU,EACV,IAAI,EAEL,MAAM,wBAAwB,CAAA;AAG/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAEjE,MAAM,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;AAEpD,MAAM,MAAM,uBAAuB,GAAG;IAEpC,IAAI,CAAC,EAAE,UAAU,CAAA;IAGjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAA;IAGhC,GAAG,CAAC,EAAE,MAAM,CAAA;IAMZ,WAAW,CAAC,EAAE,iBAAiB,CAAA;CAChC,CAAA;AAMD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,YAAY,GAAG,KAAK,CAAA;AAGzD,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,MAAM,CAAA;AAEnD,qBAAa,gBAAgB;IAsDzB,QAAQ,CAAC,YAAY,EAAE,sBAAsB;IAC7C,QAAQ,CAAC,OAAO,EAAE,uBAAuB,GAAG,SAAS;IAtDvD,gBAAgB,SAAuB;IACvC,mBAAmB,SAA0B;IAC7C,YAAY,EAAY,UAAU,CAAA;IAClC,WAAW,SAAW;IAE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sourceRoot":"","sources":["../../src/lib/MotionStreamConnection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAgB,MAAM,qBAAqB,CAAA;AAC7E,OAAO,KAAK,EACV,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACrB,MAAM,wBAAwB,CAAA;AAW/B;;GAEG;AACH,qBAAa,sBAAsB;IA2D/B,QAAQ,CAAC,IAAI,EAAE,UAAU;IACzB,QAAQ,CAAC,UAAU,EAAE,oBAAoB;IACzC,QAAQ,CAAC,WAAW,EAAE,gBAAgB;IACtC,QAAQ,CAAC,WAAW,EAAE,sBAAsB;IAC5C,QAAQ,CAAC,kBAAkB,EAAE,gBAAgB;IAC7C,QAAQ,CAAC,iBAAiB,EAAE,yBAAyB;WA/D1C,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM;IAuDzD,0BAA0B,EAAE,gBAAgB,CAAA;gBAGjC,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,oBAAoB,EAChC,WAAW,EAAE,gBAAgB,EAC7B,WAAW,EAAE,sBAAsB,EACnC,kBAAkB,EAAE,gBAAgB,EACpC,iBAAiB,EAAE,yBAAyB;IA6EvD,IAAI,aAAa,WAEhB;IAED,IAAI,YAAY,WAEf;IAED,IAAI,sBAAsB,WAGzB;IAED,IAAI,MAAM;;QAMT;IAED,OAAO;CAGR"}
1
+ {"version":3,"file":"MotionStreamConnection.d.ts","sourceRoot":"","sources":["../../src/lib/MotionStreamConnection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAgB,MAAM,qBAAqB,CAAA;AAC7E,OAAO,KAAK,EACV,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACrB,MAAM,wBAAwB,CAAA;AA+C/B;;GAEG;AACH,qBAAa,sBAAsB;IA2D/B,QAAQ,CAAC,IAAI,EAAE,UAAU;IACzB,QAAQ,CAAC,UAAU,EAAE,oBAAoB;IACzC,QAAQ,CAAC,WAAW,EAAE,gBAAgB;IACtC,QAAQ,CAAC,WAAW,EAAE,sBAAsB;IAC5C,QAAQ,CAAC,kBAAkB,EAAE,gBAAgB;IAC7C,QAAQ,CAAC,iBAAiB,EAAE,yBAAyB;WA/D1C,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM;IAuDzD,0BAA0B,EAAE,gBAAgB,CAAA;gBAGjC,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,oBAAoB,EAChC,WAAW,EAAE,gBAAgB,EAC7B,WAAW,EAAE,sBAAsB,EACnC,kBAAkB,EAAE,gBAAgB,EACpC,iBAAiB,EAAE,yBAAyB;IA4EvD,IAAI,aAAa,WAEhB;IAED,IAAI,YAAY,WAEf;IAED,IAAI,sBAAsB,WAGzB;IAED,IAAI,MAAM;;QAMT;IAED,OAAO;CAGR"}
@@ -1,7 +1,5 @@
1
1
  import type { MotionGroupState, Pose } from "@wandelbots/nova-js/v2";
2
- import type { Vector3Simple } from "./JoggerConnection";
3
2
  export declare function jointValuesEqual(oldJointValues: number[], newJointValues: number[], changeDeltaThreshold: number): boolean;
4
3
  export declare function poseEqual(oldTcp: Pose | undefined, newTcp: Pose | undefined, changeDeltaThreshold: number): boolean;
5
4
  export declare function tcpMotionEqual(oldMotionState: MotionGroupState, newMotionState: MotionGroupState, changeDeltaThreshold: number): boolean;
6
- export declare function unwrapRotationVector(newRotationVectorApi: Vector3Simple, currentRotationVectorApi: Vector3Simple): Vector3Simple;
7
5
  //# sourceMappingURL=motionStateUpdate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"motionStateUpdate.d.ts","sourceRoot":"","sources":["../../src/lib/motionStateUpdate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAGvD,wBAAgB,gBAAgB,CAC9B,cAAc,EAAE,MAAM,EAAE,EACxB,cAAc,EAAE,MAAM,EAAE,EACxB,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CAgBT;AAED,wBAAgB,SAAS,CACvB,MAAM,EAAE,IAAI,GAAG,SAAS,EACxB,MAAM,EAAE,IAAI,GAAG,SAAS,EACxB,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CA8BT;AAGD,wBAAgB,cAAc,CAC5B,cAAc,EAAE,gBAAgB,EAChC,cAAc,EAAE,gBAAgB,EAChC,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CAUT;AAED,wBAAgB,oBAAoB,CAClC,oBAAoB,EAAE,aAAa,EACnC,wBAAwB,EAAE,aAAa,GACtC,aAAa,CAkCf"}
1
+ {"version":3,"file":"motionStateUpdate.d.ts","sourceRoot":"","sources":["../../src/lib/motionStateUpdate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAEpE,wBAAgB,gBAAgB,CAC9B,cAAc,EAAE,MAAM,EAAE,EACxB,cAAc,EAAE,MAAM,EAAE,EACxB,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CAgBT;AAED,wBAAgB,SAAS,CACvB,MAAM,EAAE,IAAI,GAAG,SAAS,EACxB,MAAM,EAAE,IAAI,GAAG,SAAS,EACxB,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CA8BT;AAGD,wBAAgB,cAAc,CAC5B,cAAc,EAAE,gBAAgB,EAChC,cAAc,EAAE,gBAAgB,EAChC,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CAUT"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wandelbots/wandelbots-js-react-components",
3
- "version": "2.54.5-pr.feat-upgrade-robot-motions-to-v2.407.caf8b62",
3
+ "version": "2.54.5-pr.feat-jogging-blocked.406.76c87b3",
4
4
  "description": "React UI toolkit for building applications on top of the Wandelbots platform",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -1,5 +1,8 @@
1
1
  import { Chip, Typography, useTheme } from "@mui/material"
2
- import type { OperationMode, SafetyStateType } from "@wandelbots/nova-js/v2"
2
+ import type {
3
+ RobotControllerStateOperationModeEnum,
4
+ RobotControllerStateSafetyStateEnum,
5
+ } from "@wandelbots/nova-js/v1"
3
6
  import { observer } from "mobx-react-lite"
4
7
  import { useTranslation } from "react-i18next"
5
8
  import { externalizeComponent } from "../externalizeComponent"
@@ -9,9 +12,9 @@ export interface ProgramStateIndicatorProps {
9
12
  /** The current state of the program */
10
13
  programState: ProgramState
11
14
  /** The current safety state of the robot controller */
12
- safetyState: SafetyStateType
15
+ safetyState: RobotControllerStateSafetyStateEnum
13
16
  /** The current operation mode of the robot controller */
14
- operationMode: OperationMode
17
+ operationMode: RobotControllerStateOperationModeEnum
15
18
  /** Additional CSS class name */
16
19
  className?: string
17
20
  }
@@ -1,13 +1,16 @@
1
1
  import { Box, Button, Card, Divider, Typography, useTheme } from "@mui/material"
2
2
  import { Bounds } from "@react-three/drei"
3
3
  import { Canvas } from "@react-three/fiber"
4
- import type { OperationMode, SafetyStateType } from "@wandelbots/nova-js/v2"
4
+ import type {
5
+ ConnectedMotionGroup,
6
+ RobotControllerStateOperationModeEnum,
7
+ RobotControllerStateSafetyStateEnum,
8
+ } from "@wandelbots/nova-js/v1"
5
9
  import { observer } from "mobx-react-lite"
6
10
  import { useCallback, useEffect, useRef, useState } from "react"
7
11
  import { useTranslation } from "react-i18next"
8
12
  import type { Group } from "three"
9
13
  import { externalizeComponent } from "../externalizeComponent"
10
- import type { ConnectedMotionGroup } from "../lib/ConnectedMotionGroup"
11
14
  import { PresetEnvironment } from "./3d-viewport/PresetEnvironment"
12
15
  import type { ProgramState } from "./ProgramControl"
13
16
  import { ProgramStateIndicator } from "./ProgramStateIndicator"
@@ -19,9 +22,9 @@ export interface RobotCardProps {
19
22
  /** Current program state */
20
23
  programState: ProgramState
21
24
  /** Current safety state of the robot controller */
22
- safetyState: SafetyStateType
25
+ safetyState: RobotControllerStateSafetyStateEnum
23
26
  /** Current operation mode of the robot controller */
24
- operationMode: OperationMode
27
+ operationMode: RobotControllerStateOperationModeEnum
25
28
  /** Whether the "Drive to Home" button should be enabled */
26
29
  driveToHomeEnabled?: boolean
27
30
  /** Callback fired when "Drive to Home" button is pressed */
@@ -0,0 +1,37 @@
1
+ import { Alert, AlertTitle, Backdrop, Button, Stack } from "@mui/material"
2
+ import { observer } from "mobx-react-lite"
3
+ import { useTranslation } from "react-i18next"
4
+ import { type JoggingStore } from "./JoggingStore"
5
+
6
+ export const JoggingBlocked = observer(({ store }: { store: JoggingStore }) => {
7
+ const { t } = useTranslation()
8
+
9
+ return (
10
+ <Backdrop
11
+ open={true}
12
+ sx={{
13
+ position: "absolute",
14
+ zIndex: (theme) => theme.zIndex.drawer + 1,
15
+ color: "#fff",
16
+ background: "rgba(15, 15, 15, 0.88)",
17
+ justifyContent: "flex-start",
18
+ alignItems: "flex-start",
19
+ }}
20
+ >
21
+ <Stack sx={{ m: 2, width: "100%" }}>
22
+ <Alert severity="error" sx={{ mb: 2 }}>
23
+ <AlertTitle>{t("Jogging.Blocked.ti")}</AlertTitle>
24
+ {t("Jogging.Blocked.lb")}
25
+ </Alert>
26
+
27
+ <Button
28
+ variant="contained"
29
+ color="secondary"
30
+ onClick={() => store.unblock()}
31
+ >
32
+ {t("Jogging.Blocked.Reenable.bt")}
33
+ </Button>
34
+ </Stack>
35
+ </Backdrop>
36
+ )
37
+ })
@@ -10,6 +10,7 @@ import { useTranslation } from "react-i18next"
10
10
  import { externalizeComponent } from "../../externalizeComponent"
11
11
  import { JoggerConnection } from "../../lib/JoggerConnection"
12
12
  import { LoadingCover } from "../LoadingCover"
13
+ import { JoggingBlocked } from "./JoggingBlocked"
13
14
  import { JoggingCartesianTab } from "./JoggingCartesianTab"
14
15
  import { JoggingJointTab } from "./JoggingJointTab"
15
16
  import { JoggingStore } from "./JoggingStore"
@@ -182,7 +183,6 @@ const JoggingPanelInner = observer(
182
183
  )
183
184
  })}
184
185
  </Tabs>
185
-
186
186
  {/* Current tab content */}
187
187
  <Stack
188
188
  flexGrow={1}
@@ -191,6 +191,8 @@ const JoggingPanelInner = observer(
191
191
  >
192
192
  {renderTabContent()}
193
193
  </Stack>
194
+ {/* Overlay when jogging connection is blocked */}
195
+ {store.blocked && <JoggingBlocked store={store} />}
194
196
  </Stack>
195
197
  )
196
198
  },
@@ -59,6 +59,9 @@ export class JoggingStore {
59
59
  /** Locks to prevent UI interactions during certain operations */
60
60
  locks = new Set<string>()
61
61
 
62
+ /** Block jogging UI interactions when connection is taken by another jogger */
63
+ blocked: boolean = false
64
+
62
65
  /**
63
66
  * Id of selected coordinate system from among those defined on the API side
64
67
  */
@@ -183,13 +186,21 @@ export class JoggingStore {
183
186
  this.selectedCoordSystemId = coordSystems[0]?.coordinate_system || "world"
184
187
  this.selectedTcpId = tcps[0]?.id || ""
185
188
 
189
+ // Make all properties observable and actions auto-bound
186
190
  makeAutoObservable(this, {}, { autoBind: true })
187
191
 
192
+ // Register blocked watching
193
+ this.jogger.onBlocked = () => {
194
+ this.block()
195
+ }
196
+
188
197
  // Load user settings from local storage if available
189
198
  this.loadFromLocalStorage()
190
199
 
191
200
  // Automatically save user settings to local storage when save changes
192
201
  this.disposers.push(autorun(() => this.saveToLocalStorage()))
202
+
203
+ // Assign joggingStore to window
193
204
  ;(window as any).joggingStore = this
194
205
  }
195
206
 
@@ -438,6 +449,17 @@ export class JoggingStore {
438
449
  this.locks.delete(id)
439
450
  }
440
451
 
452
+ block() {
453
+ this.blocked = true
454
+ }
455
+
456
+ unblock() {
457
+ this.blocked = false
458
+ if (this.jogger.mode === "jogging") {
459
+ this.jogger.initializeJoggingWebsocket()
460
+ }
461
+ }
462
+
441
463
  /** Lock the UI until the given async callback resolves */
442
464
  async withMotionLock(fn: () => Promise<void>) {
443
465
  const lockId = uniqueId()
@@ -1,5 +1,5 @@
1
1
  import { Line } from "@react-three/drei"
2
- import type { DHParameter } from "@wandelbots/nova-js/v2"
2
+ import type { DHParameter } from "@wandelbots/nova-js/v1"
3
3
  import React, { useRef } from "react"
4
4
  import type * as THREE from "three"
5
5
  import { Matrix4, Quaternion, Vector3 } from "three"
@@ -113,7 +113,8 @@ export function DHRobot({
113
113
  {dhParameters!.map((param, index) => {
114
114
  const { a, b } = getLinePoints(
115
115
  param,
116
- rapidlyChangingMotionState.joint_position[index] ?? 0,
116
+ rapidlyChangingMotionState.state.joint_position.joints[index] ??
117
+ 0,
117
118
  )
118
119
  const jointName = `dhrobot_J0${index}`
119
120
  return (
@@ -1,7 +1,7 @@
1
1
  import type { ThreeElements } from "@react-three/fiber"
2
2
 
3
+ import type { ConnectedMotionGroup } from "@wandelbots/nova-js/v1"
3
4
  import type { Group } from "three"
4
- import type { ConnectedMotionGroup } from "../../lib/ConnectedMotionGroup"
5
5
  import { defaultGetModel } from "./robotModelLogic"
6
6
  import { SupportedRobot } from "./SupportedRobot"
7
7
 
@@ -1,4 +1,7 @@
1
- import type { DHParameter, MotionGroupState } from "@wandelbots/nova-api/v2"
1
+ import type {
2
+ DHParameter,
3
+ MotionGroupStateResponse,
4
+ } from "@wandelbots/nova-api/v1"
2
5
  import { describe, expect, it, vi } from "vitest"
3
6
  import RobotAnimator from "./RobotAnimator"
4
7
 
@@ -23,8 +26,12 @@ describe("RobotAnimator", () => {
23
26
 
24
27
  it("should handle props with different numbers of joints", () => {
25
28
  // Test that the component accepts different numbers of DH parameters
26
- const mockMotionState4Joints: MotionGroupState = {
27
- joint_position: [0.1, 0.2, 0.3, 0.4],
29
+ const mockMotionState4Joints: MotionGroupStateResponse = {
30
+ state: {
31
+ joint_position: {
32
+ joints: [0.1, 0.2, 0.3, 0.4],
33
+ },
34
+ },
28
35
  } as any
29
36
 
30
37
  const mockDHParameters4Joints: DHParameter[] = [
@@ -34,8 +41,12 @@ describe("RobotAnimator", () => {
34
41
  { theta: 0, reverse_rotation_direction: false },
35
42
  ]
36
43
 
37
- const mockMotionState7Joints: MotionGroupState = {
38
- joint_position: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7],
44
+ const mockMotionState7Joints: MotionGroupStateResponse = {
45
+ state: {
46
+ joint_position: {
47
+ joints: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7],
48
+ },
49
+ },
39
50
  } as any
40
51
 
41
52
  const mockDHParameters7Joints: DHParameter[] = Array(7).fill({
@@ -52,7 +63,9 @@ describe("RobotAnimator", () => {
52
63
  }
53
64
  // Verify props are correctly typed
54
65
  expect(props4.dhParameters).toHaveLength(4)
55
- expect(props4.rapidlyChangingMotionState.joint_position).toHaveLength(4)
66
+ expect(
67
+ props4.rapidlyChangingMotionState.state.joint_position.joints,
68
+ ).toHaveLength(4)
56
69
  }).not.toThrow()
57
70
 
58
71
  expect(() => {
@@ -62,7 +75,9 @@ describe("RobotAnimator", () => {
62
75
  children: null,
63
76
  }
64
77
  expect(props7.dhParameters).toHaveLength(7)
65
- expect(props7.rapidlyChangingMotionState.joint_position).toHaveLength(7)
78
+ expect(
79
+ props7.rapidlyChangingMotionState.state.joint_position.joints,
80
+ ).toHaveLength(7)
66
81
  }).not.toThrow()
67
82
  })
68
83
 
@@ -1,5 +1,8 @@
1
1
  import { useFrame, useThree } from "@react-three/fiber"
2
- import type { DHParameter, MotionGroupState } from "@wandelbots/nova-js/v2"
2
+ import type {
3
+ DHParameter,
4
+ MotionGroupStateResponse,
5
+ } from "@wandelbots/nova-js/v1"
3
6
  import React, { useEffect, useRef } from "react"
4
7
  import type { Group, Object3D } from "three"
5
8
  import { useAutorun } from "../utils/hooks"
@@ -7,7 +10,7 @@ import { ValueInterpolator } from "../utils/interpolation"
7
10
  import { collectJoints } from "./robotModelLogic"
8
11
 
9
12
  type RobotAnimatorProps = {
10
- rapidlyChangingMotionState: MotionGroupState
13
+ rapidlyChangingMotionState: MotionGroupStateResponse
11
14
  dhParameters: DHParameter[]
12
15
  onRotationChanged?: (joints: Object3D[], jointValues: number[]) => void
13
16
  children: React.ReactNode
@@ -26,9 +29,10 @@ export default function RobotAnimator({
26
29
 
27
30
  // Initialize interpolator
28
31
  useEffect(() => {
29
- const initialJointValues = rapidlyChangingMotionState.joint_position.filter(
30
- (item) => item !== undefined,
31
- )
32
+ const initialJointValues =
33
+ rapidlyChangingMotionState.state.joint_position.joints.filter(
34
+ (item) => item !== undefined,
35
+ )
32
36
 
33
37
  interpolatorRef.current = new ValueInterpolator(initialJointValues, {
34
38
  tension: 120, // Controls spring stiffness - higher values create faster, more responsive motion
@@ -87,9 +91,10 @@ export default function RobotAnimator({
87
91
  }
88
92
 
89
93
  useAutorun(() => {
90
- const newJointValues = rapidlyChangingMotionState.joint_position.filter(
91
- (item) => item !== undefined,
92
- )
94
+ const newJointValues =
95
+ rapidlyChangingMotionState.state.joint_position.joints.filter(
96
+ (item) => item !== undefined,
97
+ )
93
98
 
94
99
  requestAnimationFrame(() => updateJoints(newJointValues))
95
100
  })
@@ -1,5 +1,8 @@
1
1
  import type { ThreeElements } from "@react-three/fiber"
2
- import type { DHParameter, MotionGroupState } from "@wandelbots/nova-js/v2"
2
+ import type {
3
+ DHParameter,
4
+ MotionGroupStateResponse,
5
+ } from "@wandelbots/nova-js/v1"
3
6
  import { Suspense, useCallback, useEffect, useState } from "react"
4
7
  import { DHRobot } from "./DHRobot"
5
8
 
@@ -13,12 +16,12 @@ import { applyGhostStyle, removeGhostStyle } from "./ghostStyle"
13
16
  import { defaultGetModel } from "./robotModelLogic"
14
17
 
15
18
  export type DHRobotProps = {
16
- rapidlyChangingMotionState: MotionGroupState
19
+ rapidlyChangingMotionState: MotionGroupStateResponse
17
20
  dhParameters: Array<DHParameter>
18
21
  } & ThreeElements["group"]
19
22
 
20
23
  export type SupportedRobotProps = {
21
- rapidlyChangingMotionState: MotionGroupState
24
+ rapidlyChangingMotionState: MotionGroupStateResponse
22
25
  modelFromController: string
23
26
  dhParameters: DHParameter[]
24
27
  flangeRef?: React.Ref<THREE.Group>
@@ -1,4 +1,4 @@
1
- import { Manufacturer } from "@wandelbots/nova-js/v2"
1
+ import { Manufacturer } from "@wandelbots/nova-js/v1"
2
2
 
3
3
  /**
4
4
  * Default home configs for different robot manufacturers.
@@ -1,5 +1,5 @@
1
1
  import { useTheme, type PopoverOrigin } from "@mui/material"
2
- import type { OperationMode } from "@wandelbots/nova-js/v2"
2
+ import type { RobotControllerStateOperationModeEnum } from "@wandelbots/nova-js/v1"
3
3
  import { observer } from "mobx-react-lite"
4
4
  import { Trans, useTranslation } from "react-i18next"
5
5
  import OperationModeAutomaticIcon from "./icons/operation-mode-automatic.svg"
@@ -8,7 +8,7 @@ import OperationModeManualIcon from "./icons/operation-mode-manual.svg"
8
8
  import { IndicatorWithExplanation } from "./IndicatorWithExplanation"
9
9
 
10
10
  interface OperationModeIndicatorProps {
11
- operationMode: OperationMode
11
+ operationMode: RobotControllerStateOperationModeEnum
12
12
  anchorOrigin?: PopoverOrigin
13
13
  transformOrigin?: PopoverOrigin
14
14
  compact: boolean
@@ -1,5 +1,8 @@
1
1
  import { Divider, Stack, type PopoverOrigin } from "@mui/material"
2
- import type { OperationMode, SafetyStateType } from "@wandelbots/nova-js/v2"
2
+ import type {
3
+ RobotControllerStateOperationModeEnum,
4
+ RobotControllerStateSafetyStateEnum,
5
+ } from "@wandelbots/nova-js/v1"
3
6
  import { observer } from "mobx-react-lite"
4
7
  import { externalizeComponent } from "../../externalizeComponent"
5
8
  import { ControllerTypeIndicator } from "./ControllerTypeIndicator"
@@ -9,8 +12,8 @@ import { SafetyStateIndicator } from "./SafetyStateIndicator"
9
12
  export interface SafetyBarProps {
10
13
  isVirtual: boolean
11
14
  motionGroupId: string
12
- operationMode: OperationMode
13
- safetyState: SafetyStateType
15
+ operationMode: RobotControllerStateOperationModeEnum
16
+ safetyState: RobotControllerStateSafetyStateEnum
14
17
  anchorOrigin?: PopoverOrigin
15
18
  transformOrigin?: PopoverOrigin
16
19
  compact?: boolean
@@ -1,5 +1,5 @@
1
1
  import { useTheme, type PopoverOrigin } from "@mui/material"
2
- import type { SafetyStateType } from "@wandelbots/nova-js/v2"
2
+ import type { RobotControllerStateSafetyStateEnum } from "@wandelbots/nova-js/v1"
3
3
  import { observer } from "mobx-react-lite"
4
4
  import { Trans, useTranslation } from "react-i18next"
5
5
  import { assertUnreachable } from "../utils/errorHandling"
@@ -11,7 +11,7 @@ import SafetyStateStopIcon from "./icons/safety-state-stop.svg"
11
11
  import { IndicatorWithExplanation } from "./IndicatorWithExplanation"
12
12
 
13
13
  interface SafetyStateIndicatorProps {
14
- safetyState: SafetyStateType
14
+ safetyState: RobotControllerStateSafetyStateEnum
15
15
  anchorOrigin?: PopoverOrigin
16
16
  transformOrigin?: PopoverOrigin
17
17
  compact: boolean
@@ -4,6 +4,9 @@
4
4
  "Jogging.Velocity.lb": "Geschwindigkeit",
5
5
  "General.degree.variable": "{{amount}}°",
6
6
  "General.mm.variable": "{{amount}} mm",
7
+ "Jogging.Blocked.ti": "Verbindung blockiert",
8
+ "Jogging.Blocked.lb": "Ein anderer Client kontrolliert das Jogging.",
9
+ "Jogging.Blocked.Reenable.bt": "Neu verbinden",
7
10
  "Jogging.Cartesian.MotionType.lb": "Bewegungstyp",
8
11
  "Jogging.Cartesian.Translation.bt": "Translation",
9
12
  "Jogging.Cartesian.Rotation.bt": "Rotation",
@@ -4,6 +4,9 @@
4
4
  "Jogging.Velocity.lb": "Velocity",
5
5
  "General.degree.variable": "{{amount}}°",
6
6
  "General.mm.variable": "{{amount}} mm",
7
+ "Jogging.Blocked.ti": "Connection blocked",
8
+ "Jogging.Blocked.lb": "Another client is currently controlling the jogging.",
9
+ "Jogging.Blocked.Reenable.bt": "Reconnect",
7
10
  "Jogging.Cartesian.MotionType.lb": "Motion type",
8
11
  "Jogging.Cartesian.Translation.bt": "Translation",
9
12
  "Jogging.Cartesian.Rotation.bt": "Rotation",
@@ -3,7 +3,6 @@ import {
3
3
  type AutoReconnectingWebsocket,
4
4
  } from "@wandelbots/nova-js"
5
5
  import type {
6
- DHParameter,
7
6
  MotionGroupDescription,
8
7
  MotionGroupState,
9
8
  NovaClient,
@@ -29,14 +28,6 @@ export type MotionGroupOption = {
29
28
  selectionId: string
30
29
  }
31
30
 
32
- const EMPTY_DH_PARAMETER: DHParameter = {
33
- a: 0,
34
- d: 0,
35
- alpha: 0,
36
- theta: 0,
37
- reverse_rotation_direction: false,
38
- }
39
-
40
31
  /**
41
32
  * Store representing the current state of a connected motion group.
42
33
  * API v2 version, not used yet in the components.
@@ -205,7 +196,7 @@ export class ConnectedMotionGroup {
205
196
  )
206
197
  }
207
198
 
208
- // handle joint position changes
199
+ // handle motionState message
209
200
  if (
210
201
  !jointValuesEqual(
211
202
  this.rapidlyChangingMotionState.joint_position,
@@ -214,12 +205,11 @@ export class ConnectedMotionGroup {
214
205
  )
215
206
  ) {
216
207
  runInAction(() => {
217
- this.rapidlyChangingMotionState.joint_position =
218
- latestMotionState.joint_position
208
+ this.rapidlyChangingMotionState = latestMotionState
219
209
  })
220
210
  }
221
211
 
222
- // handle tcp pose changes
212
+ // handle tcpPose message
223
213
  if (
224
214
  !tcpMotionEqual(
225
215
  this.rapidlyChangingMotionState,
@@ -276,16 +266,8 @@ export class ConnectedMotionGroup {
276
266
  })
277
267
  }
278
268
 
279
- // Please note that API v2 omits 0 values
280
269
  get dhParameters() {
281
- if (this.description.dh_parameters === undefined) {
282
- return undefined
283
- }
284
-
285
- return this.description.dh_parameters.map((dh_param) => ({
286
- ...EMPTY_DH_PARAMETER,
287
- ...dh_param,
288
- }))
270
+ return this.description.dh_parameters
289
271
  }
290
272
 
291
273
  get safetyZones() {
@@ -16,6 +16,8 @@ import { MotionStreamConnection } from "./MotionStreamConnection"
16
16
 
17
17
  export type Vector3Simple = [number, number, number]
18
18
 
19
+ const API_ERROR_CONNECTION_BLOCKED = `Movement request rejected. Another client is currently executing a 'Jogging' motion!`
20
+
19
21
  export type JoggerConnectionOptions = {
20
22
  // The mode of the jogger connection - see type description of JoggerMode for details
21
23
  mode?: JoggerMode
@@ -66,6 +68,7 @@ export class JoggerConnection {
66
68
  // coordinateSystem?: string
67
69
  orientation: JoggerOrientation
68
70
  onError?: (err: unknown) => void
71
+ onBlocked?: () => void
69
72
 
70
73
  /**
71
74
  * Initialize the jogging connection using jogging endpoint or trajectory endpoint depending on the selected mode.
@@ -248,12 +251,16 @@ export class JoggerConnection {
248
251
  return
249
252
  }
250
253
 
251
- if (
252
- (data && "error" in data) ||
253
- data?.result?.kind === "MOTION_ERROR"
254
- ) {
254
+ if (data?.result?.kind === "MOTION_ERROR") {
255
255
  clearTimeout(connectionFailedTimeout)
256
- if (this.onError) {
256
+ if (
257
+ this.onBlocked &&
258
+ data?.result?.message.includes(API_ERROR_CONNECTION_BLOCKED)
259
+ ) {
260
+ this.joggingSocket?.dispose()
261
+ this.onBlocked()
262
+ return
263
+ } else if (this.onError) {
257
264
  this.onError(ev.data)
258
265
  } else {
259
266
  reject(new Error(ev.data))
@@ -370,7 +377,7 @@ export class JoggerConnection {
370
377
  async runIncrementalCartesianMotion({
371
378
  currentTcpPose,
372
379
  currentJoints,
373
- coordSystemId,
380
+ // coordSystemId,
374
381
  velocityInRelevantUnits,
375
382
  axis,
376
383
  direction,
@@ -625,6 +632,14 @@ export class JoggerConnection {
625
632
  )
626
633
  }
627
634
 
635
+ if (
636
+ this.onBlocked &&
637
+ data.result.message?.includes(API_ERROR_CONNECTION_BLOCKED)
638
+ ) {
639
+ this.onBlocked()
640
+ return
641
+ }
642
+
628
643
  if (data.result.kind === "INITIALIZE_RECEIVED") {
629
644
  messageInitializeMovementResponse(data.result)
630
645
  } else if (data.result.kind === "START_RECEIVED") {