@viamrobotics/test-widgets 0.7.0 → 0.8.0
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.
- package/dist/client-map.d.ts +30 -30
- package/dist/client-map.js +32 -29
- package/dist/components/index.d.ts +20 -0
- package/dist/components/index.js +20 -0
- package/dist/components/is-moving.svelte +1 -4
- package/dist/components/mutation-section.svelte +1 -1
- package/dist/components/widgets/arm/arm.svelte +8 -5
- package/dist/components/widgets/arm/get-joint-positions-widget.svelte +36 -0
- package/dist/components/widgets/arm/get-joint-positions-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/arm/is-moving-widget.svelte +20 -0
- package/dist/components/widgets/arm/is-moving-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/arm/move-to-joint-positions-widget.svelte +9 -5
- package/dist/components/widgets/arm/move-to-position.svelte +31 -3
- package/dist/components/widgets/audio-input/get-properties-widget.svelte +43 -0
- package/dist/components/widgets/audio-input/get-properties-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/audio-output/get-properties-widget.svelte +43 -0
- package/dist/components/widgets/audio-output/get-properties-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/base/is-moving-widget.svelte +20 -0
- package/dist/components/widgets/base/is-moving-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/base/quick-move.svelte +12 -5
- package/dist/components/widgets/camera/live-or-polling-video.svelte +8 -1
- package/dist/components/widgets/encoder/encoder-position-type.d.ts +8 -0
- package/dist/components/widgets/encoder/encoder-position-type.js +20 -0
- package/dist/components/widgets/encoder/encoder.svelte +3 -20
- package/dist/components/widgets/encoder/get-position-widget.svelte +54 -0
- package/dist/components/widgets/encoder/get-position-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/gantry/get-position-widget.svelte +43 -0
- package/dist/components/widgets/gantry/get-position-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/gantry/is-moving-widget.svelte +20 -0
- package/dist/components/widgets/gantry/is-moving-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/gripper/gripper.svelte +1 -1
- package/dist/components/widgets/gripper/is-holding-something.svelte +1 -4
- package/dist/components/widgets/gripper/is-moving-widget.svelte +20 -0
- package/dist/components/widgets/gripper/is-moving-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/motor/is-moving-widget.svelte +20 -0
- package/dist/components/widgets/motor/is-moving-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/motor/motor.svelte +2 -8
- package/dist/components/widgets/movement-sensor/get-accuracy-widget.svelte +38 -0
- package/dist/components/widgets/movement-sensor/get-accuracy-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/movement-sensor/get-compass-heading-widget.svelte +38 -0
- package/dist/components/widgets/movement-sensor/get-compass-heading-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/movement-sensor/get-orientation-widget.svelte +38 -0
- package/dist/components/widgets/movement-sensor/get-orientation-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/movement-sensor/get-position-widget.svelte +38 -0
- package/dist/components/widgets/movement-sensor/get-position-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/power-sensor/get-current-widget.svelte +38 -0
- package/dist/components/widgets/power-sensor/get-current-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/power-sensor/get-power-widget.svelte +38 -0
- package/dist/components/widgets/power-sensor/get-power-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/power-sensor/get-voltage-widget.svelte +38 -0
- package/dist/components/widgets/power-sensor/get-voltage-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/servo/is-moving-widget.svelte +20 -0
- package/dist/components/widgets/servo/is-moving-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/slam/get-position-widget.svelte +38 -0
- package/dist/components/widgets/slam/get-position-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/vision-service/vision-service.svelte +9 -10
- package/dist/index.d.ts +4 -1
- package/dist/index.js +5 -1
- package/dist/pip/context.svelte.d.ts +2 -0
- package/dist/pip/context.svelte.js +48 -20
- package/dist/resource-triplet.d.ts +37 -0
- package/dist/resource-triplet.js +37 -0
- package/dist/resource-widget.js +187 -0
- package/dist/resource.d.ts +0 -9
- package/dist/resource.js +0 -72
- package/package.json +3 -3
package/dist/client-map.d.ts
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { ArmClient, AudioInClient, AudioOutClient, BaseClient, BoardClient, ButtonClient, CameraClient, DataManagerClient, DiscoveryClient, EncoderClient, GantryClient, GenericComponentClient, GenericServiceClient, GripperClient, InputControllerClient, MLModelClient, MotionClient, MotorClient, MovementSensorClient, NavigationClient, PoseTrackerClient, PowerSensorClient, type ResourceName, SensorClient, ServoClient, SlamClient, SwitchClient, VideoClient, VisionClient, WorldStateStoreClient } from '@viamrobotics/sdk';
|
|
2
2
|
export declare const clientMap: {
|
|
3
|
-
readonly
|
|
4
|
-
readonly
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
19
|
-
readonly
|
|
20
|
-
readonly
|
|
21
|
-
readonly
|
|
22
|
-
readonly
|
|
23
|
-
readonly
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
-
readonly
|
|
27
|
-
readonly
|
|
28
|
-
readonly
|
|
29
|
-
readonly
|
|
30
|
-
readonly
|
|
31
|
-
readonly
|
|
3
|
+
readonly "rdk:component:arm": typeof ArmClient;
|
|
4
|
+
readonly "rdk:component:audio_in": typeof AudioInClient;
|
|
5
|
+
readonly "rdk:component:audio_out": typeof AudioOutClient;
|
|
6
|
+
readonly "rdk:component:base": typeof BaseClient;
|
|
7
|
+
readonly "rdk:component:board": typeof BoardClient;
|
|
8
|
+
readonly "rdk:component:button": typeof ButtonClient;
|
|
9
|
+
readonly "rdk:component:camera": typeof CameraClient;
|
|
10
|
+
readonly "rdk:component:encoder": typeof EncoderClient;
|
|
11
|
+
readonly "rdk:component:gantry": typeof GantryClient;
|
|
12
|
+
readonly "rdk:component:generic": typeof GenericComponentClient;
|
|
13
|
+
readonly "rdk:component:gripper": typeof GripperClient;
|
|
14
|
+
readonly "rdk:component:input_controller": typeof InputControllerClient;
|
|
15
|
+
readonly "rdk:component:motor": typeof MotorClient;
|
|
16
|
+
readonly "rdk:component:movement_sensor": typeof MovementSensorClient;
|
|
17
|
+
readonly "rdk:component:pose_tracker": typeof PoseTrackerClient;
|
|
18
|
+
readonly "rdk:component:power_sensor": typeof PowerSensorClient;
|
|
19
|
+
readonly "rdk:component:sensor": typeof SensorClient;
|
|
20
|
+
readonly "rdk:component:servo": typeof ServoClient;
|
|
21
|
+
readonly "rdk:component:switch": typeof SwitchClient;
|
|
22
|
+
readonly "rdk:service:data_manager": typeof DataManagerClient;
|
|
23
|
+
readonly "rdk:service:discovery": typeof DiscoveryClient;
|
|
24
|
+
readonly "rdk:service:generic": typeof GenericServiceClient;
|
|
25
|
+
readonly "rdk:service:mlmodel": typeof MLModelClient;
|
|
26
|
+
readonly "rdk:service:motion": typeof MotionClient;
|
|
27
|
+
readonly "rdk:service:navigation": typeof NavigationClient;
|
|
28
|
+
readonly "rdk:service:slam": typeof SlamClient;
|
|
29
|
+
readonly "rdk:service:video": typeof VideoClient;
|
|
30
|
+
readonly "rdk:service:vision": typeof VisionClient;
|
|
31
|
+
readonly "rdk:service:world_state_store": typeof WorldStateStoreClient;
|
|
32
32
|
};
|
|
33
|
-
export declare const clientForResource: (resource: ResourceName) => typeof ArmClient | typeof AudioInClient | typeof AudioOutClient | typeof BaseClient | typeof BoardClient | typeof ButtonClient | typeof CameraClient | typeof EncoderClient | typeof GantryClient | typeof GenericComponentClient | typeof GripperClient | typeof InputControllerClient | typeof MotorClient | typeof MovementSensorClient | typeof PoseTrackerClient | typeof PowerSensorClient | typeof SensorClient | typeof ServoClient | typeof SwitchClient | typeof DataManagerClient | typeof DiscoveryClient | typeof GenericServiceClient | typeof MLModelClient | typeof MotionClient | typeof NavigationClient | typeof SlamClient | typeof
|
|
33
|
+
export declare const clientForResource: (resource: ResourceName) => typeof ArmClient | typeof AudioInClient | typeof AudioOutClient | typeof BaseClient | typeof BoardClient | typeof ButtonClient | typeof CameraClient | typeof EncoderClient | typeof GantryClient | typeof GenericComponentClient | typeof GripperClient | typeof InputControllerClient | typeof MotorClient | typeof MovementSensorClient | typeof PoseTrackerClient | typeof PowerSensorClient | typeof SensorClient | typeof ServoClient | typeof SwitchClient | typeof DataManagerClient | typeof DiscoveryClient | typeof GenericServiceClient | typeof MLModelClient | typeof MotionClient | typeof NavigationClient | typeof SlamClient | typeof VideoClient | typeof VisionClient | typeof WorldStateStoreClient | undefined;
|
|
34
34
|
export declare const supportsDoCommand: (resource: ResourceName) => boolean;
|
package/dist/client-map.js
CHANGED
|
@@ -1,35 +1,38 @@
|
|
|
1
1
|
import { ArmClient, AudioInClient, AudioOutClient, BaseClient, BoardClient, ButtonClient, CameraClient, DataManagerClient, DiscoveryClient, EncoderClient, GantryClient, GenericComponentClient, GenericServiceClient, GripperClient, InputControllerClient, MLModelClient, MotionClient, MotorClient, MovementSensorClient, NavigationClient, PoseTrackerClient, PowerSensorClient, SensorClient, ServoClient, SlamClient, SwitchClient, VideoClient, VisionClient, WorldStateStoreClient, } from '@viamrobotics/sdk';
|
|
2
2
|
import { getResourceAPI } from "./get-resource-api.js";
|
|
3
|
+
import { ResourceTriplets } from "./resource-triplet.js";
|
|
3
4
|
export const clientMap = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
5
|
+
// components
|
|
6
|
+
[ResourceTriplets.Arm]: ArmClient,
|
|
7
|
+
[ResourceTriplets.AudioInput]: AudioInClient,
|
|
8
|
+
[ResourceTriplets.AudioOutput]: AudioOutClient,
|
|
9
|
+
[ResourceTriplets.Base]: BaseClient,
|
|
10
|
+
[ResourceTriplets.Board]: BoardClient,
|
|
11
|
+
[ResourceTriplets.Button]: ButtonClient,
|
|
12
|
+
[ResourceTriplets.Camera]: CameraClient,
|
|
13
|
+
[ResourceTriplets.Encoder]: EncoderClient,
|
|
14
|
+
[ResourceTriplets.Gantry]: GantryClient,
|
|
15
|
+
[ResourceTriplets.GenericComponent]: GenericComponentClient,
|
|
16
|
+
[ResourceTriplets.Gripper]: GripperClient,
|
|
17
|
+
[ResourceTriplets.InputController]: InputControllerClient,
|
|
18
|
+
[ResourceTriplets.Motor]: MotorClient,
|
|
19
|
+
[ResourceTriplets.MovementSensor]: MovementSensorClient,
|
|
20
|
+
[ResourceTriplets.PoseTracker]: PoseTrackerClient,
|
|
21
|
+
[ResourceTriplets.PowerSensor]: PowerSensorClient,
|
|
22
|
+
[ResourceTriplets.Sensor]: SensorClient,
|
|
23
|
+
[ResourceTriplets.Servo]: ServoClient,
|
|
24
|
+
[ResourceTriplets.Switch]: SwitchClient,
|
|
25
|
+
// services
|
|
26
|
+
[ResourceTriplets.DataManager]: DataManagerClient,
|
|
27
|
+
[ResourceTriplets.Discovery]: DiscoveryClient,
|
|
28
|
+
[ResourceTriplets.GenericService]: GenericServiceClient,
|
|
29
|
+
[ResourceTriplets.MLModel]: MLModelClient,
|
|
30
|
+
[ResourceTriplets.Motion]: MotionClient,
|
|
31
|
+
[ResourceTriplets.Navigation]: NavigationClient,
|
|
32
|
+
[ResourceTriplets.Slam]: SlamClient,
|
|
33
|
+
[ResourceTriplets.Video]: VideoClient,
|
|
34
|
+
[ResourceTriplets.Vision]: VisionClient,
|
|
35
|
+
[ResourceTriplets.WorldStateStore]: WorldStateStoreClient,
|
|
33
36
|
};
|
|
34
37
|
export const clientForResource = (resource) => {
|
|
35
38
|
const resAPI = getResourceAPI(resource);
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
export { default as ConnectionStatus } from './connection-status.svelte';
|
|
2
2
|
export { default as SectionTitle } from './section-title.svelte';
|
|
3
3
|
export { default as ArmWidget } from './widgets/arm/arm.svelte';
|
|
4
|
+
export { default as ArmGetJointPositionsWidget } from './widgets/arm/get-joint-positions-widget.svelte';
|
|
5
|
+
export { default as ArmIsMovingWidget } from './widgets/arm/is-moving-widget.svelte';
|
|
4
6
|
export { default as ArmMoveToJointPositionsWidget } from './widgets/arm/move-to-joint-positions-widget.svelte';
|
|
5
7
|
export { default as ArmMoveToPositionWidget } from './widgets/arm/move-to-position-widget.svelte';
|
|
6
8
|
export { default as ArmQuickMoveWidget } from './widgets/arm/quick-move-widget.svelte';
|
|
7
9
|
export { default as AudioInputWidget } from './widgets/audio-input/audio-input.svelte';
|
|
10
|
+
export { default as AudioInputGetPropertiesWidget } from './widgets/audio-input/get-properties-widget.svelte';
|
|
8
11
|
export { default as AudioOutputWidget } from './widgets/audio-output/audio-output.svelte';
|
|
12
|
+
export { default as AudioOutputGetPropertiesWidget } from './widgets/audio-output/get-properties-widget.svelte';
|
|
9
13
|
export { default as BaseWidget } from './widgets/base/base.svelte';
|
|
14
|
+
export { default as BaseIsMovingWidget } from './widgets/base/is-moving-widget.svelte';
|
|
10
15
|
export { default as BaseMoveStraightWidget } from './widgets/base/move-straight-widget.svelte';
|
|
11
16
|
export { default as BaseQuickMoveWidget } from './widgets/base/quick-move-widget.svelte';
|
|
12
17
|
export { default as BaseSetPowerWidget } from './widgets/base/set-power-widget.svelte';
|
|
@@ -22,31 +27,46 @@ export type { ComponentPreview, ComponentPreviewSnippet, } from './widgets/disco
|
|
|
22
27
|
export { default as DiscoveryWidget } from './widgets/discovery/discovery.svelte';
|
|
23
28
|
export { default as DoCommandWidget } from './widgets/do-command/do-command.svelte';
|
|
24
29
|
export { default as EncoderWidget } from './widgets/encoder/encoder.svelte';
|
|
30
|
+
export { default as EncoderGetPositionWidget } from './widgets/encoder/get-position-widget.svelte';
|
|
25
31
|
export { default as GantryWidget } from './widgets/gantry/gantry.svelte';
|
|
32
|
+
export { default as GantryGetPositionWidget } from './widgets/gantry/get-position-widget.svelte';
|
|
33
|
+
export { default as GantryIsMovingWidget } from './widgets/gantry/is-moving-widget.svelte';
|
|
26
34
|
export { default as GantryHomeWidget } from './widgets/gantry/home.svelte';
|
|
27
35
|
export { default as GantryMoveToPositionWidget } from './widgets/gantry/move-to-position-widget.svelte';
|
|
28
36
|
export { default as GantryQuickMoveWidget } from './widgets/gantry/quick-move-widget.svelte';
|
|
29
37
|
export { default as GenericWidget } from './widgets/generic/generic.svelte';
|
|
30
38
|
export { default as GripperGrabWidget } from './widgets/gripper/grab.svelte';
|
|
31
39
|
export { default as GripperWidget } from './widgets/gripper/gripper.svelte';
|
|
40
|
+
export { default as GripperIsHoldingSomethingWidget } from './widgets/gripper/is-holding-something.svelte';
|
|
41
|
+
export { default as GripperIsMovingWidget } from './widgets/gripper/is-moving-widget.svelte';
|
|
32
42
|
export { default as GripperOpenWidget } from './widgets/gripper/open.svelte';
|
|
33
43
|
export { default as InputControllerWidget } from './widgets/input-controller/input-controller.svelte';
|
|
34
44
|
export { default as MLModelServiceWidget } from './widgets/ml-model-service/ml-model-service.svelte';
|
|
35
45
|
export { default as MotorGoForWidget } from './widgets/motor/go-for-view.svelte';
|
|
36
46
|
export { default as MotorGoToWidget } from './widgets/motor/go-to-view.svelte';
|
|
37
47
|
export { default as MotorWidget } from './widgets/motor/motor.svelte';
|
|
48
|
+
export { default as MotorIsMovingWidget } from './widgets/motor/is-moving-widget.svelte';
|
|
38
49
|
export { default as MotorQuickMoveWidget } from './widgets/motor/quick-move-widget.svelte';
|
|
39
50
|
export { default as MotorSetPowerWidget } from './widgets/motor/set-power-widget.svelte';
|
|
40
51
|
export { default as MotorSetRPMWidget } from './widgets/motor/set-rpm-widget.svelte';
|
|
41
52
|
export { default as MovementSensorWidget } from './widgets/movement-sensor/movement-sensor.svelte';
|
|
53
|
+
export { default as MovementSensorGetPositionWidget } from './widgets/movement-sensor/get-position-widget.svelte';
|
|
54
|
+
export { default as MovementSensorGetOrientationWidget } from './widgets/movement-sensor/get-orientation-widget.svelte';
|
|
55
|
+
export { default as MovementSensorGetCompassHeadingWidget } from './widgets/movement-sensor/get-compass-heading-widget.svelte';
|
|
56
|
+
export { default as MovementSensorGetAccuracyWidget } from './widgets/movement-sensor/get-accuracy-widget.svelte';
|
|
42
57
|
export { default as NavigationServiceWidget } from './widgets/navigation/navigation.svelte';
|
|
43
58
|
export { default as PowerSensorWidget } from './widgets/power-sensor/power-sensor.svelte';
|
|
59
|
+
export { default as PowerSensorGetVoltageWidget } from './widgets/power-sensor/get-voltage-widget.svelte';
|
|
60
|
+
export { default as PowerSensorGetCurrentWidget } from './widgets/power-sensor/get-current-widget.svelte';
|
|
61
|
+
export { default as PowerSensorGetPowerWidget } from './widgets/power-sensor/get-power-widget.svelte';
|
|
44
62
|
export { default as SensorWidget } from './widgets/sensor/sensor.svelte';
|
|
45
63
|
export { default as ServoMoveWidget } from './widgets/servo/move-widget.svelte';
|
|
46
64
|
export { default as ServoQuickMoveWidget } from './widgets/servo/quick-move-widget.svelte';
|
|
47
65
|
export { default as ServoWidget } from './widgets/servo/servo.svelte';
|
|
66
|
+
export { default as ServoIsMovingWidget } from './widgets/servo/is-moving-widget.svelte';
|
|
48
67
|
export { default as SlamMap2D } from './slam/map2d/index.svelte';
|
|
49
68
|
export { default as SlamWidget } from './widgets/slam/slam.svelte';
|
|
69
|
+
export { default as SlamGetPositionWidget } from './widgets/slam/get-position-widget.svelte';
|
|
50
70
|
export { default as StopWidget } from './stop.svelte';
|
|
51
71
|
export { default as SwitchPositionWidget } from './widgets/switch/position-view.svelte';
|
|
52
72
|
export { default as SwitchWidget } from './widgets/switch/switch.svelte';
|
package/dist/components/index.js
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
export { default as ConnectionStatus } from './connection-status.svelte';
|
|
2
2
|
export { default as SectionTitle } from './section-title.svelte';
|
|
3
3
|
export { default as ArmWidget } from './widgets/arm/arm.svelte';
|
|
4
|
+
export { default as ArmGetJointPositionsWidget } from './widgets/arm/get-joint-positions-widget.svelte';
|
|
5
|
+
export { default as ArmIsMovingWidget } from './widgets/arm/is-moving-widget.svelte';
|
|
4
6
|
export { default as ArmMoveToJointPositionsWidget } from './widgets/arm/move-to-joint-positions-widget.svelte';
|
|
5
7
|
export { default as ArmMoveToPositionWidget } from './widgets/arm/move-to-position-widget.svelte';
|
|
6
8
|
export { default as ArmQuickMoveWidget } from './widgets/arm/quick-move-widget.svelte';
|
|
7
9
|
export { default as AudioInputWidget } from './widgets/audio-input/audio-input.svelte';
|
|
10
|
+
export { default as AudioInputGetPropertiesWidget } from './widgets/audio-input/get-properties-widget.svelte';
|
|
8
11
|
export { default as AudioOutputWidget } from './widgets/audio-output/audio-output.svelte';
|
|
12
|
+
export { default as AudioOutputGetPropertiesWidget } from './widgets/audio-output/get-properties-widget.svelte';
|
|
9
13
|
export { default as BaseWidget } from './widgets/base/base.svelte';
|
|
14
|
+
export { default as BaseIsMovingWidget } from './widgets/base/is-moving-widget.svelte';
|
|
10
15
|
export { default as BaseMoveStraightWidget } from './widgets/base/move-straight-widget.svelte';
|
|
11
16
|
export { default as BaseQuickMoveWidget } from './widgets/base/quick-move-widget.svelte';
|
|
12
17
|
export { default as BaseSetPowerWidget } from './widgets/base/set-power-widget.svelte';
|
|
@@ -21,31 +26,46 @@ export { default as LiveOrPollingVideo } from './widgets/camera/live-or-polling-
|
|
|
21
26
|
export { default as DiscoveryWidget } from './widgets/discovery/discovery.svelte';
|
|
22
27
|
export { default as DoCommandWidget } from './widgets/do-command/do-command.svelte';
|
|
23
28
|
export { default as EncoderWidget } from './widgets/encoder/encoder.svelte';
|
|
29
|
+
export { default as EncoderGetPositionWidget } from './widgets/encoder/get-position-widget.svelte';
|
|
24
30
|
export { default as GantryWidget } from './widgets/gantry/gantry.svelte';
|
|
31
|
+
export { default as GantryGetPositionWidget } from './widgets/gantry/get-position-widget.svelte';
|
|
32
|
+
export { default as GantryIsMovingWidget } from './widgets/gantry/is-moving-widget.svelte';
|
|
25
33
|
export { default as GantryHomeWidget } from './widgets/gantry/home.svelte';
|
|
26
34
|
export { default as GantryMoveToPositionWidget } from './widgets/gantry/move-to-position-widget.svelte';
|
|
27
35
|
export { default as GantryQuickMoveWidget } from './widgets/gantry/quick-move-widget.svelte';
|
|
28
36
|
export { default as GenericWidget } from './widgets/generic/generic.svelte';
|
|
29
37
|
export { default as GripperGrabWidget } from './widgets/gripper/grab.svelte';
|
|
30
38
|
export { default as GripperWidget } from './widgets/gripper/gripper.svelte';
|
|
39
|
+
export { default as GripperIsHoldingSomethingWidget } from './widgets/gripper/is-holding-something.svelte';
|
|
40
|
+
export { default as GripperIsMovingWidget } from './widgets/gripper/is-moving-widget.svelte';
|
|
31
41
|
export { default as GripperOpenWidget } from './widgets/gripper/open.svelte';
|
|
32
42
|
export { default as InputControllerWidget } from './widgets/input-controller/input-controller.svelte';
|
|
33
43
|
export { default as MLModelServiceWidget } from './widgets/ml-model-service/ml-model-service.svelte';
|
|
34
44
|
export { default as MotorGoForWidget } from './widgets/motor/go-for-view.svelte';
|
|
35
45
|
export { default as MotorGoToWidget } from './widgets/motor/go-to-view.svelte';
|
|
36
46
|
export { default as MotorWidget } from './widgets/motor/motor.svelte';
|
|
47
|
+
export { default as MotorIsMovingWidget } from './widgets/motor/is-moving-widget.svelte';
|
|
37
48
|
export { default as MotorQuickMoveWidget } from './widgets/motor/quick-move-widget.svelte';
|
|
38
49
|
export { default as MotorSetPowerWidget } from './widgets/motor/set-power-widget.svelte';
|
|
39
50
|
export { default as MotorSetRPMWidget } from './widgets/motor/set-rpm-widget.svelte';
|
|
40
51
|
export { default as MovementSensorWidget } from './widgets/movement-sensor/movement-sensor.svelte';
|
|
52
|
+
export { default as MovementSensorGetPositionWidget } from './widgets/movement-sensor/get-position-widget.svelte';
|
|
53
|
+
export { default as MovementSensorGetOrientationWidget } from './widgets/movement-sensor/get-orientation-widget.svelte';
|
|
54
|
+
export { default as MovementSensorGetCompassHeadingWidget } from './widgets/movement-sensor/get-compass-heading-widget.svelte';
|
|
55
|
+
export { default as MovementSensorGetAccuracyWidget } from './widgets/movement-sensor/get-accuracy-widget.svelte';
|
|
41
56
|
export { default as NavigationServiceWidget } from './widgets/navigation/navigation.svelte';
|
|
42
57
|
export { default as PowerSensorWidget } from './widgets/power-sensor/power-sensor.svelte';
|
|
58
|
+
export { default as PowerSensorGetVoltageWidget } from './widgets/power-sensor/get-voltage-widget.svelte';
|
|
59
|
+
export { default as PowerSensorGetCurrentWidget } from './widgets/power-sensor/get-current-widget.svelte';
|
|
60
|
+
export { default as PowerSensorGetPowerWidget } from './widgets/power-sensor/get-power-widget.svelte';
|
|
43
61
|
export { default as SensorWidget } from './widgets/sensor/sensor.svelte';
|
|
44
62
|
export { default as ServoMoveWidget } from './widgets/servo/move-widget.svelte';
|
|
45
63
|
export { default as ServoQuickMoveWidget } from './widgets/servo/quick-move-widget.svelte';
|
|
46
64
|
export { default as ServoWidget } from './widgets/servo/servo.svelte';
|
|
65
|
+
export { default as ServoIsMovingWidget } from './widgets/servo/is-moving-widget.svelte';
|
|
47
66
|
export { default as SlamMap2D } from './slam/map2d/index.svelte';
|
|
48
67
|
export { default as SlamWidget } from './widgets/slam/slam.svelte';
|
|
68
|
+
export { default as SlamGetPositionWidget } from './widgets/slam/get-position-widget.svelte';
|
|
49
69
|
export { default as StopWidget } from './stop.svelte';
|
|
50
70
|
export { default as SwitchPositionWidget } from './widgets/switch/position-view.svelte';
|
|
51
71
|
export { default as SwitchWidget } from './widgets/switch/switch.svelte';
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
aria-labelledby={headingID}
|
|
40
40
|
>
|
|
41
41
|
<div class={twMerge('flex grow flex-row flex-wrap gap-2', className)}>
|
|
42
|
-
<div class="flex max-w-
|
|
42
|
+
<div class="flex max-w-50 grow flex-col gap-0.5 pr-4">
|
|
43
43
|
{#if api}
|
|
44
44
|
<SectionTitle
|
|
45
45
|
{title}
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
import ApiSection from '../../api-section.svelte'
|
|
12
12
|
import ConnectionStatus from '../../connection-status.svelte'
|
|
13
13
|
import IsMoving from '../../is-moving.svelte'
|
|
14
|
-
import Queries from '../../queries.svelte'
|
|
15
14
|
import Query from '../../query.svelte'
|
|
16
15
|
import StopButton from '../../stop-button.svelte'
|
|
17
16
|
|
|
@@ -50,6 +49,10 @@
|
|
|
50
49
|
const moveToPosition = (position: Pose) => {
|
|
51
50
|
moveToPosMutation.mutate([position], {})
|
|
52
51
|
}
|
|
52
|
+
|
|
53
|
+
const jointLimitsDegrees = $derived(
|
|
54
|
+
kinematicsQuery.data ? getJointPositionLimits(kinematicsQuery.data as KinematicsJSON) : []
|
|
55
|
+
)
|
|
53
56
|
</script>
|
|
54
57
|
|
|
55
58
|
<ConnectionStatus {partID}>
|
|
@@ -74,17 +77,17 @@
|
|
|
74
77
|
title="MoveToJointPositions"
|
|
75
78
|
api="rdk:component:arm"
|
|
76
79
|
>
|
|
77
|
-
<
|
|
78
|
-
{#if jointPositionsQuery.data
|
|
80
|
+
<Query query={jointPositionsQuery}>
|
|
81
|
+
{#if jointPositionsQuery.data}
|
|
79
82
|
<MoveToJointPositions
|
|
80
83
|
positions={jointPositionsQuery.data.values}
|
|
81
84
|
{moveToJointPositions}
|
|
82
85
|
lastError={moveToJointPosMutation.error}
|
|
83
|
-
jointLimitsDegrees
|
|
86
|
+
{jointLimitsDegrees}
|
|
84
87
|
isMoving={isMovingQuery.data ?? false}
|
|
85
88
|
/>
|
|
86
89
|
{/if}
|
|
87
|
-
</
|
|
90
|
+
</Query>
|
|
88
91
|
</ApiSection>
|
|
89
92
|
<ApiSection
|
|
90
93
|
title="MoveToPosition"
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { ArmClient } from '@viamrobotics/sdk'
|
|
3
|
+
import { createResourceClient, createResourceQuery } from '@viamrobotics/svelte-sdk'
|
|
4
|
+
|
|
5
|
+
import ApiSection from '../../api-section.svelte'
|
|
6
|
+
import Query from '../../query.svelte'
|
|
7
|
+
|
|
8
|
+
import GetJointPositions from './get-joint-positions.svelte'
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
partID: string
|
|
12
|
+
resourceName: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const { partID, resourceName }: Props = $props()
|
|
16
|
+
|
|
17
|
+
const client = createResourceClient(
|
|
18
|
+
ArmClient,
|
|
19
|
+
() => partID,
|
|
20
|
+
() => resourceName
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
const query = createResourceQuery(client, 'getJointPositions', { refetchInterval: 500 })
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<ApiSection
|
|
27
|
+
title="GetJointPositions"
|
|
28
|
+
bottomText="Updates automatically"
|
|
29
|
+
class="grow"
|
|
30
|
+
>
|
|
31
|
+
<Query {query}>
|
|
32
|
+
{#if query.data}
|
|
33
|
+
<GetJointPositions positions={query.data.values} />
|
|
34
|
+
{/if}
|
|
35
|
+
</Query>
|
|
36
|
+
</ApiSection>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { ArmClient } from '@viamrobotics/sdk'
|
|
3
|
+
|
|
4
|
+
import IsMoving from '../../is-moving.svelte'
|
|
5
|
+
import { ResourceTriplets } from '../../../resource-triplet'
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
partID: string
|
|
9
|
+
resourceName: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { partID, resourceName }: Props = $props()
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<IsMoving
|
|
16
|
+
client={ArmClient}
|
|
17
|
+
api={ResourceTriplets.Arm}
|
|
18
|
+
{partID}
|
|
19
|
+
{resourceName}
|
|
20
|
+
/>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
createResourceQuery,
|
|
7
7
|
} from '@viamrobotics/svelte-sdk'
|
|
8
8
|
|
|
9
|
-
import
|
|
9
|
+
import Query from '../../query.svelte'
|
|
10
10
|
|
|
11
11
|
import { getJointPositionLimits, type KinematicsJSON } from './joint-position-limits'
|
|
12
12
|
import MoveToJointPositions from './move-to-joint-positions.svelte'
|
|
@@ -36,15 +36,19 @@
|
|
|
36
36
|
const moveToJointPositions = (jointPositionsList: number[]) => {
|
|
37
37
|
moveToJointPosMutation.mutate([jointPositionsList], {})
|
|
38
38
|
}
|
|
39
|
+
|
|
40
|
+
const jointLimitsDegrees = $derived(
|
|
41
|
+
kinematicsQuery.data ? getJointPositionLimits(kinematicsQuery.data as KinematicsJSON) : []
|
|
42
|
+
)
|
|
39
43
|
</script>
|
|
40
44
|
|
|
41
|
-
<
|
|
42
|
-
{#if jointPositionsQuery.data
|
|
45
|
+
<Query query={jointPositionsQuery}>
|
|
46
|
+
{#if jointPositionsQuery.data}
|
|
43
47
|
<MoveToJointPositions
|
|
44
48
|
positions={jointPositionsQuery.data.values}
|
|
45
49
|
{moveToJointPositions}
|
|
46
50
|
lastError={moveToJointPosMutation.error}
|
|
47
|
-
jointLimitsDegrees
|
|
51
|
+
{jointLimitsDegrees}
|
|
48
52
|
/>
|
|
49
53
|
{/if}
|
|
50
|
-
</
|
|
54
|
+
</Query>
|
|
@@ -76,13 +76,36 @@
|
|
|
76
76
|
oZ: 'OZ',
|
|
77
77
|
theta: 'θ',
|
|
78
78
|
} as const
|
|
79
|
+
const positionUnits = $derived({
|
|
80
|
+
x: 'mm',
|
|
81
|
+
y: 'mm',
|
|
82
|
+
z: 'mm',
|
|
83
|
+
oX: '',
|
|
84
|
+
oY: '',
|
|
85
|
+
oZ: '',
|
|
86
|
+
theta: useRadians ? 'rad' : 'deg',
|
|
87
|
+
} as const satisfies Record<keyof Pose, string>)
|
|
88
|
+
|
|
79
89
|
const positionLabelsList = Object.entries(positionLabels) as [keyof Pose, string][]
|
|
80
90
|
</script>
|
|
81
91
|
|
|
82
92
|
<div class="flex min-w-0 flex-col gap-4">
|
|
83
93
|
<!-- Controls Header -->
|
|
84
94
|
<div class="flex items-center justify-between">
|
|
85
|
-
<span class="text-sm">
|
|
95
|
+
<span class="flex flex-row items-center gap-1 text-sm">
|
|
96
|
+
Pose Values
|
|
97
|
+
<Tooltip>
|
|
98
|
+
<Icon
|
|
99
|
+
name="information-outline"
|
|
100
|
+
cx="text-gray-6"
|
|
101
|
+
/>
|
|
102
|
+
|
|
103
|
+
<span slot="description">
|
|
104
|
+
Pose is with respect to the arm origin and does not take into account the motion service
|
|
105
|
+
or frame system.
|
|
106
|
+
</span>
|
|
107
|
+
</Tooltip>
|
|
108
|
+
</span>
|
|
86
109
|
<div class="flex gap-1">
|
|
87
110
|
<AngleUnitToggle
|
|
88
111
|
{useRadians}
|
|
@@ -99,7 +122,7 @@
|
|
|
99
122
|
<thead>
|
|
100
123
|
<tr>
|
|
101
124
|
<th>Pose</th>
|
|
102
|
-
<th>Value
|
|
125
|
+
<th>Value</th>
|
|
103
126
|
</tr>
|
|
104
127
|
</thead>
|
|
105
128
|
<tbody>
|
|
@@ -107,7 +130,12 @@
|
|
|
107
130
|
{@const [key, label] = labelList}
|
|
108
131
|
{@const value = Number.parseFloat(formatNumeric(displayPosition[key]))}
|
|
109
132
|
<tr>
|
|
110
|
-
<th>
|
|
133
|
+
<th>
|
|
134
|
+
<span class="relative inline-flex justify-center">
|
|
135
|
+
{label}
|
|
136
|
+
<abbr class="text-subtle-2 absolute left-full ml-1">{positionUnits[key]}</abbr>
|
|
137
|
+
</span>
|
|
138
|
+
</th>
|
|
111
139
|
<th>
|
|
112
140
|
<NumericInput
|
|
113
141
|
cx="max-w-[76px]"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { AudioInClient } from '@viamrobotics/sdk'
|
|
3
|
+
import { createResourceClient, createResourceQuery } from '@viamrobotics/svelte-sdk'
|
|
4
|
+
|
|
5
|
+
import ApiSection from '../../api-section.svelte'
|
|
6
|
+
import Query from '../../query.svelte'
|
|
7
|
+
|
|
8
|
+
import Properties from './properties.svelte'
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
partID: string
|
|
12
|
+
resourceName: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const { partID, resourceName }: Props = $props()
|
|
16
|
+
|
|
17
|
+
const client = createResourceClient(
|
|
18
|
+
AudioInClient,
|
|
19
|
+
() => partID,
|
|
20
|
+
() => resourceName
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
const query = createResourceQuery(client, 'getProperties', { refetchInterval: 500 })
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<ApiSection
|
|
27
|
+
title="GetProperties"
|
|
28
|
+
description="Audio input properties"
|
|
29
|
+
class="grow"
|
|
30
|
+
>
|
|
31
|
+
<Query
|
|
32
|
+
{query}
|
|
33
|
+
contentCx="h-6"
|
|
34
|
+
>
|
|
35
|
+
{#if query.data !== undefined}
|
|
36
|
+
<Properties
|
|
37
|
+
supportedCodecs={query.data.supportedCodecs}
|
|
38
|
+
sampleRateHz={query.data.sampleRateHz}
|
|
39
|
+
numChannels={query.data.numChannels}
|
|
40
|
+
/>
|
|
41
|
+
{/if}
|
|
42
|
+
</Query>
|
|
43
|
+
</ApiSection>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { AudioOutClient } from '@viamrobotics/sdk'
|
|
3
|
+
import { createResourceClient, createResourceQuery } from '@viamrobotics/svelte-sdk'
|
|
4
|
+
|
|
5
|
+
import ApiSection from '../../api-section.svelte'
|
|
6
|
+
import Query from '../../query.svelte'
|
|
7
|
+
|
|
8
|
+
import Properties from './properties.svelte'
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
partID: string
|
|
12
|
+
resourceName: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const { partID, resourceName }: Props = $props()
|
|
16
|
+
|
|
17
|
+
const client = createResourceClient(
|
|
18
|
+
AudioOutClient,
|
|
19
|
+
() => partID,
|
|
20
|
+
() => resourceName
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
const query = createResourceQuery(client, 'getProperties', { refetchInterval: 500 })
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<ApiSection
|
|
27
|
+
title="GetProperties"
|
|
28
|
+
description="Audio output properties"
|
|
29
|
+
class="grow"
|
|
30
|
+
>
|
|
31
|
+
<Query
|
|
32
|
+
{query}
|
|
33
|
+
contentCx="h-6"
|
|
34
|
+
>
|
|
35
|
+
{#if query.data !== undefined}
|
|
36
|
+
<Properties
|
|
37
|
+
supportedCodecs={query.data.supportedCodecs}
|
|
38
|
+
sampleRateHz={query.data.sampleRateHz}
|
|
39
|
+
numChannels={query.data.numChannels}
|
|
40
|
+
/>
|
|
41
|
+
{/if}
|
|
42
|
+
</Query>
|
|
43
|
+
</ApiSection>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { BaseClient } from '@viamrobotics/sdk'
|
|
3
|
+
|
|
4
|
+
import IsMoving from '../../is-moving.svelte'
|
|
5
|
+
import { ResourceTriplets } from '../../../resource-triplet'
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
partID: string
|
|
9
|
+
resourceName: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { partID, resourceName }: Props = $props()
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<IsMoving
|
|
16
|
+
client={BaseClient}
|
|
17
|
+
api={ResourceTriplets.Base}
|
|
18
|
+
{partID}
|
|
19
|
+
{resourceName}
|
|
20
|
+
/>
|