@wandelbots/nova-js 3.2.0 → 3.3.0-pr.fix-mock-v2.176.c5ea07d

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 +328 -752
  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
@@ -5,7 +5,6 @@ import * as pathToRegexp from "path-to-regexp"
5
5
  import type { AutoReconnectingWebsocket } from "../../AutoReconnectingWebsocket"
6
6
 
7
7
  /**
8
- * EXPERIMENTAL
9
8
  * Ultra-simplified mock Nova server for testing stuff
10
9
  */
11
10
  export class MockNovaInstance {
@@ -19,26 +18,7 @@ export class MockNovaInstance {
19
18
  method: "GET",
20
19
  path: "/cells/:cellId/controllers",
21
20
  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
- }
21
+ return ["mock-ur5e"]
42
22
  },
43
23
  },
44
24
  {
@@ -47,6 +27,7 @@ export class MockNovaInstance {
47
27
  handle() {
48
28
  return {
49
29
  configuration: {
30
+ initial_joint_position: "[0,-1.571,-1.571,-1.571,1.571,-1.571,0]",
50
31
  kind: "VirtualController",
51
32
  manufacturer: "universalrobots",
52
33
  type: "universalrobots-ur5e",
@@ -57,603 +38,386 @@ export class MockNovaInstance {
57
38
  },
58
39
  {
59
40
  method: "GET",
60
- path: "/cells/:cellId/motion-groups/:motionGroupId/specification",
41
+ path: "/cells/:cellId/controllers/:controllerId/state",
61
42
  handle() {
62
43
  return {
63
- dh_parameters: [
44
+ mode: "MODE_CONTROL",
45
+ last_error: [],
46
+ timestamp: "2025-10-16T09:19:26.634534092Z",
47
+ sequence_number: 1054764,
48
+ controller: "mock-ur5e",
49
+ operation_mode: "OPERATION_MODE_AUTO",
50
+ safety_state: "SAFETY_STATE_NORMAL",
51
+ velocity_override: 100,
52
+ motion_groups: [
64
53
  {
65
- alpha: 1.5707963267948966,
66
- theta: 0,
67
- a: 0,
68
- d: 162.25,
69
- reverse_rotation_direction: false,
54
+ timestamp: "2025-10-16T09:19:26.634534092Z",
55
+ sequence_number: 1054764,
56
+ motion_group: "0@mock-ur5e",
57
+ controller: "mock-ur5e",
58
+ joint_position: [
59
+ 1.487959623336792, -1.8501918315887451, 1.8003005981445312,
60
+ 6.034560203552246, 1.4921919107437134, 1.593459963798523,
61
+ ],
62
+ joint_limit_reached: {
63
+ limit_reached: [false, false, false, false, false, false],
64
+ },
65
+ joint_torque: [],
66
+ joint_current: [0, 0, 0, 0, 0, 0],
67
+ flange_pose: {
68
+ position: [
69
+ 107.6452433732927, -409.0402987746852, 524.2402132330305,
70
+ ],
71
+ orientation: [
72
+ 0.9874434028353319, -0.986571714997442, 1.3336589451098142,
73
+ ],
74
+ },
75
+ tcp: "Flange",
76
+ tcp_pose: {
77
+ position: [
78
+ 107.6452433732927, -409.0402987746852, 524.2402132330305,
79
+ ],
80
+ orientation: [
81
+ 0.9874434028353319, -0.986571714997442, 1.3336589451098142,
82
+ ],
83
+ },
84
+ payload: "",
85
+ coordinate_system: "",
86
+ standstill: true,
70
87
  },
71
- {
72
- alpha: 0,
73
- theta: 0,
74
- a: -425,
75
- d: 0,
76
- reverse_rotation_direction: false,
88
+ ],
89
+ }
90
+ },
91
+ },
92
+ {
93
+ method: "GET",
94
+ path: "/cells/:cellId/controllers/:controllerId/motion-groups/:motionGroupId/description",
95
+ handle() {
96
+ return {
97
+ motion_group_model: "UniversalRobots_UR12e",
98
+ mounting: {
99
+ position: [0, 0, 0],
100
+ orientation: [0, 0, 0],
101
+ },
102
+ tcps: {
103
+ Flange: {
104
+ name: "Default-Flange",
105
+ pose: {
106
+ position: [0, 0, 0],
107
+ orientation: [0, 0, 0],
108
+ },
77
109
  },
78
- {
79
- alpha: 0,
80
- theta: 0,
81
- a: -392.2,
82
- d: 0,
83
- reverse_rotation_direction: false,
110
+ },
111
+ payloads: {
112
+ "FPay-0": {
113
+ name: "FPay-0",
114
+ payload: 0,
115
+ center_of_mass: [0, 0, 0],
116
+ moment_of_inertia: [0, 0, 0],
84
117
  },
118
+ },
119
+ cycle_time: 8,
120
+ dh_parameters: [
85
121
  {
86
122
  alpha: 1.5707963267948966,
87
- theta: 0,
88
- a: 0,
89
- d: 133.3,
90
- reverse_rotation_direction: false,
91
- },
92
- {
93
- alpha: -1.5707963267948966,
94
- theta: 0,
95
- a: 0,
96
- d: 99.7,
97
- reverse_rotation_direction: false,
123
+ d: 180.7,
98
124
  },
99
125
  {
100
- alpha: 0,
101
- theta: 0,
102
- a: 0,
103
- d: 99.6,
104
- reverse_rotation_direction: false,
126
+ a: -612.7,
105
127
  },
106
- ],
107
- mechanical_joint_limits: [
108
128
  {
109
- joint: "JOINTNAME_AXIS_1",
110
- lower_limit: -6.335545063018799,
111
- upper_limit: 6.335545063018799,
112
- unlimited: false,
129
+ a: -571.55,
113
130
  },
114
131
  {
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,
132
+ alpha: 1.5707963267948966,
133
+ d: 174.15,
131
134
  },
132
135
  {
133
- joint: "JOINTNAME_AXIS_5",
134
- lower_limit: -6.335545063018799,
135
- upper_limit: 6.335545063018799,
136
- unlimited: false,
136
+ alpha: -1.5707963267948966,
137
+ d: 119.85,
137
138
  },
138
139
  {
139
- joint: "JOINTNAME_AXIS_6",
140
- lower_limit: -6.335545063018799,
141
- upper_limit: 6.335545063018799,
142
- unlimited: false,
140
+ d: 116.55,
143
141
  },
144
142
  ],
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,
143
+ operation_limits: {
144
+ auto_limits: {
145
+ joints: [
146
+ {
147
+ position: {
148
+ lower_limit: -6.2831853,
149
+ upper_limit: 6.2831853,
203
150
  },
204
- {
205
- joint: "JOINTNAME_AXIS_3",
206
- limit: 3.4906585216522217,
151
+ velocity: 2.0943951,
152
+ acceleration: 14.6607657,
153
+ torque: 330,
154
+ },
155
+ {
156
+ position: {
157
+ lower_limit: -6.2831853,
158
+ upper_limit: 6.2831853,
207
159
  },
208
- {
209
- joint: "JOINTNAME_AXIS_4",
210
- limit: 6.108652591705322,
160
+ velocity: 2.0943951,
161
+ acceleration: 14.6607657,
162
+ torque: 330,
163
+ },
164
+ {
165
+ position: {
166
+ lower_limit: -6.2831853,
167
+ upper_limit: 6.2831853,
211
168
  },
212
- {
213
- joint: "JOINTNAME_AXIS_5",
214
- limit: 6.108652591705322,
169
+ velocity: 3.1415926,
170
+ acceleration: 21.9911485,
171
+ torque: 150,
172
+ },
173
+ {
174
+ position: {
175
+ lower_limit: -6.2831853,
176
+ upper_limit: 6.2831853,
215
177
  },
216
- {
217
- joint: "JOINTNAME_AXIS_6",
218
- limit: 6.981317043304443,
178
+ velocity: 3.1415926,
179
+ acceleration: 21.9911485,
180
+ torque: 54,
181
+ },
182
+ {
183
+ position: {
184
+ lower_limit: -6.2831853,
185
+ upper_limit: 6.2831853,
219
186
  },
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
- ],
187
+ velocity: 3.1415926,
188
+ acceleration: 21.9911485,
189
+ torque: 54,
365
190
  },
366
- init_pose: {
367
- position: [0, 0, 0],
368
- orientation: [0, 0, 0, 1],
191
+ {
192
+ position: {
193
+ lower_limit: -6.2831853,
194
+ upper_limit: 6.2831853,
195
+ },
196
+ velocity: 3.1415926,
197
+ acceleration: 21.9911485,
198
+ torque: 54,
369
199
  },
370
- id: "Cell workzone",
200
+ ],
201
+ tcp: {
202
+ velocity: 5000,
203
+ },
204
+ elbow: {
205
+ velocity: 5000,
206
+ },
207
+ flange: {
208
+ velocity: 5000,
371
209
  },
372
- motion_group_uid: 1,
373
210
  },
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
- ],
211
+ manual_limits: {
212
+ joints: [
213
+ {
214
+ position: {
215
+ lower_limit: -6.2831853,
216
+ upper_limit: 6.2831853,
217
+ },
218
+ velocity: 2.0943951,
219
+ acceleration: 14.6607657,
220
+ torque: 330,
405
221
  },
406
- init_pose: {
407
- position: [0, 0, 0],
408
- orientation: [0, 0, 0, 1],
222
+ {
223
+ position: {
224
+ lower_limit: -6.2831853,
225
+ upper_limit: 6.2831853,
226
+ },
227
+ velocity: 2.0943951,
228
+ acceleration: 14.6607657,
229
+ torque: 330,
409
230
  },
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
- ],
231
+ {
232
+ position: {
233
+ lower_limit: -6.2831853,
234
+ upper_limit: 6.2831853,
235
+ },
236
+ velocity: 3.1415926,
237
+ acceleration: 21.9911485,
238
+ torque: 150,
445
239
  },
446
- init_pose: {
447
- position: [0, 0, 0],
448
- orientation: [0, 0, 0, 1],
240
+ {
241
+ position: {
242
+ lower_limit: -6.2831853,
243
+ upper_limit: 6.2831853,
244
+ },
245
+ velocity: 3.1415926,
246
+ acceleration: 21.9911485,
247
+ torque: 54,
449
248
  },
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
- ],
249
+ {
250
+ position: {
251
+ lower_limit: -6.2831853,
252
+ upper_limit: 6.2831853,
253
+ },
254
+ velocity: 3.1415926,
255
+ acceleration: 21.9911485,
256
+ torque: 54,
485
257
  },
486
- init_pose: {
487
- position: [0, 0, 0],
488
- orientation: [0, 0, 0, 1],
258
+ {
259
+ position: {
260
+ lower_limit: -6.2831853,
261
+ upper_limit: 6.2831853,
262
+ },
263
+ velocity: 3.1415926,
264
+ acceleration: 21.9911485,
265
+ torque: 54,
489
266
  },
490
- id: "Fanuc controller",
267
+ ],
268
+ tcp: {
269
+ velocity: 5000,
491
270
  },
492
- motion_group_uid: 1,
493
271
  },
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
- ],
272
+ manual_t1_limits: {
273
+ joints: [
274
+ {
275
+ position: {
276
+ lower_limit: -6.2831853,
277
+ upper_limit: 6.2831853,
278
+ },
279
+ velocity: 2.0943951,
280
+ acceleration: 14.6607657,
281
+ torque: 330,
525
282
  },
526
- init_pose: {
527
- position: [0, 0, 0],
528
- orientation: [0, 0, 0, 1],
283
+ {
284
+ position: {
285
+ lower_limit: -6.2831853,
286
+ upper_limit: 6.2831853,
287
+ },
288
+ velocity: 2.0943951,
289
+ acceleration: 14.6607657,
290
+ torque: 330,
529
291
  },
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,
292
+ {
293
+ position: {
294
+ lower_limit: -6.2831853,
295
+ upper_limit: 6.2831853,
296
+ },
297
+ velocity: 3.1415926,
298
+ acceleration: 21.9911485,
299
+ torque: 150,
541
300
  },
542
- init_pose: {
543
- position: [-70, -70, -50],
544
- orientation: [0, 0, 0, 1],
301
+ {
302
+ position: {
303
+ lower_limit: -6.2831853,
304
+ upper_limit: 6.2831853,
305
+ },
306
+ velocity: 3.1415926,
307
+ acceleration: 21.9911485,
308
+ torque: 54,
545
309
  },
546
- id: "link1_sphere",
547
- },
548
- },
549
- {
550
- link_index: 2,
551
- geometry: {
552
- capsule: {
553
- radius: 160,
554
- cylinder_height: 800,
310
+ {
311
+ position: {
312
+ lower_limit: -6.2831853,
313
+ upper_limit: 6.2831853,
314
+ },
315
+ velocity: 3.1415926,
316
+ acceleration: 21.9911485,
317
+ torque: 54,
555
318
  },
556
- init_pose: {
557
- position: [-450, 40, 170],
558
- orientation: [0, -Math.SQRT1_2, 0, Math.SQRT1_2],
319
+ {
320
+ position: {
321
+ lower_limit: -6.2831853,
322
+ upper_limit: 6.2831853,
323
+ },
324
+ velocity: 3.1415926,
325
+ acceleration: 21.9911485,
326
+ torque: 54,
559
327
  },
560
- id: "link2_capsule",
328
+ ],
329
+ tcp: {
330
+ velocity: 5000,
561
331
  },
562
332
  },
563
- {
564
- link_index: 3,
565
- geometry: {
566
- sphere: {
567
- radius: 270,
333
+ manual_t2_limits: {
334
+ joints: [
335
+ {
336
+ position: {
337
+ lower_limit: -6.2831853,
338
+ upper_limit: 6.2831853,
339
+ },
340
+ velocity: 2.0943951,
341
+ acceleration: 14.6607657,
342
+ torque: 330,
568
343
  },
569
- init_pose: {
570
- position: [-110, 10, -100],
571
- orientation: [0, 0, 0, 1],
344
+ {
345
+ position: {
346
+ lower_limit: -6.2831853,
347
+ upper_limit: 6.2831853,
348
+ },
349
+ velocity: 2.0943951,
350
+ acceleration: 14.6607657,
351
+ torque: 330,
572
352
  },
573
- id: "link3_sphere",
574
- },
575
- },
576
- {
577
- link_index: 4,
578
- geometry: {
579
- capsule: {
580
- radius: 110,
581
- cylinder_height: 600,
353
+ {
354
+ position: {
355
+ lower_limit: -6.2831853,
356
+ upper_limit: 6.2831853,
357
+ },
358
+ velocity: 3.1415926,
359
+ acceleration: 21.9911485,
360
+ torque: 150,
582
361
  },
583
- init_pose: {
584
- position: [0, 300, 40],
585
- orientation: [-Math.SQRT1_2, 0, 0, Math.SQRT1_2],
362
+ {
363
+ position: {
364
+ lower_limit: -6.2831853,
365
+ upper_limit: 6.2831853,
366
+ },
367
+ velocity: 3.1415926,
368
+ acceleration: 21.9911485,
369
+ torque: 54,
586
370
  },
587
- id: "link4_capsule",
588
- },
589
- },
590
- {
591
- link_index: 5,
592
- geometry: {
593
- sphere: {
594
- radius: 75,
371
+ {
372
+ position: {
373
+ lower_limit: -6.2831853,
374
+ upper_limit: 6.2831853,
375
+ },
376
+ velocity: 3.1415926,
377
+ acceleration: 21.9911485,
378
+ torque: 54,
595
379
  },
596
- init_pose: {
597
- position: [0, 0, -50],
598
- orientation: [0, 0, 0, 1],
380
+ {
381
+ position: {
382
+ lower_limit: -6.2831853,
383
+ upper_limit: 6.2831853,
384
+ },
385
+ velocity: 3.1415926,
386
+ acceleration: 21.9911485,
387
+ torque: 54,
599
388
  },
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",
389
+ ],
390
+ tcp: {
391
+ velocity: 5000,
622
392
  },
623
393
  },
624
- ],
625
- } //satisfies CoordinateSystems
394
+ },
395
+ serial_number: "WBVirtualRobot",
396
+ }
626
397
  },
627
398
  },
628
399
  {
629
400
  method: "GET",
630
- path: "/cells/:cellId/motion-groups/:motionGroupId/tcps",
401
+ path: "/cells/:cellId/controllers/:controllerId/coordinate-systems",
631
402
  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
- }
403
+ return [
404
+ {
405
+ coordinate_system: "",
406
+ name: "world",
407
+ reference_coordinate_system: "",
408
+ position: [0, 0, 0],
409
+ orientation: [0, 0, 0],
410
+ orientation_type: "ROTATION_VECTOR",
411
+ },
412
+ {
413
+ coordinate_system: "CS-0",
414
+ name: "Default-CS",
415
+ reference_coordinate_system: "",
416
+ position: [0, 0, 0],
417
+ orientation: [0, 0, 0],
418
+ orientation_type: "ROTATION_VECTOR",
419
+ },
420
+ ] //satisfies CoordinateSystems
657
421
  },
658
422
  },
659
423
  ]
@@ -696,6 +460,7 @@ export class MockNovaInstance {
696
460
  // }
697
461
  }
698
462
 
463
+ // Please note: Only very basic websocket mocking is done here, needs to be extended as needed
699
464
  handleWebsocketConnection(socket: AutoReconnectingWebsocket) {
700
465
  this.connections.push(socket)
701
466
 
@@ -712,202 +477,13 @@ export class MockNovaInstance {
712
477
  )
713
478
  }
714
479
 
715
- if (socket.url.includes("/move-joint")) {
716
- socket.dispatchEvent(
717
- new MessageEvent("message", {
718
- data: JSON.stringify({
719
- 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")) {
480
+ if (socket.url.includes("/execution/jogging")) {
816
481
  socket.dispatchEvent(
817
482
  new MessageEvent("message", {
818
483
  data: JSON.stringify({
819
484
  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",
485
+ message: "string",
486
+ kind: "INITIALIZE_RECEIVED",
911
487
  },
912
488
  }),
913
489
  }),