@viamrobotics/test-widgets 0.16.0 → 0.17.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/components/api-section.svelte +58 -50
- package/dist/components/api-section.svelte.d.ts +24 -11
- package/dist/components/content-rect.svelte +6 -0
- package/dist/components/content-rect.svelte.d.ts +1 -0
- package/dist/components/error.svelte +9 -0
- package/dist/components/error.svelte.d.ts +6 -0
- package/dist/components/index.d.ts +4 -2
- package/dist/components/index.js +4 -2
- package/dist/components/is-moving.svelte +26 -34
- package/dist/components/is-moving.svelte.d.ts +4 -5
- package/dist/components/progress.svelte +1 -0
- package/dist/components/queries.svelte +7 -0
- package/dist/components/queries.svelte.d.ts +4 -0
- package/dist/components/query.svelte +7 -0
- package/dist/components/query.svelte.d.ts +4 -0
- package/dist/components/section/index.d.ts +2 -0
- package/dist/components/section/index.js +2 -0
- package/dist/components/section/section-error-reporter.d.ts +8 -0
- package/dist/components/section/section-error-reporter.js +7 -0
- package/dist/components/section/section-error.svelte +36 -0
- package/dist/components/section/section-error.svelte.d.ts +9 -0
- package/dist/components/section/section-errors.svelte +132 -5
- package/dist/components/section/section.svelte +7 -1
- package/dist/components/section/section.svelte.d.ts +3 -0
- package/dist/components/section/use-section-errors.svelte.d.ts +1 -0
- package/dist/components/section/use-section-errors.svelte.js +11 -1
- package/dist/components/stop-button.svelte +1 -5
- package/dist/components/stop-button.svelte.d.ts +0 -1
- package/dist/components/stop.svelte +2 -2
- package/dist/components/widgets/arm/arm.svelte +24 -32
- package/dist/components/widgets/arm/get-joint-positions-widget.svelte +9 -8
- package/dist/components/widgets/arm/manual-mode-widget.svelte +13 -4
- package/dist/components/widgets/arm/manual-mode.svelte +1 -5
- package/dist/components/widgets/arm/manual-mode.svelte.d.ts +0 -1
- package/dist/components/widgets/arm/move-to-joint-positions-widget.svelte +10 -4
- package/dist/components/widgets/arm/move-to-joint-positions.svelte +1 -11
- package/dist/components/widgets/arm/move-to-joint-positions.svelte.d.ts +0 -1
- package/dist/components/widgets/arm/move-to-position-control.svelte +22 -18
- package/dist/components/widgets/arm/move-to-position.svelte +0 -4
- package/dist/components/widgets/arm/move-to-position.svelte.d.ts +0 -1
- package/dist/components/widgets/arm/quick-move-widget.svelte +10 -4
- package/dist/components/widgets/arm/quick-move.svelte +1 -4
- package/dist/components/widgets/arm/quick-move.svelte.d.ts +0 -1
- package/dist/components/widgets/audio-input/audio-input.svelte +76 -74
- package/dist/components/widgets/audio-input/get-properties-widget.svelte +15 -15
- package/dist/components/widgets/audio-output/audio-output.svelte +83 -81
- package/dist/components/widgets/audio-output/get-properties-widget.svelte +15 -15
- package/dist/components/widgets/base/base.svelte +70 -37
- package/dist/components/widgets/base/move-straight-widget.svelte +16 -4
- package/dist/components/widgets/base/quick-move-widget.svelte +25 -9
- package/dist/components/widgets/base/set-power-widget.svelte +20 -8
- package/dist/components/widgets/base/set-velocity-widget.svelte +20 -8
- package/dist/components/widgets/base/spin-widget.svelte +20 -8
- package/dist/components/widgets/board/read-write-pins.svelte +2 -2
- package/dist/components/widgets/button/push.svelte +2 -2
- package/dist/components/widgets/camera/camera.svelte +15 -23
- package/dist/components/widgets/camera/live-or-polling-video.svelte +12 -9
- package/dist/components/widgets/custom-control/__tests__/__fixtures__/with-sibling.svelte +10 -0
- package/dist/components/widgets/custom-control/control-frame.svelte +60 -0
- package/dist/components/widgets/custom-control/control-frame.svelte.d.ts +10 -0
- package/dist/components/widgets/custom-control/create-control-host.svelte.d.ts +19 -0
- package/dist/components/widgets/custom-control/create-control-host.svelte.js +26 -0
- package/dist/components/widgets/custom-control/custom-control.d.ts +35 -0
- package/dist/components/widgets/custom-control/custom-control.js +85 -0
- package/dist/components/widgets/custom-control/custom-control.svelte +45 -0
- package/dist/components/widgets/custom-control/custom-control.svelte.d.ts +14 -0
- package/dist/components/widgets/discovery/discovery.svelte +10 -15
- package/dist/components/widgets/encoder/encoder.svelte +20 -18
- package/dist/components/widgets/encoder/get-position-widget.svelte +18 -15
- package/dist/components/widgets/gantry/gantry.svelte +50 -74
- package/dist/components/widgets/gantry/get-position-widget.svelte +14 -13
- package/dist/components/widgets/gantry/home.svelte +21 -10
- package/dist/components/widgets/gantry/move-to-position-widget.svelte +2 -1
- package/dist/components/widgets/gantry/move-to-position.svelte +1 -4
- package/dist/components/widgets/gantry/move-to-position.svelte.d.ts +0 -1
- package/dist/components/widgets/gantry/quick-move-widget.svelte +2 -1
- package/dist/components/widgets/gantry/quick-move.svelte +1 -5
- package/dist/components/widgets/gantry/quick-move.svelte.d.ts +0 -1
- package/dist/components/widgets/generic/generic.svelte +7 -5
- package/dist/components/widgets/gripper/grab-widget.svelte +26 -0
- package/dist/components/widgets/gripper/grab-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/gripper/grab.svelte +3 -19
- package/dist/components/widgets/gripper/grab.svelte.d.ts +1 -2
- package/dist/components/widgets/gripper/gripper.svelte +10 -12
- package/dist/components/widgets/gripper/is-holding-something.svelte +18 -19
- package/dist/components/widgets/gripper/open-widget.svelte +26 -0
- package/dist/components/widgets/gripper/open-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/gripper/open.svelte +3 -19
- package/dist/components/widgets/gripper/open.svelte.d.ts +1 -2
- package/dist/components/widgets/input-controller/input-controller.svelte +7 -14
- package/dist/components/widgets/input-controller/webgamepad.svelte +2 -2
- package/dist/components/widgets/motion/motion.svelte +27 -35
- package/dist/components/widgets/motion/move-widget.svelte +32 -12
- package/dist/components/widgets/motion/move-widget.svelte.d.ts +6 -0
- package/dist/components/widgets/motion/move.svelte +1 -13
- package/dist/components/widgets/motion/move.svelte.d.ts +0 -1
- package/dist/components/widgets/motor/go-for-view.svelte +16 -8
- package/dist/components/widgets/motor/go-to-view.svelte +12 -4
- package/dist/components/widgets/motor/motor.svelte +88 -54
- package/dist/components/widgets/motor/quick-move-widget.svelte +16 -8
- package/dist/components/widgets/motor/set-power-widget.svelte +12 -4
- package/dist/components/widgets/motor/set-rpm-widget.svelte +12 -4
- package/dist/components/widgets/movement-sensor/get-accuracy-widget.svelte +7 -10
- package/dist/components/widgets/movement-sensor/get-compass-heading-widget.svelte +7 -10
- package/dist/components/widgets/movement-sensor/get-orientation-widget.svelte +7 -10
- package/dist/components/widgets/movement-sensor/get-position-widget.svelte +7 -10
- package/dist/components/widgets/movement-sensor/movement-sensor.svelte +55 -56
- package/dist/components/widgets/operations-and-sessions/operations-and-sessions.svelte +2 -1
- package/dist/components/widgets/power-sensor/get-current-widget.svelte +7 -10
- package/dist/components/widgets/power-sensor/get-power-widget.svelte +7 -10
- package/dist/components/widgets/power-sensor/get-voltage-widget.svelte +7 -10
- package/dist/components/widgets/power-sensor/power-sensor.svelte +26 -38
- package/dist/components/widgets/sensor/sensor.svelte +5 -10
- package/dist/components/widgets/servo/move-widget.svelte +2 -1
- package/dist/components/widgets/servo/move.svelte +1 -4
- package/dist/components/widgets/servo/move.svelte.d.ts +0 -1
- package/dist/components/widgets/servo/quick-move-widget.svelte +2 -1
- package/dist/components/widgets/servo/quick-move.svelte +1 -5
- package/dist/components/widgets/servo/quick-move.svelte.d.ts +0 -1
- package/dist/components/widgets/servo/servo.svelte +44 -33
- package/dist/components/widgets/slam/get-position-widget.svelte +7 -10
- package/dist/components/widgets/slam/move-on-map.svelte +6 -5
- package/dist/components/widgets/slam/move-on-map.svelte.d.ts +2 -1
- package/dist/components/widgets/slam/slam.svelte +64 -79
- package/dist/components/widgets/switch/position.svelte +2 -2
- package/package.json +3 -2
- package/dist/components/mutation-section.svelte +0 -75
- package/dist/components/mutation-section.svelte.d.ts +0 -18
- package/dist/components/mutation-view.svelte +0 -29
- package/dist/components/mutation-view.svelte.d.ts +0 -10
- package/dist/components/section-title.svelte +0 -65
- package/dist/components/section-title.svelte.d.ts +0 -15
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import { MotorClient } from '@viamrobotics/sdk'
|
|
3
3
|
import { createResourceClient, createResourceMutation } from '@viamrobotics/svelte-sdk'
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import ApiSection from '../../api-section.svelte'
|
|
6
|
+
import { ResourceTriplets } from '../../../resource-triplet'
|
|
6
7
|
|
|
7
8
|
import GoTo from './go-to.svelte'
|
|
8
9
|
|
|
@@ -26,6 +27,13 @@
|
|
|
26
27
|
}
|
|
27
28
|
</script>
|
|
28
29
|
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
<ApiSection
|
|
31
|
+
class="flex-row flex-wrap gap-2"
|
|
32
|
+
method="GoTo"
|
|
33
|
+
api={ResourceTriplets.Motor}
|
|
34
|
+
mutations={[goToMutation]}
|
|
35
|
+
>
|
|
36
|
+
<div class="flex grow flex-wrap justify-between gap-2">
|
|
37
|
+
<GoTo {goTo} />
|
|
38
|
+
</div>
|
|
39
|
+
</ApiSection>
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
import ApiSection from '../../api-section.svelte'
|
|
10
10
|
import ConnectionStatus from '../../connection-status.svelte'
|
|
11
11
|
import IsMoving from '../../is-moving.svelte'
|
|
12
|
-
import
|
|
13
|
-
import
|
|
12
|
+
import { Section } from '../../section'
|
|
13
|
+
import { useSectionErrors } from '../../section/use-section-errors.svelte'
|
|
14
14
|
import StopButton from '../../stop-button.svelte'
|
|
15
15
|
import { formatNumeric } from '../../../format'
|
|
16
16
|
import { ResourceTriplets } from '../../../resource-triplet'
|
|
@@ -54,6 +54,8 @@
|
|
|
54
54
|
const goToMutation = createResourceMutation(client, 'goTo')
|
|
55
55
|
const stopMutation = createResourceMutation(client, 'stop')
|
|
56
56
|
|
|
57
|
+
const quickMoveErrors = useSectionErrors(() => ({ mutations: [quickSetPowerMutation] }))
|
|
58
|
+
|
|
57
59
|
const setPower = (val: number) => {
|
|
58
60
|
setPowerMutation.mutate([val], {})
|
|
59
61
|
}
|
|
@@ -80,56 +82,85 @@
|
|
|
80
82
|
<div class="@container">
|
|
81
83
|
<div class="flex flex-col divide-y @2xl:flex-row @2xl:divide-x @2xl:divide-y-0">
|
|
82
84
|
<div class="flex w-full flex-col divide-y">
|
|
83
|
-
<
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
<Section
|
|
86
|
+
errorReporter={quickMoveErrors}
|
|
87
|
+
class="flex-row flex-wrap gap-2"
|
|
86
88
|
>
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
<div class="flex flex-col gap-0.5">
|
|
90
|
+
<Section.Heading>
|
|
91
|
+
Quick move
|
|
92
|
+
{#snippet aside()}
|
|
93
|
+
<Section.Errors errors={quickMoveErrors.errors} />
|
|
94
|
+
{/snippet}
|
|
95
|
+
</Section.Heading>
|
|
96
|
+
</div>
|
|
97
|
+
<Section.Body>
|
|
98
|
+
<div class="flex grow flex-wrap justify-between gap-2">
|
|
99
|
+
<QuickMove setPower={quickSetPower} />
|
|
100
|
+
</div>
|
|
101
|
+
</Section.Body>
|
|
102
|
+
</Section>
|
|
103
|
+
<ApiSection
|
|
104
|
+
class="flex-row flex-wrap gap-2"
|
|
105
|
+
method="SetPower"
|
|
91
106
|
api={ResourceTriplets.Motor}
|
|
92
|
-
|
|
93
|
-
lastError={setPowerMutation.error}
|
|
107
|
+
mutations={[setPowerMutation]}
|
|
94
108
|
>
|
|
95
|
-
<
|
|
96
|
-
|
|
109
|
+
{#snippet subheading()}<Section.Text>Move continuously</Section.Text>{/snippet}
|
|
110
|
+
<div class="flex grow flex-wrap justify-between gap-2">
|
|
111
|
+
<SetPower {setPower} />
|
|
112
|
+
</div>
|
|
113
|
+
</ApiSection>
|
|
97
114
|
{#if propertiesQuery.data?.positionReporting}
|
|
98
|
-
<
|
|
99
|
-
|
|
115
|
+
<ApiSection
|
|
116
|
+
class="flex-row flex-wrap gap-2"
|
|
117
|
+
method="SetRPM"
|
|
100
118
|
api={ResourceTriplets.Motor}
|
|
101
|
-
|
|
102
|
-
lastError={setRPMMutation.error}
|
|
119
|
+
mutations={[setRPMMutation]}
|
|
103
120
|
>
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
121
|
+
{#snippet subheading()}<Section.Text
|
|
122
|
+
>Move indefinitely at a specified speed.</Section.Text
|
|
123
|
+
>{/snippet}
|
|
124
|
+
<div class="flex grow flex-wrap justify-between gap-2">
|
|
125
|
+
<SetRPM {setRPM} />
|
|
126
|
+
</div>
|
|
127
|
+
</ApiSection>
|
|
128
|
+
<ApiSection
|
|
129
|
+
class="flex-row flex-wrap gap-2"
|
|
130
|
+
method="GoFor"
|
|
108
131
|
api={ResourceTriplets.Motor}
|
|
109
|
-
|
|
110
|
-
lastError={goForMutation.error}
|
|
132
|
+
mutations={[goForMutation]}
|
|
111
133
|
>
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
134
|
+
{#snippet subheading()}<Section.Text
|
|
135
|
+
>Move a specified number of revolutions</Section.Text
|
|
136
|
+
>{/snippet}
|
|
137
|
+
<div class="flex grow flex-wrap justify-between gap-2">
|
|
138
|
+
<GoFor {goFor} />
|
|
139
|
+
</div>
|
|
140
|
+
</ApiSection>
|
|
141
|
+
<ApiSection
|
|
142
|
+
class="flex-row flex-wrap gap-2"
|
|
143
|
+
method="GoTo"
|
|
116
144
|
api={ResourceTriplets.Motor}
|
|
117
|
-
|
|
118
|
-
lastError={goToMutation.error}
|
|
145
|
+
mutations={[goToMutation]}
|
|
119
146
|
>
|
|
120
|
-
|
|
121
|
-
|
|
147
|
+
{#snippet subheading()}<Section.Text>Turn to a specified position</Section.Text
|
|
148
|
+
>{/snippet}
|
|
149
|
+
<div class="flex grow flex-wrap justify-between gap-2">
|
|
150
|
+
<GoTo {goTo} />
|
|
151
|
+
</div>
|
|
152
|
+
</ApiSection>
|
|
122
153
|
{/if}
|
|
123
154
|
</div>
|
|
124
155
|
|
|
125
156
|
<div class="flex w-full flex-col divide-y @2xl:ml-auto @2xl:max-w-1/2 @4xl:max-w-1/3">
|
|
126
157
|
<ApiSection
|
|
127
158
|
class="grow flex-col gap-4"
|
|
128
|
-
|
|
159
|
+
method="Stop"
|
|
129
160
|
api={ResourceTriplets.Motor}
|
|
161
|
+
mutations={[stopMutation]}
|
|
130
162
|
>
|
|
131
163
|
<StopButton
|
|
132
|
-
error={stopMutation.error}
|
|
133
164
|
onStop={() => {
|
|
134
165
|
stopMutation.mutate([])
|
|
135
166
|
}}
|
|
@@ -143,39 +174,42 @@
|
|
|
143
174
|
>
|
|
144
175
|
<div class="flex flex-col gap-6 pt-2">
|
|
145
176
|
<ApiSection
|
|
146
|
-
|
|
177
|
+
method="IsPowered"
|
|
147
178
|
api={ResourceTriplets.Motor}
|
|
179
|
+
queries={[isPoweredQuery]}
|
|
148
180
|
class="grow flex-col gap-3 p-0!"
|
|
149
|
-
tooltip="Returns whether or not the motor is running and the current portion of max power.
|
|
150
|
-
|
|
151
|
-
Stepper motors will report ”true” if they are being powered while holding
|
|
152
|
-
a position and while they are turning."
|
|
153
181
|
>
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
182
|
+
{#snippet tooltip()}
|
|
183
|
+
Returns whether or not the motor is running and the current portion of max power.
|
|
184
|
+
Stepper motors will report ”true” if they are being powered while holding a
|
|
185
|
+
position and while they are turning.
|
|
186
|
+
{/snippet}
|
|
187
|
+
{#if isPoweredQuery.data !== undefined}
|
|
188
|
+
{@const [isPowered, powerPct] = isPoweredQuery.data}
|
|
189
|
+
<span class="font-roboto-mono flex flex-row gap-1 text-xs">
|
|
190
|
+
<p class="text-default">{isPowered}</p>
|
|
191
|
+
<p class="text-disabled">/</p>
|
|
192
|
+
<p class="text-subtle-1">
|
|
193
|
+
{formatNumeric(powerPct * 100, 1)}%
|
|
194
|
+
</p>
|
|
195
|
+
</span>
|
|
196
|
+
{/if}
|
|
166
197
|
</ApiSection>
|
|
167
198
|
{#if propertiesQuery.data?.positionReporting === true}
|
|
168
199
|
<ApiSection
|
|
169
|
-
|
|
200
|
+
method="GetPosition"
|
|
170
201
|
api={ResourceTriplets.Motor}
|
|
202
|
+
queries={[positionQuery]}
|
|
171
203
|
class="grow flex-col gap-3 p-0!"
|
|
172
|
-
tooltip="Reports the position of an encoded motor in revolutions from zero/home."
|
|
173
204
|
>
|
|
174
|
-
|
|
205
|
+
{#snippet tooltip()}
|
|
206
|
+
Reports the position of an encoded motor in revolutions from zero/home.
|
|
207
|
+
{/snippet}
|
|
208
|
+
{#if positionQuery.data !== undefined}
|
|
175
209
|
<p class="font-roboto-mono text-default text-xs">
|
|
176
210
|
{formatNumeric(positionQuery.data, 4)}
|
|
177
211
|
</p>
|
|
178
|
-
|
|
212
|
+
{/if}
|
|
179
213
|
</ApiSection>
|
|
180
214
|
{/if}
|
|
181
215
|
</div>
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import { MotorClient } from '@viamrobotics/sdk'
|
|
3
3
|
import { createResourceClient, createResourceMutation } from '@viamrobotics/svelte-sdk'
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import ApiSection from '../../api-section.svelte'
|
|
6
|
+
import { ResourceTriplets } from '../../../resource-triplet'
|
|
6
7
|
|
|
7
8
|
import QuickMove from './quick-move.svelte'
|
|
8
9
|
|
|
@@ -22,10 +23,17 @@
|
|
|
22
23
|
const quickSetPowerMutation = createResourceMutation(client, 'setPower')
|
|
23
24
|
</script>
|
|
24
25
|
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
<ApiSection
|
|
27
|
+
class="flex-row flex-wrap gap-2"
|
|
28
|
+
method="SetPower"
|
|
29
|
+
api={ResourceTriplets.Motor}
|
|
30
|
+
mutations={[quickSetPowerMutation]}
|
|
31
|
+
>
|
|
32
|
+
<div class="flex grow flex-wrap justify-between gap-2">
|
|
33
|
+
<QuickMove
|
|
34
|
+
setPower={(val) => {
|
|
35
|
+
quickSetPowerMutation.mutate([val], {})
|
|
36
|
+
}}
|
|
37
|
+
/>
|
|
38
|
+
</div>
|
|
39
|
+
</ApiSection>
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import { MotorClient } from '@viamrobotics/sdk'
|
|
3
3
|
import { createResourceClient, createResourceMutation } from '@viamrobotics/svelte-sdk'
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import ApiSection from '../../api-section.svelte'
|
|
6
|
+
import { ResourceTriplets } from '../../../resource-triplet'
|
|
6
7
|
|
|
7
8
|
import SetPower from './set-power.svelte'
|
|
8
9
|
|
|
@@ -24,6 +25,13 @@
|
|
|
24
25
|
const setPower = (val: number) => setPowerMutation.mutate([val], {})
|
|
25
26
|
</script>
|
|
26
27
|
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
<ApiSection
|
|
29
|
+
class="flex-row flex-wrap gap-2"
|
|
30
|
+
method="SetPower"
|
|
31
|
+
api={ResourceTriplets.Motor}
|
|
32
|
+
mutations={[setPowerMutation]}
|
|
33
|
+
>
|
|
34
|
+
<div class="flex grow flex-wrap justify-between gap-2">
|
|
35
|
+
<SetPower {setPower} />
|
|
36
|
+
</div>
|
|
37
|
+
</ApiSection>
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import { MotorClient } from '@viamrobotics/sdk'
|
|
3
3
|
import { createResourceClient, createResourceMutation } from '@viamrobotics/svelte-sdk'
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import ApiSection from '../../api-section.svelte'
|
|
6
|
+
import { ResourceTriplets } from '../../../resource-triplet'
|
|
6
7
|
|
|
7
8
|
import SetRPM from './set-rpm.svelte'
|
|
8
9
|
|
|
@@ -24,6 +25,13 @@
|
|
|
24
25
|
const setRPM = (val: number) => setRPMMutation.mutate([val], {})
|
|
25
26
|
</script>
|
|
26
27
|
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
<ApiSection
|
|
29
|
+
class="flex-row flex-wrap gap-2"
|
|
30
|
+
method="SetRPM"
|
|
31
|
+
api={ResourceTriplets.Motor}
|
|
32
|
+
mutations={[setRPMMutation]}
|
|
33
|
+
>
|
|
34
|
+
<div class="flex grow flex-wrap justify-between gap-2">
|
|
35
|
+
<SetRPM {setRPM} />
|
|
36
|
+
</div>
|
|
37
|
+
</ApiSection>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { createResourceClient, createResourceQuery } from '@viamrobotics/svelte-sdk'
|
|
4
4
|
|
|
5
5
|
import ApiSection from '../../api-section.svelte'
|
|
6
|
-
import
|
|
6
|
+
import { ResourceTriplets } from '../../../resource-triplet'
|
|
7
7
|
|
|
8
8
|
import Accuracy from './accuracy.svelte'
|
|
9
9
|
|
|
@@ -24,15 +24,12 @@
|
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
26
|
<ApiSection
|
|
27
|
-
|
|
27
|
+
method="GetAccuracy"
|
|
28
|
+
api={ResourceTriplets.MovementSensor}
|
|
29
|
+
queries={[query]}
|
|
28
30
|
class="grow flex-col gap-4"
|
|
29
31
|
>
|
|
30
|
-
|
|
31
|
-
{query}
|
|
32
|
-
|
|
33
|
-
>
|
|
34
|
-
{#if query.data !== undefined}
|
|
35
|
-
<Accuracy data={query.data} />
|
|
36
|
-
{/if}
|
|
37
|
-
</Query>
|
|
32
|
+
{#if query.data !== undefined}
|
|
33
|
+
<Accuracy data={query.data} />
|
|
34
|
+
{/if}
|
|
38
35
|
</ApiSection>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { createResourceClient, createResourceQuery } from '@viamrobotics/svelte-sdk'
|
|
4
4
|
|
|
5
5
|
import ApiSection from '../../api-section.svelte'
|
|
6
|
-
import
|
|
6
|
+
import { ResourceTriplets } from '../../../resource-triplet'
|
|
7
7
|
|
|
8
8
|
import CompassHeading from './compass-heading.svelte'
|
|
9
9
|
|
|
@@ -24,15 +24,12 @@
|
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
26
|
<ApiSection
|
|
27
|
-
|
|
27
|
+
method="GetCompassHeading"
|
|
28
|
+
api={ResourceTriplets.MovementSensor}
|
|
29
|
+
queries={[query]}
|
|
28
30
|
class="grow flex-col gap-4"
|
|
29
31
|
>
|
|
30
|
-
|
|
31
|
-
{query}
|
|
32
|
-
|
|
33
|
-
>
|
|
34
|
-
{#if query.data !== undefined}
|
|
35
|
-
<CompassHeading data={query.data} />
|
|
36
|
-
{/if}
|
|
37
|
-
</Query>
|
|
32
|
+
{#if query.data !== undefined}
|
|
33
|
+
<CompassHeading data={query.data} />
|
|
34
|
+
{/if}
|
|
38
35
|
</ApiSection>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { createResourceClient, createResourceQuery } from '@viamrobotics/svelte-sdk'
|
|
4
4
|
|
|
5
5
|
import ApiSection from '../../api-section.svelte'
|
|
6
|
-
import
|
|
6
|
+
import { ResourceTriplets } from '../../../resource-triplet'
|
|
7
7
|
|
|
8
8
|
import Orientation from './orientation.svelte'
|
|
9
9
|
|
|
@@ -24,15 +24,12 @@
|
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
26
|
<ApiSection
|
|
27
|
-
|
|
27
|
+
method="GetOrientation"
|
|
28
|
+
api={ResourceTriplets.MovementSensor}
|
|
29
|
+
queries={[query]}
|
|
28
30
|
class="grow flex-col gap-4"
|
|
29
31
|
>
|
|
30
|
-
|
|
31
|
-
{query}
|
|
32
|
-
|
|
33
|
-
>
|
|
34
|
-
{#if query.data !== undefined}
|
|
35
|
-
<Orientation data={query.data} />
|
|
36
|
-
{/if}
|
|
37
|
-
</Query>
|
|
32
|
+
{#if query.data !== undefined}
|
|
33
|
+
<Orientation data={query.data} />
|
|
34
|
+
{/if}
|
|
38
35
|
</ApiSection>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { createResourceClient, createResourceQuery } from '@viamrobotics/svelte-sdk'
|
|
4
4
|
|
|
5
5
|
import ApiSection from '../../api-section.svelte'
|
|
6
|
-
import
|
|
6
|
+
import { ResourceTriplets } from '../../../resource-triplet'
|
|
7
7
|
|
|
8
8
|
import Position from './position.svelte'
|
|
9
9
|
|
|
@@ -24,15 +24,12 @@
|
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
26
|
<ApiSection
|
|
27
|
-
|
|
27
|
+
method="GetPosition"
|
|
28
|
+
api={ResourceTriplets.MovementSensor}
|
|
29
|
+
queries={[query]}
|
|
28
30
|
class="grow flex-col gap-4"
|
|
29
31
|
>
|
|
30
|
-
|
|
31
|
-
{query}
|
|
32
|
-
|
|
33
|
-
>
|
|
34
|
-
{#if query.data !== undefined}
|
|
35
|
-
<Position data={query.data} />
|
|
36
|
-
{/if}
|
|
37
|
-
</Query>
|
|
32
|
+
{#if query.data !== undefined}
|
|
33
|
+
<Position data={query.data} />
|
|
34
|
+
{/if}
|
|
38
35
|
</ApiSection>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import ReadingsList from '../../readings-list.svelte'
|
|
10
10
|
import RefetchController from '../../refetch-controller.svelte'
|
|
11
11
|
import { createRefetchIntervalStore } from '../../refetch-interval-store.svelte'
|
|
12
|
-
import
|
|
12
|
+
import { Section } from '../../section'
|
|
13
13
|
import { ResourceTriplets } from '../../../resource-triplet'
|
|
14
14
|
|
|
15
15
|
import Accuracy from './accuracy.svelte'
|
|
@@ -85,8 +85,6 @@
|
|
|
85
85
|
enabled: showFullReadings,
|
|
86
86
|
refetchInterval: refetchInterval.current,
|
|
87
87
|
}))
|
|
88
|
-
|
|
89
|
-
const headingID = $props.id()
|
|
90
88
|
</script>
|
|
91
89
|
|
|
92
90
|
<ConnectionStatus {partID}>
|
|
@@ -107,10 +105,12 @@
|
|
|
107
105
|
<div class="flex w-full flex-col gap-5 py-4 pr-6 pl-4 @4xl:w-1/4">
|
|
108
106
|
{#if propertiesQuery.data?.positionSupported}
|
|
109
107
|
<div class="flex flex-col gap-2">
|
|
110
|
-
<
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
<Section.Heading>
|
|
109
|
+
<Section.Method
|
|
110
|
+
method="GetPosition"
|
|
111
|
+
api={ResourceTriplets.MovementSensor}
|
|
112
|
+
/>
|
|
113
|
+
</Section.Heading>
|
|
114
114
|
<Query
|
|
115
115
|
query={positionQuery}
|
|
116
116
|
class="h-6"
|
|
@@ -124,13 +124,13 @@
|
|
|
124
124
|
|
|
125
125
|
{#if propertiesQuery.data?.orientationSupported}
|
|
126
126
|
<div class="flex flex-col gap-2">
|
|
127
|
-
<
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
</
|
|
127
|
+
<Section.Heading>
|
|
128
|
+
<Section.Method
|
|
129
|
+
method="GetOrientation"
|
|
130
|
+
api={ResourceTriplets.MovementSensor}
|
|
131
|
+
/>
|
|
132
|
+
<span class="text-subtle-2 text-xs font-normal">(º)</span>
|
|
133
|
+
</Section.Heading>
|
|
134
134
|
<Query
|
|
135
135
|
query={orientationQuery}
|
|
136
136
|
class="h-6"
|
|
@@ -144,13 +144,13 @@
|
|
|
144
144
|
|
|
145
145
|
{#if propertiesQuery.data?.compassHeadingSupported}
|
|
146
146
|
<div class="flex flex-col gap-2">
|
|
147
|
-
<
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
</
|
|
147
|
+
<Section.Heading>
|
|
148
|
+
<Section.Method
|
|
149
|
+
method="GetCompassHeading"
|
|
150
|
+
api={ResourceTriplets.MovementSensor}
|
|
151
|
+
/>
|
|
152
|
+
<span class="text-subtle-2 text-xs font-normal">(º)</span>
|
|
153
|
+
</Section.Heading>
|
|
154
154
|
<Query
|
|
155
155
|
query={compassHeadingQuery}
|
|
156
156
|
class="h-6"
|
|
@@ -166,13 +166,13 @@
|
|
|
166
166
|
<div class="flex w-full flex-col gap-5 p-4 @4xl:w-1/4">
|
|
167
167
|
{#if propertiesQuery.data?.angularVelocitySupported}
|
|
168
168
|
<div class="flex flex-col gap-2">
|
|
169
|
-
<
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
</
|
|
169
|
+
<Section.Heading>
|
|
170
|
+
<Section.Method
|
|
171
|
+
method="GetAngularVelocity"
|
|
172
|
+
api={ResourceTriplets.MovementSensor}
|
|
173
|
+
/>
|
|
174
|
+
<span class="text-subtle-2 text-xs font-normal">(º/s)</span>
|
|
175
|
+
</Section.Heading>
|
|
176
176
|
<Query
|
|
177
177
|
query={angularVelocityQuery}
|
|
178
178
|
class="h-6"
|
|
@@ -186,13 +186,13 @@
|
|
|
186
186
|
|
|
187
187
|
{#if propertiesQuery.data?.linearVelocitySupported}
|
|
188
188
|
<div class="flex flex-col gap-2">
|
|
189
|
-
<
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
</
|
|
189
|
+
<Section.Heading>
|
|
190
|
+
<Section.Method
|
|
191
|
+
method="GetLinearVelocity"
|
|
192
|
+
api={ResourceTriplets.MovementSensor}
|
|
193
|
+
/>
|
|
194
|
+
<span class="text-subtle-2 text-xs font-normal">(m/s)</span>
|
|
195
|
+
</Section.Heading>
|
|
196
196
|
<Query
|
|
197
197
|
query={linearVelocityQuery}
|
|
198
198
|
class="h-6"
|
|
@@ -206,14 +206,13 @@
|
|
|
206
206
|
|
|
207
207
|
{#if propertiesQuery.data?.linearAccelerationSupported}
|
|
208
208
|
<div class="flex flex-col gap-2">
|
|
209
|
-
<
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
</SectionTitle>
|
|
209
|
+
<Section.Heading>
|
|
210
|
+
<Section.Method
|
|
211
|
+
method="GetLinearAcceleration"
|
|
212
|
+
api={ResourceTriplets.MovementSensor}
|
|
213
|
+
/>
|
|
214
|
+
<span class="text-subtle-2 text-xs font-normal">(m/s<sup>2</sup>)</span>
|
|
215
|
+
</Section.Heading>
|
|
217
216
|
<Query
|
|
218
217
|
query={linearAccelerationQuery}
|
|
219
218
|
class="h-6"
|
|
@@ -226,10 +225,12 @@
|
|
|
226
225
|
{/if}
|
|
227
226
|
|
|
228
227
|
<div class="flex flex-col gap-2">
|
|
229
|
-
<
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
228
|
+
<Section.Heading>
|
|
229
|
+
<Section.Method
|
|
230
|
+
method="GetAccuracy"
|
|
231
|
+
api={ResourceTriplets.MovementSensor}
|
|
232
|
+
/>
|
|
233
|
+
</Section.Heading>
|
|
233
234
|
<Query
|
|
234
235
|
query={accuracyQuery}
|
|
235
236
|
class="h-6"
|
|
@@ -251,16 +252,14 @@
|
|
|
251
252
|
</div>
|
|
252
253
|
</Query>
|
|
253
254
|
|
|
254
|
-
<section
|
|
255
|
-
class="flex flex-col gap-4 p-4"
|
|
256
|
-
aria-labelledby={headingID}
|
|
257
|
-
>
|
|
255
|
+
<section class="flex flex-col gap-4 p-4">
|
|
258
256
|
<div class="flex flex-col gap-0.5">
|
|
259
|
-
<
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
257
|
+
<Section.Heading>
|
|
258
|
+
<Section.Method
|
|
259
|
+
method="GetReadings"
|
|
260
|
+
api={ResourceTriplets.MovementSensor}
|
|
261
|
+
/>
|
|
262
|
+
</Section.Heading>
|
|
264
263
|
<p class="text-subtle-2 text-xs">Get all the measurements and data from the sensor</p>
|
|
265
264
|
</div>
|
|
266
265
|
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { slide } from 'svelte/transition'
|
|
5
5
|
|
|
6
6
|
import ErrorDisplay from '../../error.svelte'
|
|
7
|
+
import { Section } from '../../section'
|
|
7
8
|
|
|
8
9
|
import OperationsTable from './operations-table.svelte'
|
|
9
10
|
import RttPill from './rtt-pill.svelte'
|
|
@@ -98,7 +99,7 @@
|
|
|
98
99
|
/>
|
|
99
100
|
{/if}
|
|
100
101
|
<ErrorDisplay lastError={operationsQuery.error} />
|
|
101
|
-
<
|
|
102
|
+
<Section.Error error={cancelOperationMutation.error} />
|
|
102
103
|
</div>
|
|
103
104
|
<div class="flex h-max flex-col gap-2">
|
|
104
105
|
<span class="text-default text-sm font-semibold">Sessions</span>
|