@wandelbots/nova-js 3.5.1 → 3.5.2-pr.feat-addTestForQueryUsingApiCAll.228.a9bede0

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