@wandelbots/nova-js 3.5.1 → 3.5.2-pr.feat-addTestForQueryUsingApiCAll.228.5a9a608

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.
@@ -77,464 +77,542 @@ var NovaCellAPIClient = class {
77
77
  };
78
78
 
79
79
  //#endregion
80
- //#region src/lib/v2/mock/MockNovaInstance.ts
81
- /**
82
- * Ultra-simplified mock Nova server for testing stuff
83
- */
84
- var MockNovaInstance = class {
85
- constructor() {
86
- this.connections = [];
80
+ //#region src/lib/v2/mock/getCurrentRobotControllerState.ts
81
+ const getCurrentRobotControllerState = {
82
+ method: "GET",
83
+ path: "/cells/:cellId/controllers/:controllerId/state",
84
+ handle() {
85
+ return {
86
+ mode: "MODE_CONTROL",
87
+ last_error: [],
88
+ timestamp: "2025-10-16T09:19:26.634534092Z",
89
+ sequence_number: 1054764,
90
+ controller: "mock-ur5e",
91
+ operation_mode: "OPERATION_MODE_AUTO",
92
+ safety_state: "SAFETY_STATE_NORMAL",
93
+ velocity_override: 100,
94
+ motion_groups: [{
95
+ timestamp: "2025-10-16T09:19:26.634534092Z",
96
+ sequence_number: 1054764,
97
+ motion_group: "0@mock-ur5e",
98
+ controller: "mock-ur5e",
99
+ joint_position: [
100
+ 1.487959623336792,
101
+ -1.8501918315887451,
102
+ 1.8003005981445312,
103
+ 6.034560203552246,
104
+ 1.4921919107437134,
105
+ 1.593459963798523
106
+ ],
107
+ joint_limit_reached: { limit_reached: [
108
+ false,
109
+ false,
110
+ false,
111
+ false,
112
+ false,
113
+ false
114
+ ] },
115
+ joint_torque: [],
116
+ joint_current: [
117
+ 0,
118
+ 0,
119
+ 0,
120
+ 0,
121
+ 0,
122
+ 0
123
+ ],
124
+ flange_pose: {
125
+ position: [
126
+ 107.6452433732927,
127
+ -409.0402987746852,
128
+ 524.2402132330305
129
+ ],
130
+ orientation: [
131
+ .9874434028353319,
132
+ -.986571714997442,
133
+ 1.3336589451098142
134
+ ]
135
+ },
136
+ tcp: "Flange",
137
+ tcp_pose: {
138
+ position: [
139
+ 107.6452433732927,
140
+ -409.0402987746852,
141
+ 524.2402132330305
142
+ ],
143
+ orientation: [
144
+ .9874434028353319,
145
+ -.986571714997442,
146
+ 1.3336589451098142
147
+ ]
148
+ },
149
+ payload: "",
150
+ coordinate_system: "",
151
+ standstill: true
152
+ }]
153
+ };
87
154
  }
88
- async handleAPIRequest(config) {
89
- const apiHandlers = [
90
- {
91
- method: "GET",
92
- path: "/cells/:cellId/controllers",
93
- handle() {
94
- return ["mock-ur5e"];
95
- }
155
+ };
156
+
157
+ //#endregion
158
+ //#region src/lib/v2/mock/getMotionGroupDescription.ts
159
+ const getMotionGroupDescription = {
160
+ method: "GET",
161
+ path: "/cells/:cellId/controllers/:controllerId/motion-groups/:motionGroupId/description",
162
+ handle() {
163
+ return {
164
+ motion_group_model: "UniversalRobots_UR5e",
165
+ mounting: {
166
+ position: [
167
+ 0,
168
+ 0,
169
+ 0
170
+ ],
171
+ orientation: [
172
+ 0,
173
+ 0,
174
+ 0
175
+ ]
96
176
  },
97
- {
98
- method: "GET",
99
- path: "/cells/:cellId/controllers/:controllerId",
100
- handle() {
101
- return {
102
- configuration: {
103
- initial_joint_position: "[0,-1.571,-1.571,-1.571,1.571,-1.571,0]",
104
- kind: "VirtualController",
105
- manufacturer: "universalrobots",
106
- type: "universalrobots-ur5e"
107
- },
108
- name: "mock-ur5"
109
- };
177
+ tcps: { Flange: {
178
+ name: "Default-Flange",
179
+ pose: {
180
+ position: [
181
+ 0,
182
+ 0,
183
+ 0
184
+ ],
185
+ orientation: [
186
+ 0,
187
+ 0,
188
+ 0
189
+ ]
110
190
  }
111
- },
112
- {
113
- method: "GET",
114
- path: "/cells/:cellId/controllers/:controllerId/state",
115
- handle() {
116
- return {
117
- mode: "MODE_CONTROL",
118
- last_error: [],
119
- timestamp: "2025-10-16T09:19:26.634534092Z",
120
- sequence_number: 1054764,
121
- controller: "mock-ur5e",
122
- operation_mode: "OPERATION_MODE_AUTO",
123
- safety_state: "SAFETY_STATE_NORMAL",
124
- velocity_override: 100,
125
- motion_groups: [{
126
- timestamp: "2025-10-16T09:19:26.634534092Z",
127
- sequence_number: 1054764,
128
- motion_group: "0@mock-ur5e",
129
- controller: "mock-ur5e",
130
- joint_position: [
131
- 1.487959623336792,
132
- -1.8501918315887451,
133
- 1.8003005981445312,
134
- 6.034560203552246,
135
- 1.4921919107437134,
136
- 1.593459963798523
137
- ],
138
- joint_limit_reached: { limit_reached: [
139
- false,
140
- false,
141
- false,
142
- false,
143
- false,
144
- false
145
- ] },
146
- joint_torque: [],
147
- joint_current: [
148
- 0,
149
- 0,
150
- 0,
151
- 0,
152
- 0,
153
- 0
154
- ],
155
- flange_pose: {
156
- position: [
157
- 107.6452433732927,
158
- -409.0402987746852,
159
- 524.2402132330305
160
- ],
161
- orientation: [
162
- .9874434028353319,
163
- -.986571714997442,
164
- 1.3336589451098142
165
- ]
191
+ } },
192
+ payloads: { "FPay-0": {
193
+ name: "FPay-0",
194
+ payload: 0,
195
+ center_of_mass: [
196
+ 0,
197
+ 0,
198
+ 0
199
+ ],
200
+ moment_of_inertia: [
201
+ 0,
202
+ 0,
203
+ 0
204
+ ]
205
+ } },
206
+ cycle_time: 8,
207
+ dh_parameters: [
208
+ {
209
+ alpha: 1.5707963267948966,
210
+ d: 162.25
211
+ },
212
+ { a: -425 },
213
+ { a: -392.2 },
214
+ {
215
+ alpha: 1.5707963267948966,
216
+ d: 133.3
217
+ },
218
+ {
219
+ alpha: -1.5707963267948966,
220
+ d: 99.7
221
+ },
222
+ { d: 99.6 }
223
+ ],
224
+ operation_limits: {
225
+ auto_limits: {
226
+ joints: [
227
+ {
228
+ position: {
229
+ lower_limit: -6.283185307179586,
230
+ upper_limit: 6.283185307179586
166
231
  },
167
- tcp: "Flange",
168
- tcp_pose: {
169
- position: [
170
- 107.6452433732927,
171
- -409.0402987746852,
172
- 524.2402132330305
173
- ],
174
- orientation: [
175
- .9874434028353319,
176
- -.986571714997442,
177
- 1.3336589451098142
178
- ]
232
+ velocity: 3.34159255027771,
233
+ acceleration: 40,
234
+ torque: 150
235
+ },
236
+ {
237
+ position: {
238
+ lower_limit: -6.283185307179586,
239
+ upper_limit: 6.283185307179586
179
240
  },
180
- payload: "",
181
- coordinate_system: "",
182
- standstill: true
183
- }]
184
- };
185
- }
186
- },
187
- {
188
- method: "GET",
189
- path: "/cells/:cellId/controllers/:controllerId/motion-groups/:motionGroupId/description",
190
- handle() {
191
- return {
192
- motion_group_model: "UniversalRobots_UR5e",
193
- mounting: {
194
- position: [
195
- 0,
196
- 0,
197
- 0
198
- ],
199
- orientation: [
200
- 0,
201
- 0,
202
- 0
203
- ]
241
+ velocity: 3.34159255027771,
242
+ acceleration: 40,
243
+ torque: 150
244
+ },
245
+ {
246
+ position: {
247
+ lower_limit: -6.283185307179586,
248
+ upper_limit: 6.283185307179586
249
+ },
250
+ velocity: 3.34159255027771,
251
+ acceleration: 40,
252
+ torque: 150
253
+ },
254
+ {
255
+ position: {
256
+ lower_limit: -6.283185307179586,
257
+ upper_limit: 6.283185307179586
258
+ },
259
+ velocity: 3.34159255027771,
260
+ acceleration: 40,
261
+ torque: 28
262
+ },
263
+ {
264
+ position: {
265
+ lower_limit: -6.283185307179586,
266
+ upper_limit: 6.283185307179586
267
+ },
268
+ velocity: 3.34159255027771,
269
+ acceleration: 40,
270
+ torque: 28
271
+ },
272
+ {
273
+ position: {
274
+ lower_limit: -6.283185307179586,
275
+ upper_limit: 6.283185307179586
276
+ },
277
+ velocity: 3.34159255027771,
278
+ acceleration: 40,
279
+ torque: 28
280
+ }
281
+ ],
282
+ tcp: { velocity: 5e3 },
283
+ elbow: { velocity: 5e3 },
284
+ flange: { velocity: 5e3 }
285
+ },
286
+ manual_limits: {
287
+ joints: [
288
+ {
289
+ position: {
290
+ lower_limit: -6.283185307179586,
291
+ upper_limit: 6.283185307179586
292
+ },
293
+ velocity: 3.34159255027771,
294
+ acceleration: 40,
295
+ torque: 150
296
+ },
297
+ {
298
+ position: {
299
+ lower_limit: -6.283185307179586,
300
+ upper_limit: 6.283185307179586
301
+ },
302
+ velocity: 3.34159255027771,
303
+ acceleration: 40,
304
+ torque: 150
305
+ },
306
+ {
307
+ position: {
308
+ lower_limit: -6.283185307179586,
309
+ upper_limit: 6.283185307179586
310
+ },
311
+ velocity: 3.34159255027771,
312
+ acceleration: 40,
313
+ torque: 150
314
+ },
315
+ {
316
+ position: {
317
+ lower_limit: -6.283185307179586,
318
+ upper_limit: 6.283185307179586
319
+ },
320
+ velocity: 3.34159255027771,
321
+ acceleration: 40,
322
+ torque: 28
204
323
  },
205
- tcps: { Flange: {
206
- name: "Default-Flange",
207
- pose: {
208
- position: [
209
- 0,
210
- 0,
211
- 0
212
- ],
213
- orientation: [
214
- 0,
215
- 0,
216
- 0
217
- ]
218
- }
219
- } },
220
- payloads: { "FPay-0": {
221
- name: "FPay-0",
222
- payload: 0,
223
- center_of_mass: [
224
- 0,
225
- 0,
226
- 0
227
- ],
228
- moment_of_inertia: [
229
- 0,
230
- 0,
231
- 0
232
- ]
233
- } },
234
- cycle_time: 8,
235
- dh_parameters: [
236
- {
237
- alpha: 1.5707963267948966,
238
- d: 162.25
324
+ {
325
+ position: {
326
+ lower_limit: -6.283185307179586,
327
+ upper_limit: 6.283185307179586
239
328
  },
240
- { a: -425 },
241
- { a: -392.2 },
242
- {
243
- alpha: 1.5707963267948966,
244
- d: 133.3
329
+ velocity: 3.34159255027771,
330
+ acceleration: 40,
331
+ torque: 28
332
+ },
333
+ {
334
+ position: {
335
+ lower_limit: -6.283185307179586,
336
+ upper_limit: 6.283185307179586
245
337
  },
246
- {
247
- alpha: -1.5707963267948966,
248
- d: 99.7
338
+ velocity: 3.34159255027771,
339
+ acceleration: 40,
340
+ torque: 28
341
+ }
342
+ ],
343
+ tcp: { velocity: 5e3 }
344
+ },
345
+ manual_t1_limits: {
346
+ joints: [
347
+ {
348
+ position: {
349
+ lower_limit: -6.283185307179586,
350
+ upper_limit: 6.283185307179586
249
351
  },
250
- { d: 99.6 }
251
- ],
252
- operation_limits: {
253
- auto_limits: {
254
- joints: [
255
- {
256
- position: {
257
- lower_limit: -6.283185307179586,
258
- upper_limit: 6.283185307179586
259
- },
260
- velocity: 3.34159255027771,
261
- acceleration: 40,
262
- torque: 150
263
- },
264
- {
265
- position: {
266
- lower_limit: -6.283185307179586,
267
- upper_limit: 6.283185307179586
268
- },
269
- velocity: 3.34159255027771,
270
- acceleration: 40,
271
- torque: 150
272
- },
273
- {
274
- position: {
275
- lower_limit: -6.283185307179586,
276
- upper_limit: 6.283185307179586
277
- },
278
- velocity: 3.34159255027771,
279
- acceleration: 40,
280
- torque: 150
281
- },
282
- {
283
- position: {
284
- lower_limit: -6.283185307179586,
285
- upper_limit: 6.283185307179586
286
- },
287
- velocity: 3.34159255027771,
288
- acceleration: 40,
289
- torque: 28
290
- },
291
- {
292
- position: {
293
- lower_limit: -6.283185307179586,
294
- upper_limit: 6.283185307179586
295
- },
296
- velocity: 3.34159255027771,
297
- acceleration: 40,
298
- torque: 28
299
- },
300
- {
301
- position: {
302
- lower_limit: -6.283185307179586,
303
- upper_limit: 6.283185307179586
304
- },
305
- velocity: 3.34159255027771,
306
- acceleration: 40,
307
- torque: 28
308
- }
309
- ],
310
- tcp: { velocity: 5e3 },
311
- elbow: { velocity: 5e3 },
312
- flange: { velocity: 5e3 }
352
+ velocity: 3.34159255027771,
353
+ acceleration: 40,
354
+ torque: 150
355
+ },
356
+ {
357
+ position: {
358
+ lower_limit: -6.283185307179586,
359
+ upper_limit: 6.283185307179586
313
360
  },
314
- manual_limits: {
315
- joints: [
316
- {
317
- position: {
318
- lower_limit: -6.283185307179586,
319
- upper_limit: 6.283185307179586
320
- },
321
- velocity: 3.34159255027771,
322
- acceleration: 40,
323
- torque: 150
324
- },
325
- {
326
- position: {
327
- lower_limit: -6.283185307179586,
328
- upper_limit: 6.283185307179586
329
- },
330
- velocity: 3.34159255027771,
331
- acceleration: 40,
332
- torque: 150
333
- },
334
- {
335
- position: {
336
- lower_limit: -6.283185307179586,
337
- upper_limit: 6.283185307179586
338
- },
339
- velocity: 3.34159255027771,
340
- acceleration: 40,
341
- torque: 150
342
- },
343
- {
344
- position: {
345
- lower_limit: -6.283185307179586,
346
- upper_limit: 6.283185307179586
347
- },
348
- velocity: 3.34159255027771,
349
- acceleration: 40,
350
- torque: 28
351
- },
352
- {
353
- position: {
354
- lower_limit: -6.283185307179586,
355
- upper_limit: 6.283185307179586
356
- },
357
- velocity: 3.34159255027771,
358
- acceleration: 40,
359
- torque: 28
360
- },
361
- {
362
- position: {
363
- lower_limit: -6.283185307179586,
364
- upper_limit: 6.283185307179586
365
- },
366
- velocity: 3.34159255027771,
367
- acceleration: 40,
368
- torque: 28
369
- }
370
- ],
371
- tcp: { velocity: 5e3 }
361
+ velocity: 3.34159255027771,
362
+ acceleration: 40,
363
+ torque: 150
364
+ },
365
+ {
366
+ position: {
367
+ lower_limit: -6.283185307179586,
368
+ upper_limit: 6.283185307179586
372
369
  },
373
- manual_t1_limits: {
374
- joints: [
375
- {
376
- position: {
377
- lower_limit: -6.283185307179586,
378
- upper_limit: 6.283185307179586
379
- },
380
- velocity: 3.34159255027771,
381
- acceleration: 40,
382
- torque: 150
383
- },
384
- {
385
- position: {
386
- lower_limit: -6.283185307179586,
387
- upper_limit: 6.283185307179586
388
- },
389
- velocity: 3.34159255027771,
390
- acceleration: 40,
391
- torque: 150
392
- },
393
- {
394
- position: {
395
- lower_limit: -6.283185307179586,
396
- upper_limit: 6.283185307179586
397
- },
398
- velocity: 3.34159255027771,
399
- acceleration: 40,
400
- torque: 150
401
- },
402
- {
403
- position: {
404
- lower_limit: -6.283185307179586,
405
- upper_limit: 6.283185307179586
406
- },
407
- velocity: 3.34159255027771,
408
- acceleration: 40,
409
- torque: 28
410
- },
411
- {
412
- position: {
413
- lower_limit: -6.283185307179586,
414
- upper_limit: 6.283185307179586
415
- },
416
- velocity: 3.34159255027771,
417
- acceleration: 40,
418
- torque: 28
419
- },
420
- {
421
- position: {
422
- lower_limit: -6.283185307179586,
423
- upper_limit: 6.283185307179586
424
- },
425
- velocity: 3.34159255027771,
426
- acceleration: 40,
427
- torque: 28
428
- }
429
- ],
430
- tcp: { velocity: 5e3 }
370
+ velocity: 3.34159255027771,
371
+ acceleration: 40,
372
+ torque: 150
373
+ },
374
+ {
375
+ position: {
376
+ lower_limit: -6.283185307179586,
377
+ upper_limit: 6.283185307179586
431
378
  },
432
- manual_t2_limits: {
433
- joints: [
434
- {
435
- position: {
436
- lower_limit: -6.283185307179586,
437
- upper_limit: 6.283185307179586
438
- },
439
- velocity: 3.34159255027771,
440
- acceleration: 40,
441
- torque: 150
442
- },
443
- {
444
- position: {
445
- lower_limit: -6.283185307179586,
446
- upper_limit: 6.283185307179586
447
- },
448
- velocity: 3.34159255027771,
449
- acceleration: 40,
450
- torque: 150
451
- },
452
- {
453
- position: {
454
- lower_limit: -6.283185307179586,
455
- upper_limit: 6.283185307179586
456
- },
457
- velocity: 3.34159255027771,
458
- acceleration: 40,
459
- torque: 150
460
- },
461
- {
462
- position: {
463
- lower_limit: -6.283185307179586,
464
- upper_limit: 6.283185307179586
465
- },
466
- velocity: 3.34159255027771,
467
- acceleration: 40,
468
- torque: 28
469
- },
470
- {
471
- position: {
472
- lower_limit: -6.283185307179586,
473
- upper_limit: 6.283185307179586
474
- },
475
- velocity: 3.34159255027771,
476
- acceleration: 40,
477
- torque: 28
478
- },
479
- {
480
- position: {
481
- lower_limit: -6.283185307179586,
482
- upper_limit: 6.283185307179586
483
- },
484
- velocity: 3.34159255027771,
485
- acceleration: 40,
486
- torque: 28
487
- }
488
- ],
489
- tcp: { velocity: 5e3 }
490
- }
379
+ velocity: 3.34159255027771,
380
+ acceleration: 40,
381
+ torque: 28
491
382
  },
492
- serial_number: "WBVirtualRobot"
493
- };
383
+ {
384
+ position: {
385
+ lower_limit: -6.283185307179586,
386
+ upper_limit: 6.283185307179586
387
+ },
388
+ velocity: 3.34159255027771,
389
+ acceleration: 40,
390
+ torque: 28
391
+ },
392
+ {
393
+ position: {
394
+ lower_limit: -6.283185307179586,
395
+ upper_limit: 6.283185307179586
396
+ },
397
+ velocity: 3.34159255027771,
398
+ acceleration: 40,
399
+ torque: 28
400
+ }
401
+ ],
402
+ tcp: { velocity: 5e3 }
403
+ },
404
+ manual_t2_limits: {
405
+ joints: [
406
+ {
407
+ position: {
408
+ lower_limit: -6.283185307179586,
409
+ upper_limit: 6.283185307179586
410
+ },
411
+ velocity: 3.34159255027771,
412
+ acceleration: 40,
413
+ torque: 150
414
+ },
415
+ {
416
+ position: {
417
+ lower_limit: -6.283185307179586,
418
+ upper_limit: 6.283185307179586
419
+ },
420
+ velocity: 3.34159255027771,
421
+ acceleration: 40,
422
+ torque: 150
423
+ },
424
+ {
425
+ position: {
426
+ lower_limit: -6.283185307179586,
427
+ upper_limit: 6.283185307179586
428
+ },
429
+ velocity: 3.34159255027771,
430
+ acceleration: 40,
431
+ torque: 150
432
+ },
433
+ {
434
+ position: {
435
+ lower_limit: -6.283185307179586,
436
+ upper_limit: 6.283185307179586
437
+ },
438
+ velocity: 3.34159255027771,
439
+ acceleration: 40,
440
+ torque: 28
441
+ },
442
+ {
443
+ position: {
444
+ lower_limit: -6.283185307179586,
445
+ upper_limit: 6.283185307179586
446
+ },
447
+ velocity: 3.34159255027771,
448
+ acceleration: 40,
449
+ torque: 28
450
+ },
451
+ {
452
+ position: {
453
+ lower_limit: -6.283185307179586,
454
+ upper_limit: 6.283185307179586
455
+ },
456
+ velocity: 3.34159255027771,
457
+ acceleration: 40,
458
+ torque: 28
459
+ }
460
+ ],
461
+ tcp: { velocity: 5e3 }
494
462
  }
495
463
  },
496
- {
497
- method: "GET",
498
- path: "/cells/:cellId/controllers/:controllerId/coordinate-systems",
499
- handle() {
500
- return [{
501
- coordinate_system: "",
502
- name: "world",
503
- reference_coordinate_system: "",
504
- position: [
505
- 0,
506
- 0,
507
- 0
508
- ],
509
- orientation: [
510
- 0,
511
- 0,
512
- 0
513
- ],
514
- orientation_type: "ROTATION_VECTOR"
515
- }, {
516
- coordinate_system: "CS-0",
517
- name: "Default-CS",
518
- reference_coordinate_system: "",
519
- position: [
520
- 0,
521
- 0,
522
- 0
523
- ],
524
- orientation: [
525
- 0,
526
- 0,
527
- 0
528
- ],
529
- orientation_type: "ROTATION_VECTOR"
530
- }];
464
+ serial_number: "WBVirtualRobot"
465
+ };
466
+ }
467
+ };
468
+
469
+ //#endregion
470
+ //#region src/lib/v2/mock/getMotionGroupKinematicModel.ts
471
+ const getMotionGroupKinematicModel = {
472
+ method: "GET",
473
+ path: "/motion-group-models/:motionGroupModel/kinematic",
474
+ handle() {
475
+ return {
476
+ dh_parameters: [
477
+ {
478
+ alpha: 1.5707963267948966,
479
+ theta: 0,
480
+ a: 0,
481
+ d: 162.25,
482
+ reverse_rotation_direction: false
483
+ },
484
+ {
485
+ alpha: 0,
486
+ theta: 0,
487
+ a: -425,
488
+ d: 0,
489
+ reverse_rotation_direction: false
490
+ },
491
+ {
492
+ alpha: 0,
493
+ theta: 0,
494
+ a: -392.2,
495
+ d: 0,
496
+ reverse_rotation_direction: false
497
+ },
498
+ {
499
+ alpha: 1.5707963267948966,
500
+ theta: 0,
501
+ a: 0,
502
+ d: 133.3,
503
+ reverse_rotation_direction: false
504
+ },
505
+ {
506
+ alpha: -1.5707963267948966,
507
+ theta: 0,
508
+ a: 0,
509
+ d: 99.7,
510
+ reverse_rotation_direction: false
511
+ },
512
+ {
513
+ alpha: 0,
514
+ theta: 0,
515
+ a: 0,
516
+ d: 99.6,
517
+ reverse_rotation_direction: false
531
518
  }
532
- }
519
+ ],
520
+ inverse_solver: "Universalrobots"
521
+ };
522
+ }
523
+ };
524
+
525
+ //#endregion
526
+ //#region src/lib/v2/mock/getRobotController.ts
527
+ const getRobotController = {
528
+ method: "GET",
529
+ path: "/cells/:cellId/controllers/:controllerId",
530
+ handle() {
531
+ return {
532
+ configuration: {
533
+ initial_joint_position: "[0,-1.571,-1.571,-1.571,1.571,-1.571,0]",
534
+ kind: "VirtualController",
535
+ manufacturer: "universalrobots",
536
+ type: "universalrobots-ur5e"
537
+ },
538
+ name: "mock-ur5"
539
+ };
540
+ }
541
+ };
542
+
543
+ //#endregion
544
+ //#region src/lib/v2/mock/listCoordinateSystems.ts
545
+ const listCoordinateSystems = {
546
+ method: "GET",
547
+ path: "/cells/:cellId/controllers/:controllerId/coordinate-systems",
548
+ handle() {
549
+ return [{
550
+ coordinate_system: "",
551
+ name: "world",
552
+ reference_coordinate_system: "",
553
+ position: [
554
+ 0,
555
+ 0,
556
+ 0
557
+ ],
558
+ orientation: [
559
+ 0,
560
+ 0,
561
+ 0
562
+ ],
563
+ orientation_type: "ROTATION_VECTOR"
564
+ }, {
565
+ coordinate_system: "CS-0",
566
+ name: "Default-CS",
567
+ reference_coordinate_system: "",
568
+ position: [
569
+ 0,
570
+ 0,
571
+ 0
572
+ ],
573
+ orientation: [
574
+ 0,
575
+ 0,
576
+ 0
577
+ ],
578
+ orientation_type: "ROTATION_VECTOR"
579
+ }];
580
+ }
581
+ };
582
+
583
+ //#endregion
584
+ //#region src/lib/v2/mock/listRobotControllers.ts
585
+ const listRobotControllers = {
586
+ method: "GET",
587
+ path: "/cells/:cellId/controllers",
588
+ handle() {
589
+ return ["mock-ur5e"];
590
+ }
591
+ };
592
+
593
+ //#endregion
594
+ //#region src/lib/v2/mock/MockNovaInstance.ts
595
+ /**
596
+ * Ultra-simplified mock Nova server for testing stuff
597
+ */
598
+ var MockNovaInstance = class {
599
+ constructor() {
600
+ this.connections = [];
601
+ }
602
+ async handleAPIRequest(config) {
603
+ const apiHandlers = [
604
+ listRobotControllers,
605
+ getRobotController,
606
+ getMotionGroupDescription,
607
+ getCurrentRobotControllerState,
608
+ listCoordinateSystems,
609
+ getMotionGroupKinematicModel
533
610
  ];
534
611
  const method = config.method?.toUpperCase() || "GET";
535
- const path = `/cells${config.url?.split("/cells")[1]?.split("?")[0]}`;
612
+ if (!config.url) throw new Error("No url sent with request");
613
+ const path = config.url;
536
614
  for (const handler of apiHandlers) {
537
- const match = pathToRegexp.match(handler.path)(path || "");
615
+ const match = pathToRegexp.match(handler.path)(path);
538
616
  if (method === handler.method && match) {
539
617
  const json = handler.handle();
540
618
  return {