@wandelbots/nova-js 3.2.0 → 3.3.0-pr.fix-mock-v2.176.43cb4cc

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 (104) hide show
  1. package/README.md +32 -136
  2. package/dist/AutoReconnectingWebsocket-Qcrbm3Kb.d.cts +69 -0
  3. package/dist/AutoReconnectingWebsocket-Qcrbm3Kb.d.cts.map +1 -0
  4. package/dist/AutoReconnectingWebsocket-dHe-kceU.d.mts +69 -0
  5. package/dist/AutoReconnectingWebsocket-dHe-kceU.d.mts.map +1 -0
  6. package/dist/LoginWithAuth0-CBD9BXXz.cjs +264 -0
  7. package/dist/LoginWithAuth0-CBD9BXXz.cjs.map +1 -0
  8. package/dist/LoginWithAuth0-wQB-Sol1.mjs +217 -0
  9. package/dist/LoginWithAuth0-wQB-Sol1.mjs.map +1 -0
  10. package/dist/NovaClient-B8XM3OPO.mjs +2057 -0
  11. package/dist/NovaClient-B8XM3OPO.mjs.map +1 -0
  12. package/dist/NovaClient-CV7ooIkD.d.cts +349 -0
  13. package/dist/NovaClient-CV7ooIkD.d.cts.map +1 -0
  14. package/dist/NovaClient-D2EItmiH.cjs +2137 -0
  15. package/dist/NovaClient-D2EItmiH.cjs.map +1 -0
  16. package/dist/NovaClient-qJnHcx2s.d.mts +349 -0
  17. package/dist/NovaClient-qJnHcx2s.d.mts.map +1 -0
  18. package/dist/index.cjs +42 -386
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +73 -0
  21. package/dist/index.d.cts.map +1 -0
  22. package/dist/index.d.mts +73 -0
  23. package/dist/index.d.mts.map +1 -0
  24. package/dist/index.mjs +36 -0
  25. package/dist/index.mjs.map +1 -0
  26. package/dist/lib/v1/index.cjs +190 -2940
  27. package/dist/lib/v1/index.cjs.map +1 -1
  28. package/dist/lib/v1/index.d.cts +62 -0
  29. package/dist/lib/v1/index.d.cts.map +1 -0
  30. package/dist/lib/v1/index.d.mts +62 -0
  31. package/dist/lib/v1/index.d.mts.map +1 -0
  32. package/dist/lib/v1/index.mjs +182 -0
  33. package/dist/lib/v1/index.mjs.map +1 -0
  34. package/dist/lib/v2/index.cjs +737 -1468
  35. package/dist/lib/v2/index.cjs.map +1 -1
  36. package/dist/lib/v2/index.d.cts +118 -0
  37. package/dist/lib/v2/index.d.cts.map +1 -0
  38. package/dist/lib/v2/index.d.mts +118 -0
  39. package/dist/lib/v2/index.d.mts.map +1 -0
  40. package/dist/lib/v2/index.mjs +738 -0
  41. package/dist/lib/v2/index.mjs.map +1 -0
  42. package/package.json +21 -19
  43. package/src/LoginWithAuth0.ts +12 -12
  44. package/src/index.ts +2 -0
  45. package/src/lib/converters.ts +5 -23
  46. package/src/lib/v1/MotionStreamConnection.ts +0 -1
  47. package/src/lib/v1/NovaClient.ts +18 -0
  48. package/src/lib/v1/index.ts +6 -0
  49. package/src/lib/v1/mock/MockNovaInstance.ts +0 -1
  50. package/src/lib/v1/wandelscriptUtils.ts +22 -0
  51. package/src/lib/v2/NovaClient.ts +14 -7
  52. package/src/lib/v2/index.ts +1 -0
  53. package/src/lib/v2/mock/MockNovaInstance.ts +324 -747
  54. package/src/lib/v2/wandelscriptUtils.ts +27 -0
  55. package/dist/LoginWithAuth0.d.ts +0 -7
  56. package/dist/LoginWithAuth0.d.ts.map +0 -1
  57. package/dist/chunk-B2C22PTK.js +0 -53
  58. package/dist/chunk-B2C22PTK.js.map +0 -1
  59. package/dist/chunk-I3PUV6ZD.js +0 -286
  60. package/dist/chunk-I3PUV6ZD.js.map +0 -1
  61. package/dist/index.d.ts +0 -6
  62. package/dist/index.d.ts.map +0 -1
  63. package/dist/index.js +0 -60
  64. package/dist/index.js.map +0 -1
  65. package/dist/lib/AutoReconnectingWebsocket.d.ts +0 -43
  66. package/dist/lib/AutoReconnectingWebsocket.d.ts.map +0 -1
  67. package/dist/lib/availableStorage.d.ts +0 -15
  68. package/dist/lib/availableStorage.d.ts.map +0 -1
  69. package/dist/lib/converters.d.ts +0 -26
  70. package/dist/lib/converters.d.ts.map +0 -1
  71. package/dist/lib/errorHandling.d.ts +0 -15
  72. package/dist/lib/errorHandling.d.ts.map +0 -1
  73. package/dist/lib/v1/ConnectedMotionGroup.d.ts +0 -77
  74. package/dist/lib/v1/ConnectedMotionGroup.d.ts.map +0 -1
  75. package/dist/lib/v1/JoggerConnection.d.ts +0 -94
  76. package/dist/lib/v1/JoggerConnection.d.ts.map +0 -1
  77. package/dist/lib/v1/MotionStreamConnection.d.ts +0 -26
  78. package/dist/lib/v1/MotionStreamConnection.d.ts.map +0 -1
  79. package/dist/lib/v1/NovaCellAPIClient.d.ts +0 -68
  80. package/dist/lib/v1/NovaCellAPIClient.d.ts.map +0 -1
  81. package/dist/lib/v1/NovaClient.d.ts +0 -67
  82. package/dist/lib/v1/NovaClient.d.ts.map +0 -1
  83. package/dist/lib/v1/ProgramStateConnection.d.ts +0 -57
  84. package/dist/lib/v1/ProgramStateConnection.d.ts.map +0 -1
  85. package/dist/lib/v1/getLatestTrajectories.d.ts +0 -4
  86. package/dist/lib/v1/getLatestTrajectories.d.ts.map +0 -1
  87. package/dist/lib/v1/index.d.ts +0 -9
  88. package/dist/lib/v1/index.d.ts.map +0 -1
  89. package/dist/lib/v1/index.js +0 -2653
  90. package/dist/lib/v1/index.js.map +0 -1
  91. package/dist/lib/v1/mock/MockNovaInstance.d.ts +0 -13
  92. package/dist/lib/v1/mock/MockNovaInstance.d.ts.map +0 -1
  93. package/dist/lib/v1/motionStateUpdate.d.ts +0 -4
  94. package/dist/lib/v1/motionStateUpdate.d.ts.map +0 -1
  95. package/dist/lib/v2/NovaCellAPIClient.d.ts +0 -62
  96. package/dist/lib/v2/NovaCellAPIClient.d.ts.map +0 -1
  97. package/dist/lib/v2/NovaClient.d.ts +0 -60
  98. package/dist/lib/v2/NovaClient.d.ts.map +0 -1
  99. package/dist/lib/v2/index.d.ts +0 -4
  100. package/dist/lib/v2/index.d.ts.map +0 -1
  101. package/dist/lib/v2/index.js +0 -1196
  102. package/dist/lib/v2/index.js.map +0 -1
  103. package/dist/lib/v2/mock/MockNovaInstance.d.ts +0 -13
  104. package/dist/lib/v2/mock/MockNovaInstance.d.ts.map +0 -1
@@ -1,3 +1,4 @@
1
+ /** biome-ignore-all lint/suspicious/noApproximativeNumericConstant: mock data contains approximative pi values from robot description */
1
2
  import type { MotionGroupState, RobotController } from "@wandelbots/nova-api/v2"
2
3
  import type { AxiosResponse, InternalAxiosRequestConfig } from "axios"
3
4
  import { AxiosError } from "axios"
@@ -5,7 +6,6 @@ import * as pathToRegexp from "path-to-regexp"
5
6
  import type { AutoReconnectingWebsocket } from "../../AutoReconnectingWebsocket"
6
7
 
7
8
  /**
8
- * EXPERIMENTAL
9
9
  * Ultra-simplified mock Nova server for testing stuff
10
10
  */
11
11
  export class MockNovaInstance {
@@ -19,26 +19,7 @@ export class MockNovaInstance {
19
19
  method: "GET",
20
20
  path: "/cells/:cellId/controllers",
21
21
  handle() {
22
- return {
23
- controllers: [
24
- {
25
- controller: "mock-ur5e",
26
- model_name: "UniversalRobots::Controller",
27
- host: "mock-ur5e",
28
- allow_software_install_on_controller: true,
29
- motion_groups: [
30
- {
31
- motion_group: "0@mock-ur5e",
32
- name_from_controller: "UR5e",
33
- active: false,
34
- model_from_controller: "UniversalRobots_UR5e",
35
- },
36
- ],
37
- has_error: false,
38
- error_details: "",
39
- },
40
- ],
41
- }
22
+ return ["mock-ur5e"]
42
23
  },
43
24
  },
44
25
  {
@@ -47,6 +28,7 @@ export class MockNovaInstance {
47
28
  handle() {
48
29
  return {
49
30
  configuration: {
31
+ initial_joint_position: "[0,-1.571,-1.571,-1.571,1.571,-1.571,0]",
50
32
  kind: "VirtualController",
51
33
  manufacturer: "universalrobots",
52
34
  type: "universalrobots-ur5e",
@@ -57,603 +39,386 @@ export class MockNovaInstance {
57
39
  },
58
40
  {
59
41
  method: "GET",
60
- path: "/cells/:cellId/motion-groups/:motionGroupId/specification",
42
+ path: "/cells/:cellId/controllers/:controllerId/state",
61
43
  handle() {
62
44
  return {
45
+ mode: "MODE_CONTROL",
46
+ last_error: [],
47
+ timestamp: "2025-10-16T09:19:26.634534092Z",
48
+ sequence_number: 1054764,
49
+ controller: "mock-ur5e",
50
+ operation_mode: "OPERATION_MODE_AUTO",
51
+ safety_state: "SAFETY_STATE_NORMAL",
52
+ velocity_override: 100,
53
+ motion_groups: [
54
+ {
55
+ timestamp: "2025-10-16T09:19:26.634534092Z",
56
+ sequence_number: 1054764,
57
+ motion_group: "0@mock-ur5e",
58
+ controller: "mock-ur5e",
59
+ joint_position: [
60
+ 1.487959623336792, -1.8501918315887451, 1.8003005981445312,
61
+ 6.034560203552246, 1.4921919107437134, 1.593459963798523,
62
+ ],
63
+ joint_limit_reached: {
64
+ limit_reached: [false, false, false, false, false, false],
65
+ },
66
+ joint_torque: [],
67
+ joint_current: [0, 0, 0, 0, 0, 0],
68
+ flange_pose: {
69
+ position: [
70
+ 107.6452433732927, -409.0402987746852, 524.2402132330305,
71
+ ],
72
+ orientation: [
73
+ 0.9874434028353319, -0.986571714997442, 1.3336589451098142,
74
+ ],
75
+ },
76
+ tcp: "Flange",
77
+ tcp_pose: {
78
+ position: [
79
+ 107.6452433732927, -409.0402987746852, 524.2402132330305,
80
+ ],
81
+ orientation: [
82
+ 0.9874434028353319, -0.986571714997442, 1.3336589451098142,
83
+ ],
84
+ },
85
+ payload: "",
86
+ coordinate_system: "",
87
+ standstill: true,
88
+ },
89
+ ],
90
+ }
91
+ },
92
+ },
93
+ {
94
+ method: "GET",
95
+ path: "/cells/:cellId/controllers/:controllerId/motion-groups/:motionGroupId/description",
96
+ handle() {
97
+ return {
98
+ motion_group_model: "UniversalRobots_UR5e",
99
+ mounting: {
100
+ position: [0, 0, 0],
101
+ orientation: [0, 0, 0],
102
+ },
103
+ tcps: {
104
+ Flange: {
105
+ name: "Default-Flange",
106
+ pose: {
107
+ position: [0, 0, 0],
108
+ orientation: [0, 0, 0],
109
+ },
110
+ },
111
+ },
112
+ payloads: {
113
+ "FPay-0": {
114
+ name: "FPay-0",
115
+ payload: 0,
116
+ center_of_mass: [0, 0, 0],
117
+ moment_of_inertia: [0, 0, 0],
118
+ },
119
+ },
120
+ cycle_time: 8,
63
121
  dh_parameters: [
64
122
  {
65
123
  alpha: 1.5707963267948966,
66
- theta: 0,
67
- a: 0,
68
124
  d: 162.25,
69
- reverse_rotation_direction: false,
70
125
  },
71
126
  {
72
- alpha: 0,
73
- theta: 0,
74
127
  a: -425,
75
- d: 0,
76
- reverse_rotation_direction: false,
77
128
  },
78
129
  {
79
- alpha: 0,
80
- theta: 0,
81
130
  a: -392.2,
82
- d: 0,
83
- reverse_rotation_direction: false,
84
131
  },
85
132
  {
86
133
  alpha: 1.5707963267948966,
87
- theta: 0,
88
- a: 0,
89
134
  d: 133.3,
90
- reverse_rotation_direction: false,
91
135
  },
92
136
  {
93
137
  alpha: -1.5707963267948966,
94
- theta: 0,
95
- a: 0,
96
138
  d: 99.7,
97
- reverse_rotation_direction: false,
98
139
  },
99
140
  {
100
- alpha: 0,
101
- theta: 0,
102
- a: 0,
103
141
  d: 99.6,
104
- reverse_rotation_direction: false,
105
142
  },
106
143
  ],
107
- mechanical_joint_limits: [
108
- {
109
- joint: "JOINTNAME_AXIS_1",
110
- lower_limit: -6.335545063018799,
111
- upper_limit: 6.335545063018799,
112
- unlimited: false,
113
- },
114
- {
115
- joint: "JOINTNAME_AXIS_2",
116
- lower_limit: -6.335545063018799,
117
- upper_limit: 6.335545063018799,
118
- unlimited: false,
119
- },
120
- {
121
- joint: "JOINTNAME_AXIS_3",
122
- lower_limit: -6.335545063018799,
123
- upper_limit: 6.335545063018799,
124
- unlimited: false,
125
- },
126
- {
127
- joint: "JOINTNAME_AXIS_4",
128
- lower_limit: -6.335545063018799,
129
- upper_limit: 6.335545063018799,
130
- unlimited: false,
131
- },
132
- {
133
- joint: "JOINTNAME_AXIS_5",
134
- lower_limit: -6.335545063018799,
135
- upper_limit: 6.335545063018799,
136
- unlimited: false,
137
- },
138
- {
139
- joint: "JOINTNAME_AXIS_6",
140
- lower_limit: -6.335545063018799,
141
- upper_limit: 6.335545063018799,
142
- unlimited: false,
143
- },
144
- ],
145
- } // Mock motion group specification
146
- },
147
- },
148
- {
149
- method: "GET",
150
- path: "/cells/:cellId/motion-groups/:motionGroupId/safety-setup",
151
- handle() {
152
- return {
153
- safety_settings: [
154
- {
155
- safety_state: "SAFETY_NORMAL",
156
- settings: {
157
- joint_position_limits: [
158
- {
159
- joint: "JOINTNAME_AXIS_1",
160
- lower_limit: -2.96705961227417,
161
- upper_limit: 2.96705961227417,
162
- unlimited: false,
163
- },
164
- {
165
- joint: "JOINTNAME_AXIS_2",
166
- lower_limit: -1.7453292608261108,
167
- upper_limit: 2.7925267219543457,
168
- unlimited: false,
169
- },
170
- {
171
- joint: "JOINTNAME_AXIS_3",
172
- lower_limit: -3.3161256313323975,
173
- upper_limit: 0.40142571926116943,
174
- unlimited: false,
175
- },
176
- {
177
- joint: "JOINTNAME_AXIS_4",
178
- lower_limit: -3.4906585216522217,
179
- upper_limit: 3.4906585216522217,
180
- unlimited: false,
181
- },
182
- {
183
- joint: "JOINTNAME_AXIS_5",
184
- lower_limit: -2.4434609413146973,
185
- upper_limit: 2.4434609413146973,
186
- unlimited: false,
187
- },
188
- {
189
- joint: "JOINTNAME_AXIS_6",
190
- lower_limit: -4.71238899230957,
191
- upper_limit: 4.71238899230957,
192
- unlimited: false,
193
- },
194
- ],
195
- joint_velocity_limits: [
196
- {
197
- joint: "JOINTNAME_AXIS_1",
198
- limit: 3.1415927410125732,
199
- },
200
- {
201
- joint: "JOINTNAME_AXIS_2",
202
- limit: 3.1415927410125732,
144
+ operation_limits: {
145
+ auto_limits: {
146
+ joints: [
147
+ {
148
+ position: {
149
+ lower_limit: -6.283185307179586,
150
+ upper_limit: 6.283185307179586,
203
151
  },
204
- {
205
- joint: "JOINTNAME_AXIS_3",
206
- limit: 3.4906585216522217,
152
+ velocity: 3.34159255027771,
153
+ acceleration: 40,
154
+ torque: 150,
155
+ },
156
+ {
157
+ position: {
158
+ lower_limit: -6.283185307179586,
159
+ upper_limit: 6.283185307179586,
207
160
  },
208
- {
209
- joint: "JOINTNAME_AXIS_4",
210
- limit: 6.108652591705322,
161
+ velocity: 3.34159255027771,
162
+ acceleration: 40,
163
+ torque: 150,
164
+ },
165
+ {
166
+ position: {
167
+ lower_limit: -6.283185307179586,
168
+ upper_limit: 6.283185307179586,
211
169
  },
212
- {
213
- joint: "JOINTNAME_AXIS_5",
214
- limit: 6.108652591705322,
170
+ velocity: 3.34159255027771,
171
+ acceleration: 40,
172
+ torque: 150,
173
+ },
174
+ {
175
+ position: {
176
+ lower_limit: -6.283185307179586,
177
+ upper_limit: 6.283185307179586,
215
178
  },
216
- {
217
- joint: "JOINTNAME_AXIS_6",
218
- limit: 6.981317043304443,
179
+ velocity: 3.34159255027771,
180
+ acceleration: 40,
181
+ torque: 28,
182
+ },
183
+ {
184
+ position: {
185
+ lower_limit: -6.283185307179586,
186
+ upper_limit: 6.283185307179586,
219
187
  },
220
- ],
221
- joint_acceleration_limits: [],
222
- joint_torque_limits: [],
223
- tcp_velocity_limit: 1800,
224
- },
225
- },
226
- ],
227
- safety_zones: [
228
- {
229
- id: 1,
230
- priority: 0,
231
- geometry: {
232
- compound: {
233
- child_geometries: [
234
- {
235
- convex_hull: {
236
- vertices: [
237
- { vertex: [-800, -1330, -1820] },
238
- { vertex: [1650, -1330, -1820] },
239
- { vertex: [1650, 1330, -1820] },
240
- { vertex: [-800, 1330, -1820] },
241
- ],
242
- },
243
- init_pose: {
244
- position: [0, 0, 0],
245
- orientation: [0, 0, 0, 1],
246
- },
247
- id: "box",
248
- },
249
- {
250
- convex_hull: {
251
- vertices: [
252
- {
253
- vertex: [-800, -1330, -1820],
254
- },
255
- {
256
- vertex: [1650, -1330, -1820],
257
- },
258
- {
259
- vertex: [1650, -1330, 1500],
260
- },
261
- {
262
- vertex: [-800, -1330, 1500],
263
- },
264
- ],
265
- },
266
- init_pose: {
267
- position: [0, 0, 0],
268
- orientation: [0, 0, 0, 1],
269
- },
270
- id: "box",
271
- },
272
- {
273
- convex_hull: {
274
- vertices: [
275
- {
276
- vertex: [-800, -1330, -1820],
277
- },
278
- {
279
- vertex: [-800, 1330, -1820],
280
- },
281
- {
282
- vertex: [-800, 1330, 1500],
283
- },
284
- {
285
- vertex: [-800, -1330, 1500],
286
- },
287
- ],
288
- },
289
- init_pose: {
290
- position: [0, 0, 0],
291
- orientation: [0, 0, 0, 1],
292
- },
293
- id: "box",
294
- },
295
- {
296
- convex_hull: {
297
- vertices: [
298
- {
299
- vertex: [1650, 1330, 1500],
300
- },
301
- {
302
- vertex: [-800, 1330, 1500],
303
- },
304
- {
305
- vertex: [-800, -1330, 1500],
306
- },
307
- {
308
- vertex: [1650, -1330, 1500],
309
- },
310
- ],
311
- },
312
- init_pose: {
313
- position: [0, 0, 0],
314
- orientation: [0, 0, 0, 1],
315
- },
316
- id: "box",
317
- },
318
- {
319
- convex_hull: {
320
- vertices: [
321
- {
322
- vertex: [1650, 1330, 1500],
323
- },
324
- {
325
- vertex: [-800, 1330, 1500],
326
- },
327
- {
328
- vertex: [-800, 1330, -1820],
329
- },
330
- {
331
- vertex: [1650, 1330, -1820],
332
- },
333
- ],
334
- },
335
- init_pose: {
336
- position: [0, 0, 0],
337
- orientation: [0, 0, 0, 1],
338
- },
339
- id: "box",
340
- },
341
- {
342
- convex_hull: {
343
- vertices: [
344
- {
345
- vertex: [1650, 1330, 1500],
346
- },
347
- {
348
- vertex: [1650, -1330, 1500],
349
- },
350
- {
351
- vertex: [1650, -1330, -1820],
352
- },
353
- {
354
- vertex: [1650, 1330, -1820],
355
- },
356
- ],
357
- },
358
- init_pose: {
359
- position: [0, 0, 0],
360
- orientation: [0, 0, 0, 1],
361
- },
362
- id: "box",
363
- },
364
- ],
188
+ velocity: 3.34159255027771,
189
+ acceleration: 40,
190
+ torque: 28,
365
191
  },
366
- init_pose: {
367
- position: [0, 0, 0],
368
- orientation: [0, 0, 0, 1],
192
+ {
193
+ position: {
194
+ lower_limit: -6.283185307179586,
195
+ upper_limit: 6.283185307179586,
196
+ },
197
+ velocity: 3.34159255027771,
198
+ acceleration: 40,
199
+ torque: 28,
369
200
  },
370
- id: "Cell workzone",
201
+ ],
202
+ tcp: {
203
+ velocity: 5000,
204
+ },
205
+ elbow: {
206
+ velocity: 5000,
207
+ },
208
+ flange: {
209
+ velocity: 5000,
371
210
  },
372
- motion_group_uid: 1,
373
211
  },
374
- {
375
- id: 2,
376
- priority: 0,
377
- geometry: {
378
- convex_hull: {
379
- vertices: [
380
- {
381
- vertex: [1650, 1330, -1850],
382
- },
383
- {
384
- vertex: [865, 1330, -1850],
385
- },
386
- {
387
- vertex: [865, -720, -1850],
388
- },
389
- {
390
- vertex: [1650, -720, -1850],
391
- },
392
- {
393
- vertex: [1650, 1330, -920],
394
- },
395
- {
396
- vertex: [865, 1330, -920],
397
- },
398
- {
399
- vertex: [865, -720, -920],
400
- },
401
- {
402
- vertex: [1650, -720, -920],
403
- },
404
- ],
212
+ manual_limits: {
213
+ joints: [
214
+ {
215
+ position: {
216
+ lower_limit: -6.283185307179586,
217
+ upper_limit: 6.283185307179586,
218
+ },
219
+ velocity: 3.34159255027771,
220
+ acceleration: 40,
221
+ torque: 150,
405
222
  },
406
- init_pose: {
407
- position: [0, 0, 0],
408
- orientation: [0, 0, 0, 1],
223
+ {
224
+ position: {
225
+ lower_limit: -6.283185307179586,
226
+ upper_limit: 6.283185307179586,
227
+ },
228
+ velocity: 3.34159255027771,
229
+ acceleration: 40,
230
+ torque: 150,
409
231
  },
410
- id: "Transport",
411
- },
412
- motion_group_uid: 1,
413
- },
414
- {
415
- id: 3,
416
- priority: 0,
417
- geometry: {
418
- convex_hull: {
419
- vertices: [
420
- {
421
- vertex: [1650, 1330, -600],
422
- },
423
- {
424
- vertex: [865, 1330, -600],
425
- },
426
- {
427
- vertex: [865, 430, -600],
428
- },
429
- {
430
- vertex: [1650, 430, -600],
431
- },
432
- {
433
- vertex: [1650, 1330, -1250],
434
- },
435
- {
436
- vertex: [865, 1330, -1250],
437
- },
438
- {
439
- vertex: [865, 430, -1250],
440
- },
441
- {
442
- vertex: [1650, 430, -1250],
443
- },
444
- ],
232
+ {
233
+ position: {
234
+ lower_limit: -6.283185307179586,
235
+ upper_limit: 6.283185307179586,
236
+ },
237
+ velocity: 3.34159255027771,
238
+ acceleration: 40,
239
+ torque: 150,
445
240
  },
446
- init_pose: {
447
- position: [0, 0, 0],
448
- orientation: [0, 0, 0, 1],
241
+ {
242
+ position: {
243
+ lower_limit: -6.283185307179586,
244
+ upper_limit: 6.283185307179586,
245
+ },
246
+ velocity: 3.34159255027771,
247
+ acceleration: 40,
248
+ torque: 28,
449
249
  },
450
- id: "Tunel",
451
- },
452
- motion_group_uid: 1,
453
- },
454
- {
455
- id: 4,
456
- priority: 0,
457
- geometry: {
458
- convex_hull: {
459
- vertices: [
460
- {
461
- vertex: [1650, -760, -440],
462
- },
463
- {
464
- vertex: [900, -760, -440],
465
- },
466
- {
467
- vertex: [900, -1330, -440],
468
- },
469
- {
470
- vertex: [1650, -1330, -440],
471
- },
472
- {
473
- vertex: [1650, -760, -1800],
474
- },
475
- {
476
- vertex: [900, -760, -1800],
477
- },
478
- {
479
- vertex: [900, -1330, -1800],
480
- },
481
- {
482
- vertex: [1650, -1330, -1800],
483
- },
484
- ],
250
+ {
251
+ position: {
252
+ lower_limit: -6.283185307179586,
253
+ upper_limit: 6.283185307179586,
254
+ },
255
+ velocity: 3.34159255027771,
256
+ acceleration: 40,
257
+ torque: 28,
485
258
  },
486
- init_pose: {
487
- position: [0, 0, 0],
488
- orientation: [0, 0, 0, 1],
259
+ {
260
+ position: {
261
+ lower_limit: -6.283185307179586,
262
+ upper_limit: 6.283185307179586,
263
+ },
264
+ velocity: 3.34159255027771,
265
+ acceleration: 40,
266
+ torque: 28,
489
267
  },
490
- id: "Fanuc controller",
268
+ ],
269
+ tcp: {
270
+ velocity: 5000,
491
271
  },
492
- motion_group_uid: 1,
493
272
  },
494
- {
495
- id: 6,
496
- priority: 0,
497
- geometry: {
498
- convex_hull: {
499
- vertices: [
500
- {
501
- vertex: [-200, -200, -1900],
502
- },
503
- {
504
- vertex: [200, -200, -1900],
505
- },
506
- {
507
- vertex: [200, 200, -1900],
508
- },
509
- {
510
- vertex: [-200, 200, -1900],
511
- },
512
- {
513
- vertex: [-200, -200, -350],
514
- },
515
- {
516
- vertex: [200, -200, -350],
517
- },
518
- {
519
- vertex: [200, 200, -350],
520
- },
521
- {
522
- vertex: [-200, 200, -350],
523
- },
524
- ],
273
+ manual_t1_limits: {
274
+ joints: [
275
+ {
276
+ position: {
277
+ lower_limit: -6.283185307179586,
278
+ upper_limit: 6.283185307179586,
279
+ },
280
+ velocity: 3.34159255027771,
281
+ acceleration: 40,
282
+ torque: 150,
525
283
  },
526
- init_pose: {
527
- position: [0, 0, 0],
528
- orientation: [0, 0, 0, 1],
284
+ {
285
+ position: {
286
+ lower_limit: -6.283185307179586,
287
+ upper_limit: 6.283185307179586,
288
+ },
289
+ velocity: 3.34159255027771,
290
+ acceleration: 40,
291
+ torque: 150,
529
292
  },
530
- id: "Robot base",
531
- },
532
- motion_group_uid: 1,
533
- },
534
- ],
535
- robot_model_geometries: [
536
- {
537
- link_index: 1,
538
- geometry: {
539
- sphere: {
540
- radius: 270,
293
+ {
294
+ position: {
295
+ lower_limit: -6.283185307179586,
296
+ upper_limit: 6.283185307179586,
297
+ },
298
+ velocity: 3.34159255027771,
299
+ acceleration: 40,
300
+ torque: 150,
541
301
  },
542
- init_pose: {
543
- position: [-70, -70, -50],
544
- orientation: [0, 0, 0, 1],
302
+ {
303
+ position: {
304
+ lower_limit: -6.283185307179586,
305
+ upper_limit: 6.283185307179586,
306
+ },
307
+ velocity: 3.34159255027771,
308
+ acceleration: 40,
309
+ torque: 28,
545
310
  },
546
- id: "link1_sphere",
547
- },
548
- },
549
- {
550
- link_index: 2,
551
- geometry: {
552
- capsule: {
553
- radius: 160,
554
- cylinder_height: 800,
311
+ {
312
+ position: {
313
+ lower_limit: -6.283185307179586,
314
+ upper_limit: 6.283185307179586,
315
+ },
316
+ velocity: 3.34159255027771,
317
+ acceleration: 40,
318
+ torque: 28,
555
319
  },
556
- init_pose: {
557
- position: [-450, 40, 170],
558
- orientation: [0, -Math.SQRT1_2, 0, Math.SQRT1_2],
320
+ {
321
+ position: {
322
+ lower_limit: -6.283185307179586,
323
+ upper_limit: 6.283185307179586,
324
+ },
325
+ velocity: 3.34159255027771,
326
+ acceleration: 40,
327
+ torque: 28,
559
328
  },
560
- id: "link2_capsule",
329
+ ],
330
+ tcp: {
331
+ velocity: 5000,
561
332
  },
562
333
  },
563
- {
564
- link_index: 3,
565
- geometry: {
566
- sphere: {
567
- radius: 270,
334
+ manual_t2_limits: {
335
+ joints: [
336
+ {
337
+ position: {
338
+ lower_limit: -6.283185307179586,
339
+ upper_limit: 6.283185307179586,
340
+ },
341
+ velocity: 3.34159255027771,
342
+ acceleration: 40,
343
+ torque: 150,
568
344
  },
569
- init_pose: {
570
- position: [-110, 10, -100],
571
- orientation: [0, 0, 0, 1],
345
+ {
346
+ position: {
347
+ lower_limit: -6.283185307179586,
348
+ upper_limit: 6.283185307179586,
349
+ },
350
+ velocity: 3.34159255027771,
351
+ acceleration: 40,
352
+ torque: 150,
572
353
  },
573
- id: "link3_sphere",
574
- },
575
- },
576
- {
577
- link_index: 4,
578
- geometry: {
579
- capsule: {
580
- radius: 110,
581
- cylinder_height: 600,
354
+ {
355
+ position: {
356
+ lower_limit: -6.283185307179586,
357
+ upper_limit: 6.283185307179586,
358
+ },
359
+ velocity: 3.34159255027771,
360
+ acceleration: 40,
361
+ torque: 150,
582
362
  },
583
- init_pose: {
584
- position: [0, 300, 40],
585
- orientation: [-Math.SQRT1_2, 0, 0, Math.SQRT1_2],
363
+ {
364
+ position: {
365
+ lower_limit: -6.283185307179586,
366
+ upper_limit: 6.283185307179586,
367
+ },
368
+ velocity: 3.34159255027771,
369
+ acceleration: 40,
370
+ torque: 28,
586
371
  },
587
- id: "link4_capsule",
588
- },
589
- },
590
- {
591
- link_index: 5,
592
- geometry: {
593
- sphere: {
594
- radius: 75,
372
+ {
373
+ position: {
374
+ lower_limit: -6.283185307179586,
375
+ upper_limit: 6.283185307179586,
376
+ },
377
+ velocity: 3.34159255027771,
378
+ acceleration: 40,
379
+ torque: 28,
595
380
  },
596
- init_pose: {
597
- position: [0, 0, -50],
598
- orientation: [0, 0, 0, 1],
381
+ {
382
+ position: {
383
+ lower_limit: -6.283185307179586,
384
+ upper_limit: 6.283185307179586,
385
+ },
386
+ velocity: 3.34159255027771,
387
+ acceleration: 40,
388
+ torque: 28,
599
389
  },
600
- id: "link5_sphere",
601
- },
602
- },
603
- ],
604
- tool_geometries: [],
605
- } // Mock safety setup
606
- },
607
- },
608
- {
609
- method: "GET",
610
- path: "/cells/:cellId/coordinate-systems",
611
- handle() {
612
- return {
613
- coordinatesystems: [
614
- {
615
- coordinate_system: "",
616
- name: "world",
617
- reference_uid: "",
618
- position: [0, 0, 0],
619
- rotation: {
620
- angles: [0, 0, 0],
621
- type: "ROTATION_VECTOR",
390
+ ],
391
+ tcp: {
392
+ velocity: 5000,
622
393
  },
623
394
  },
624
- ],
625
- } //satisfies CoordinateSystems
395
+ },
396
+ serial_number: "WBVirtualRobot",
397
+ }
626
398
  },
627
399
  },
628
400
  {
629
401
  method: "GET",
630
- path: "/cells/:cellId/motion-groups/:motionGroupId/tcps",
402
+ path: "/cells/:cellId/controllers/:controllerId/coordinate-systems",
631
403
  handle() {
632
- return {
633
- tcps: [
634
- {
635
- id: "Flange",
636
- readable_name: "Default-Flange",
637
- position: [0, 0, 0],
638
- rotation: {
639
- angles: [0, 0, 0, 0],
640
- type: "ROTATION_VECTOR",
641
- },
642
- },
643
- {
644
- id: "complex-tcp-position",
645
- readable_name: "Complex TCP Position",
646
- position: [-200, 300, 150],
647
- rotation: {
648
- angles: [
649
- -0.12139440409113832, -0.06356210998212003,
650
- -0.2023240068185639, 0,
651
- ],
652
- type: "ROTATION_VECTOR",
653
- },
654
- },
655
- ],
656
- }
404
+ return [
405
+ {
406
+ coordinate_system: "",
407
+ name: "world",
408
+ reference_coordinate_system: "",
409
+ position: [0, 0, 0],
410
+ orientation: [0, 0, 0],
411
+ orientation_type: "ROTATION_VECTOR",
412
+ },
413
+ {
414
+ coordinate_system: "CS-0",
415
+ name: "Default-CS",
416
+ reference_coordinate_system: "",
417
+ position: [0, 0, 0],
418
+ orientation: [0, 0, 0],
419
+ orientation_type: "ROTATION_VECTOR",
420
+ },
421
+ ] //satisfies CoordinateSystems
657
422
  },
658
423
  },
659
424
  ]
@@ -696,6 +461,7 @@ export class MockNovaInstance {
696
461
  // }
697
462
  }
698
463
 
464
+ // Please note: Only very basic websocket mocking is done here, needs to be extended as needed
699
465
  handleWebsocketConnection(socket: AutoReconnectingWebsocket) {
700
466
  this.connections.push(socket)
701
467
 
@@ -712,202 +478,13 @@ export class MockNovaInstance {
712
478
  )
713
479
  }
714
480
 
715
- if (socket.url.includes("/move-joint")) {
481
+ if (socket.url.includes("/execution/jogging")) {
716
482
  socket.dispatchEvent(
717
483
  new MessageEvent("message", {
718
484
  data: JSON.stringify({
719
485
  result: {
720
- motion_group: "0@ur",
721
- state: {
722
- controller: "ur",
723
- operation_mode: "OPERATION_MODE_AUTO",
724
- safety_state: "SAFETY_STATE_NORMAL",
725
- timestamp: "2024-09-18T12:48:26.096266444Z",
726
- velocity_override: 100,
727
- motion_groups: [
728
- {
729
- motion_group: "0@ur",
730
- controller: "ur",
731
- joint_position: [
732
- 1.3492152690887451, -1.5659207105636597,
733
- 1.6653711795806885, -1.0991662740707397,
734
- -1.829018235206604, 1.264623761177063,
735
- ],
736
- joint_velocity: {
737
- joints: [0, 0, 0, 0, 0, 0],
738
- },
739
- flange_pose: {
740
- position: [
741
- 6.437331889439328, -628.4123774830913,
742
- 577.0569957147832,
743
- ],
744
- orientation: {
745
- x: -1.683333649797158,
746
- y: -1.9783363827298732,
747
- z: -0.4928031860165713,
748
- },
749
- coordinate_system: "",
750
- },
751
- tcp_pose: {
752
- position: [
753
- 6.437331889439328, -628.4123774830913,
754
- 577.0569957147832,
755
- ],
756
- orientation: {
757
- x: -1.683333649797158,
758
- y: -1.9783363827298732,
759
- z: -0.4928031860165713,
760
- },
761
- coordinate_system: "",
762
- tcp: "Flange",
763
- },
764
- velocity: {
765
- linear: {
766
- x: 0,
767
- y: 0,
768
- z: 0,
769
- },
770
- angular: {
771
- x: -0,
772
- y: 0,
773
- z: 0,
774
- },
775
- coordinate_system: "",
776
- },
777
- force: {
778
- force: {
779
- x: 0,
780
- y: 0,
781
- z: 0,
782
- },
783
- moment: {
784
- x: 0,
785
- y: 0,
786
- z: 0,
787
- },
788
- coordinate_system: "",
789
- },
790
- joint_limit_reached: {
791
- limit_reached: [
792
- false,
793
- false,
794
- false,
795
- false,
796
- false,
797
- false,
798
- ],
799
- },
800
- joint_current: {
801
- joints: [0, 0, 0, 0, 0, 0],
802
- },
803
- sequence_number: "671259",
804
- },
805
- ],
806
- sequence_number: "671259",
807
- },
808
- movement_state: "MOVEMENT_STATE_MOVING",
809
- },
810
- }),
811
- }),
812
- )
813
- }
814
-
815
- if (socket.url.includes("/move-tcp")) {
816
- socket.dispatchEvent(
817
- new MessageEvent("message", {
818
- data: JSON.stringify({
819
- result: {
820
- motion_group: "0@ur",
821
- state: {
822
- controller: "ur",
823
- operation_mode: "OPERATION_MODE_AUTO",
824
- safety_state: "SAFETY_STATE_NORMAL",
825
- timestamp: "2024-09-18T12:43:12.188335774Z",
826
- velocity_override: 100,
827
- motion_groups: [
828
- {
829
- motion_group: "0@ur",
830
- controller: "ur",
831
- joint_position: {
832
- joints: [
833
- 1.3352527618408203, -1.5659207105636597,
834
- 1.6653711795806885, -1.110615611076355,
835
- -1.829018235206604, 1.264623761177063,
836
- ],
837
- },
838
- joint_velocity: {
839
- joints: [0, 0, 0, 0, 0, 0],
840
- },
841
- flange_pose: {
842
- position: [
843
- -2.763015284002938, -630.2151479701106,
844
- 577.524509114342,
845
- ],
846
- orientation: {
847
- x: -1.704794877102097,
848
- y: -1.9722372952861567,
849
- z: -0.4852079204210754,
850
- },
851
- coordinate_system: "",
852
- },
853
- tcp_pose: {
854
- position: [
855
- -2.763015284002938, -630.2151479701106,
856
- 577.524509114342,
857
- ],
858
- orientation: {
859
- x: -1.704794877102097,
860
- y: -1.9722372952861567,
861
- z: -0.4852079204210754,
862
- },
863
- coordinate_system: "",
864
- tcp: "Flange",
865
- },
866
- velocity: {
867
- linear: {
868
- x: 0,
869
- y: 0,
870
- z: 0,
871
- },
872
- angular: {
873
- x: -0,
874
- y: 0,
875
- z: 0,
876
- },
877
- coordinate_system: "",
878
- },
879
- force: {
880
- force: {
881
- x: 0,
882
- y: 0,
883
- z: 0,
884
- },
885
- moment: {
886
- x: 0,
887
- y: 0,
888
- z: 0,
889
- },
890
- coordinate_system: "",
891
- },
892
- joint_limit_reached: {
893
- limit_reached: [
894
- false,
895
- false,
896
- false,
897
- false,
898
- false,
899
- false,
900
- ],
901
- },
902
- joint_current: {
903
- joints: [0, 0, 0, 0, 0, 0],
904
- },
905
- sequence_number: "627897",
906
- },
907
- ],
908
- sequence_number: "627897",
909
- },
910
- movement_state: "MOVEMENT_STATE_MOVING",
486
+ message: "string",
487
+ kind: "INITIALIZE_RECEIVED",
911
488
  },
912
489
  }),
913
490
  }),