@viamrobotics/sdk 0.50.0 → 0.52.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/api-version.d.ts +1 -1
- package/dist/app/data-client.d.ts +2 -1
- package/dist/gen/app/v1/billing_pb.d.ts +87 -0
- package/dist/gen/service/motion/v1/motion_pb.d.ts +131 -39
- package/dist/main.es.js +1416 -1263
- package/dist/main.umd.js +7 -7
- package/dist/rpc/dial.d.ts +2 -2
- package/dist/services/motion/client.d.ts +7 -7
- package/dist/services/motion/motion.d.ts +15 -55
- package/package.json +1 -1
package/dist/rpc/dial.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export type TransportFactory = (init: TransportInitOptions) => Transport;
|
|
|
52
52
|
interface TransportInitOptions {
|
|
53
53
|
baseUrl: string;
|
|
54
54
|
}
|
|
55
|
-
export declare const dialDirect: (address: string, opts?: DialOptions) => Promise<Transport>;
|
|
55
|
+
export declare const dialDirect: (address: string, opts?: DialOptions, transportCredentialsInclude?: boolean) => Promise<Transport>;
|
|
56
56
|
export declare const cloneHeaders: (headers: HeadersInit | undefined) => Headers;
|
|
57
57
|
export interface WebRTCConnection {
|
|
58
58
|
transport: Transport;
|
|
@@ -67,5 +67,5 @@ export interface WebRTCConnection {
|
|
|
67
67
|
* currently returned for experimental use. TODO(GOUT-7): figure out decent way
|
|
68
68
|
* to handle reconnect on connection termination
|
|
69
69
|
*/
|
|
70
|
-
export declare const dialWebRTC: (signalingAddress: string, host: string, dialOpts?: DialOptions) => Promise<WebRTCConnection>;
|
|
70
|
+
export declare const dialWebRTC: (signalingAddress: string, host: string, dialOpts?: DialOptions, transportCredentialsInclude?: boolean) => Promise<WebRTCConnection>;
|
|
71
71
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Struct, type JsonValue } from '@bufbuild/protobuf';
|
|
2
2
|
import type { CallOptions } from '@connectrpc/connect';
|
|
3
3
|
import type { RobotClient } from '../../robot';
|
|
4
|
-
import type { GeoGeometry, GeoPoint, Geometry, Options, Pose, PoseInFrame,
|
|
4
|
+
import type { GeoGeometry, GeoPoint, Geometry, Options, Pose, PoseInFrame, Transform, WorldState } from '../../types';
|
|
5
5
|
import type { Motion } from './motion';
|
|
6
6
|
import { type Constraints, type MotionConfiguration } from './types';
|
|
7
7
|
/**
|
|
@@ -15,12 +15,12 @@ export declare class MotionClient implements Motion {
|
|
|
15
15
|
private readonly options;
|
|
16
16
|
callOptions: CallOptions;
|
|
17
17
|
constructor(client: RobotClient, name: string, options?: Options);
|
|
18
|
-
move(destination: PoseInFrame, componentName:
|
|
19
|
-
moveOnMap(destination: Pose, componentName:
|
|
20
|
-
moveOnGlobe(destination: GeoPoint, componentName:
|
|
21
|
-
stopPlan(componentName:
|
|
22
|
-
getPlan(componentName:
|
|
18
|
+
move(destination: PoseInFrame, componentName: string, worldState?: WorldState, constraints?: Constraints, extra?: {}, callOptions?: CallOptions): Promise<boolean>;
|
|
19
|
+
moveOnMap(destination: Pose, componentName: string, slamServiceName: string, motionConfig?: MotionConfiguration, obstacles?: Geometry[], extra?: {}, callOptions?: CallOptions): Promise<string>;
|
|
20
|
+
moveOnGlobe(destination: GeoPoint, componentName: string, movementSensorName: string, heading?: number, obstaclesList?: GeoGeometry[], motionConfig?: MotionConfiguration, boundingRegionsList?: GeoGeometry[], extra?: {}, callOptions?: CallOptions): Promise<string>;
|
|
21
|
+
stopPlan(componentName: string, extra?: {}, callOptions?: CallOptions): Promise<null>;
|
|
22
|
+
getPlan(componentName: string, lastPlanOnly?: boolean, executionId?: string, extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/motion/v1/motion_pb").GetPlanResponse>;
|
|
23
23
|
listPlanStatuses(onlyActivePlans?: boolean, extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/motion/v1/motion_pb").ListPlanStatusesResponse>;
|
|
24
|
-
getPose(componentName:
|
|
24
|
+
getPose(componentName: string, destinationFrame: string, supplementalTransforms: Transform[], extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/common/v1/common_pb").PoseInFrame>;
|
|
25
25
|
doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
|
|
26
26
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Struct } from '@bufbuild/protobuf';
|
|
2
|
-
import type { GeoGeometry, GeoPoint, Geometry, Pose, PoseInFrame, Resource,
|
|
2
|
+
import type { GeoGeometry, GeoPoint, Geometry, Pose, PoseInFrame, Resource, Transform, WorldState } from '../../types';
|
|
3
3
|
import type { Constraints, GetPlanResponse, ListPlanStatusesResponse, MotionConfiguration } from './types';
|
|
4
4
|
/**
|
|
5
5
|
* A service that coordinates motion planning across all of the components in a
|
|
@@ -16,12 +16,7 @@ export interface Motion extends Resource {
|
|
|
16
16
|
* const motion = new VIAM.MotionClient(machine, 'builtin');
|
|
17
17
|
*
|
|
18
18
|
* // Assumes a gripper configured with name "my_gripper"
|
|
19
|
-
*
|
|
20
|
-
* name: 'my_gripper',
|
|
21
|
-
* namespace: 'rdk',
|
|
22
|
-
* type: 'component',
|
|
23
|
-
* subtype: 'gripper',
|
|
24
|
-
* });
|
|
19
|
+
* cconst gripperName = "my_gripper";
|
|
25
20
|
*
|
|
26
21
|
* const goalPose: VIAM.Pose = {
|
|
27
22
|
* x: -817,
|
|
@@ -53,7 +48,7 @@ export interface Motion extends Resource {
|
|
|
53
48
|
* additional transforms to add to it for the duration of the Move.
|
|
54
49
|
* @param constraints - Constrain the way the robot will move.
|
|
55
50
|
*/
|
|
56
|
-
move: (destination: PoseInFrame, componentName:
|
|
51
|
+
move: (destination: PoseInFrame, componentName: string, worldState?: WorldState, constraints?: Constraints, extra?: Struct) => Promise<boolean>;
|
|
57
52
|
/**
|
|
58
53
|
* Move a component to a `Pose` in respect to the origin of the SLAM map,
|
|
59
54
|
* using a `SLAM` service to check the location. moveOnMap()`is non blocking,
|
|
@@ -79,18 +74,8 @@ export interface Motion extends Resource {
|
|
|
79
74
|
* theta: 0,
|
|
80
75
|
* };
|
|
81
76
|
*
|
|
82
|
-
* const baseName =
|
|
83
|
-
*
|
|
84
|
-
* namespace: 'rdk',
|
|
85
|
-
* type: 'component',
|
|
86
|
-
* subtype: 'base',
|
|
87
|
-
* });
|
|
88
|
-
* const slamServiceName = new VIAM.ResourceName({
|
|
89
|
-
* name: 'my_slam_service',
|
|
90
|
-
* namespace: 'rdk',
|
|
91
|
-
* type: 'service',
|
|
92
|
-
* subtype: 'slam',
|
|
93
|
-
* });
|
|
77
|
+
* const baseName = 'my_base';
|
|
78
|
+
* const slamServiceName = 'my_slam_service';
|
|
94
79
|
*
|
|
95
80
|
* // Move the base to Y=10 (location of 0,10,0) relative to map origin
|
|
96
81
|
* const executionId = await motion.moveOnMap(
|
|
@@ -112,7 +97,7 @@ export interface Motion extends Resource {
|
|
|
112
97
|
* @param motionConfiguration - Optional motion configuration options.
|
|
113
98
|
* @param obstacles - Optional obstacles to be considered for motion planning.
|
|
114
99
|
*/
|
|
115
|
-
moveOnMap: (destination: Pose, componentName:
|
|
100
|
+
moveOnMap: (destination: Pose, componentName: string, slamServiceName: string, motionConfiguration?: MotionConfiguration, obstacles?: Geometry[], extra?: Struct) => Promise<string>;
|
|
116
101
|
/**
|
|
117
102
|
* Move a component to a specific latitude and longitude, using a
|
|
118
103
|
* `MovementSensor` to check the location. `moveOnGlobe()` is non blocking,
|
|
@@ -133,18 +118,8 @@ export interface Motion extends Resource {
|
|
|
133
118
|
* longitude: -73.98,
|
|
134
119
|
* };
|
|
135
120
|
*
|
|
136
|
-
* const baseName =
|
|
137
|
-
*
|
|
138
|
-
* namespace: 'rdk',
|
|
139
|
-
* type: 'component',
|
|
140
|
-
* subtype: 'base',
|
|
141
|
-
* });
|
|
142
|
-
* const movementSensorName = new VIAM.ResourceName({
|
|
143
|
-
* name: 'my_movement_sensor',
|
|
144
|
-
* namespace: 'rdk',
|
|
145
|
-
* type: 'component',
|
|
146
|
-
* subtype: 'movement_sensor',
|
|
147
|
-
* });
|
|
121
|
+
* const baseName = 'my_base';
|
|
122
|
+
* const movementSensorName = 'my_movement_sensor';
|
|
148
123
|
*
|
|
149
124
|
* // Move the base to the geographic location
|
|
150
125
|
* const globeExecutionId = await motion.moveOnGlobe(
|
|
@@ -169,7 +144,7 @@ export interface Motion extends Resource {
|
|
|
169
144
|
* @param boundingRegion - Set of obstacles which the robot must remain within
|
|
170
145
|
* while navigating
|
|
171
146
|
*/
|
|
172
|
-
moveOnGlobe: (destination: GeoPoint, componentName:
|
|
147
|
+
moveOnGlobe: (destination: GeoPoint, componentName: string, movementSensorName: string, heading?: number, obstaclesList?: GeoGeometry[], motionConfiguration?: MotionConfiguration, boundingRegion?: GeoGeometry[], extra?: Struct) => Promise<string>;
|
|
173
148
|
/**
|
|
174
149
|
* Stop a component being moved by an in progress `moveOnGlobe()` or
|
|
175
150
|
* `moveOnMap()` call.
|
|
@@ -178,12 +153,7 @@ export interface Motion extends Resource {
|
|
|
178
153
|
*
|
|
179
154
|
* ```ts
|
|
180
155
|
* const motion = new VIAM.MotionClient(machine, 'builtin');
|
|
181
|
-
* const baseName =
|
|
182
|
-
* name: 'my_base',
|
|
183
|
-
* namespace: 'rdk',
|
|
184
|
-
* type: 'component',
|
|
185
|
-
* subtype: 'base',
|
|
186
|
-
* });
|
|
156
|
+
* const baseName = 'my_base';
|
|
187
157
|
*
|
|
188
158
|
* // Stop the base component which was instructed to move
|
|
189
159
|
* await motion.stopPlan(baseName);
|
|
@@ -194,7 +164,7 @@ export interface Motion extends Resource {
|
|
|
194
164
|
*
|
|
195
165
|
* @param componentName - The component to stop
|
|
196
166
|
*/
|
|
197
|
-
stopPlan: (componentName:
|
|
167
|
+
stopPlan: (componentName: string, extra?: Struct) => Promise<null>;
|
|
198
168
|
/**
|
|
199
169
|
* By default: returns the plan history of the most recent `moveOnGlobe()` or
|
|
200
170
|
* `moveOnMap()` call to move a component. The plan history for executions
|
|
@@ -213,12 +183,7 @@ export interface Motion extends Resource {
|
|
|
213
183
|
*
|
|
214
184
|
* ```ts
|
|
215
185
|
* const motion = new VIAM.MotionClient(machine, 'builtin');
|
|
216
|
-
* const baseName =
|
|
217
|
-
* name: 'my_base',
|
|
218
|
-
* namespace: 'rdk',
|
|
219
|
-
* type: 'component',
|
|
220
|
-
* subtype: 'base',
|
|
221
|
-
* });
|
|
186
|
+
* const baseName = 'my_base';
|
|
222
187
|
*
|
|
223
188
|
* // Get the plan(s) of the base component
|
|
224
189
|
* const response = await motion.getPlan(baseName);
|
|
@@ -234,7 +199,7 @@ export interface Motion extends Resource {
|
|
|
234
199
|
* @param supplementalTransforms - `Pose` information on any additional
|
|
235
200
|
* reference frames that are needed to compute the component's `Pose`.
|
|
236
201
|
*/
|
|
237
|
-
getPlan: (componentName:
|
|
202
|
+
getPlan: (componentName: string, lastPlanOnly?: boolean, executionId?: string, extra?: Struct) => Promise<GetPlanResponse>;
|
|
238
203
|
/**
|
|
239
204
|
* Returns the statuses of plans created by MoveOnGlobe calls that meet at
|
|
240
205
|
* least one of the following conditions since the motion service
|
|
@@ -269,12 +234,7 @@ export interface Motion extends Resource {
|
|
|
269
234
|
* ```ts
|
|
270
235
|
* const motion = new VIAM.MotionClient(machine, 'builtin');
|
|
271
236
|
*
|
|
272
|
-
* const gripperName =
|
|
273
|
-
* name: 'my_gripper',
|
|
274
|
-
* namespace: 'rdk',
|
|
275
|
-
* type: 'component',
|
|
276
|
-
* subtype: 'gripper',
|
|
277
|
-
* });
|
|
237
|
+
* const gripperName = 'my_gripper';
|
|
278
238
|
*
|
|
279
239
|
* // Get the gripper's pose in world coordinates
|
|
280
240
|
* const gripperPoseInWorld = await motion.getPose(
|
|
@@ -294,5 +254,5 @@ export interface Motion extends Resource {
|
|
|
294
254
|
* @param supplementalTransforms - `Pose` information on any additional
|
|
295
255
|
* reference frames that are needed to compute the component's `Pose`.
|
|
296
256
|
*/
|
|
297
|
-
getPose: (componentName:
|
|
257
|
+
getPose: (componentName: string, destinationFrame: string, supplementalTransforms: Transform[], extra?: Struct) => Promise<PoseInFrame>;
|
|
298
258
|
}
|