@viamrobotics/sdk 0.58.0 → 0.60.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/components/arm/arm.d.ts +3 -15
- package/dist/components/arm/client.d.ts +1 -13
- package/dist/components/camera/camera.d.ts +0 -51
- package/dist/components/camera/client.d.ts +1 -3
- package/dist/components/gantry/client.d.ts +1 -0
- package/dist/components/gantry/gantry.d.ts +17 -0
- package/dist/gen/app/datasync/v1/data_sync_pb.d.ts +5 -0
- package/dist/gen/app/v1/app_pb.d.ts +74 -0
- package/dist/gen/app/v1/robot_pb.d.ts +55 -0
- package/dist/main.es.js +3886 -3827
- package/dist/main.umd.js +7 -7
- package/dist/services/video/client.d.ts +20 -0
- package/dist/services/video/index.d.ts +3 -0
- package/dist/services/video/types.d.ts +9 -0
- package/dist/services/video/video.d.ts +44 -0
- package/dist/services/video.d.ts +3 -0
- package/dist/services/vision/vision.d.ts +6 -8
- package/dist/utils.d.ts +23 -2
- package/package.json +1 -1
package/dist/api-version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const apiVersion = "v0.1.
|
|
1
|
+
export declare const apiVersion = "v0.1.504";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { PlainMessage, Struct } from '@bufbuild/protobuf';
|
|
2
|
-
import type { Pose, Resource
|
|
2
|
+
import type { Pose, Resource } from '../../types';
|
|
3
3
|
import * as armApi from '../../gen/component/arm/v1/arm_pb';
|
|
4
4
|
import type { Geometry, Mesh } from '../../gen/common/v1/common_pb';
|
|
5
|
-
import type {
|
|
5
|
+
import type { KinematicsData } from '../../utils';
|
|
6
6
|
export type ArmJointPositions = PlainMessage<armApi.JointPositions>;
|
|
7
7
|
export declare const ArmJointPositions: typeof armApi.JointPositions;
|
|
8
8
|
/** Represents a physical robot arm that exists in three-dimensional space. */
|
|
@@ -62,19 +62,7 @@ export interface Arm extends Resource {
|
|
|
62
62
|
* API](https://docs.viam.com/dev/reference/apis/components/arm/#getkinematics).
|
|
63
63
|
* ```
|
|
64
64
|
*/
|
|
65
|
-
getKinematics: (extra?: Struct) => Promise<
|
|
66
|
-
name: string;
|
|
67
|
-
kinematic_param_type: 'SVA' | 'URDF' | 'UNSPECIFIED';
|
|
68
|
-
joints: {
|
|
69
|
-
id: string;
|
|
70
|
-
type: string;
|
|
71
|
-
parent: string;
|
|
72
|
-
axis: Vector3;
|
|
73
|
-
max: number;
|
|
74
|
-
min: number;
|
|
75
|
-
}[];
|
|
76
|
-
links: Frame[];
|
|
77
|
-
}>;
|
|
65
|
+
getKinematics: (extra?: Struct) => Promise<KinematicsData>;
|
|
78
66
|
/**
|
|
79
67
|
* Move the end of the arm to the pose.
|
|
80
68
|
*
|
|
@@ -18,20 +18,8 @@ export declare class ArmClient implements Arm {
|
|
|
18
18
|
constructor(client: RobotClient, name: string, options?: Options);
|
|
19
19
|
getEndPosition(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/common/v1/common_pb").Pose>;
|
|
20
20
|
getGeometries(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/common/v1/common_pb").Geometry[]>;
|
|
21
|
+
getKinematics(extra?: {}, callOptions?: CallOptions): Promise<import("../../utils").KinematicsData>;
|
|
21
22
|
get3DModels(extra?: {}, callOptions?: CallOptions): Promise<Record<string, Mesh>>;
|
|
22
|
-
getKinematics(extra?: {}, callOptions?: CallOptions): Promise<{
|
|
23
|
-
name: string;
|
|
24
|
-
kinematic_param_type: "SVA" | "URDF" | "UNSPECIFIED";
|
|
25
|
-
joints: {
|
|
26
|
-
id: string;
|
|
27
|
-
type: string;
|
|
28
|
-
parent: string;
|
|
29
|
-
axis: import("@bufbuild/protobuf").PlainMessage<import("../../gen/common/v1/common_pb").Vector3>;
|
|
30
|
-
max: number;
|
|
31
|
-
min: number;
|
|
32
|
-
}[];
|
|
33
|
-
links: import("../../gen/app/v1/robot_pb").Frame[];
|
|
34
|
-
}>;
|
|
35
23
|
moveToPosition(pose: Pose, extra?: {}, callOptions?: CallOptions): Promise<void>;
|
|
36
24
|
moveToJointPositions(jointPositionsList: number[], extra?: {}, callOptions?: CallOptions): Promise<void>;
|
|
37
25
|
getJointPositions(extra?: {}, callOptions?: CallOptions): Promise<JointPositions>;
|
|
@@ -26,39 +26,6 @@ export type MimeType = '' | 'image/vnd.viam.rgba' | 'image/vnd.viam.depth' | 'im
|
|
|
26
26
|
export interface Camera extends Resource {
|
|
27
27
|
/** Get the geometries of the component in their current configuration */
|
|
28
28
|
getGeometries: (extra?: Struct) => Promise<Geometry[]>;
|
|
29
|
-
/**
|
|
30
|
-
* Return a frame from a camera.
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
*
|
|
34
|
-
* ```ts
|
|
35
|
-
* const camera = new VIAM.CameraClient(machine, 'my_camera');
|
|
36
|
-
* const image = await camera.getImage();
|
|
37
|
-
*
|
|
38
|
-
* // Convert Uint8Array to base64
|
|
39
|
-
* const base64Image = btoa(
|
|
40
|
-
* Array.from(image)
|
|
41
|
-
* .map((byte) => String.fromCharCode(byte))
|
|
42
|
-
* .join('')
|
|
43
|
-
* );
|
|
44
|
-
*
|
|
45
|
-
* // Convert image to base64 and display it
|
|
46
|
-
* const imageElement = document.createElement('img');
|
|
47
|
-
* imageElement.src = `data:image/jpeg;base64,${base64Image}`;
|
|
48
|
-
* const imageContainer = document.getElementById('#imageContainer');
|
|
49
|
-
* if (imageContainer) {
|
|
50
|
-
* imageContainer.innerHTML = '';
|
|
51
|
-
* imageContainer.appendChild(imageElement);
|
|
52
|
-
* }
|
|
53
|
-
* ```
|
|
54
|
-
*
|
|
55
|
-
* For more information, see [Camera
|
|
56
|
-
* API](https://docs.viam.com/dev/reference/apis/components/camera/#getimage).
|
|
57
|
-
*
|
|
58
|
-
* @param mimeType - A specific MIME type to request. This is not necessarily
|
|
59
|
-
* the same type that will be returned.
|
|
60
|
-
*/
|
|
61
|
-
getImage: (mimeType?: MimeType, extra?: Struct) => Promise<Uint8Array>;
|
|
62
29
|
/**
|
|
63
30
|
* Return a frame from a camera.
|
|
64
31
|
*
|
|
@@ -79,24 +46,6 @@ export interface Camera extends Resource {
|
|
|
79
46
|
images: NamedImage[];
|
|
80
47
|
metadata: ResponseMetadata;
|
|
81
48
|
}>;
|
|
82
|
-
/**
|
|
83
|
-
* Render a frame from a camera to an HTTP response.
|
|
84
|
-
*
|
|
85
|
-
* @example
|
|
86
|
-
*
|
|
87
|
-
* ```ts
|
|
88
|
-
* const camera = new VIAM.CameraClient(machine, 'my_camera');
|
|
89
|
-
* const mimeType = 'image/jpeg';
|
|
90
|
-
* const image = await camera.renderFrame(mimeType);
|
|
91
|
-
* ```
|
|
92
|
-
*
|
|
93
|
-
* For more information, see [Camera
|
|
94
|
-
* API](https://docs.viam.com/dev/reference/apis/components/camera/#renderframe).
|
|
95
|
-
*
|
|
96
|
-
* @param mimeType - A specific MIME type to request. This is not necessarily
|
|
97
|
-
* the same type that will be returned.
|
|
98
|
-
*/
|
|
99
|
-
renderFrame: (mimeType?: MimeType, extra?: Struct) => Promise<Blob>;
|
|
100
49
|
/**
|
|
101
50
|
* Return a point cloud from a camera.
|
|
102
51
|
*
|
|
@@ -2,7 +2,7 @@ import { type JsonValue, Struct } from '@bufbuild/protobuf';
|
|
|
2
2
|
import type { CallOptions } from '@connectrpc/connect';
|
|
3
3
|
import type { RobotClient } from '../../robot';
|
|
4
4
|
import type { Options } from '../../types';
|
|
5
|
-
import type { Camera,
|
|
5
|
+
import type { Camera, ResponseMetadata } from './camera';
|
|
6
6
|
/**
|
|
7
7
|
* A gRPC-web client for the Camera component.
|
|
8
8
|
*
|
|
@@ -15,7 +15,6 @@ export declare class CameraClient implements Camera {
|
|
|
15
15
|
callOptions: CallOptions;
|
|
16
16
|
constructor(client: RobotClient, name: string, options?: Options);
|
|
17
17
|
getGeometries(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/common/v1/common_pb").Geometry[]>;
|
|
18
|
-
getImage(mimeType?: MimeType, extra?: {}, callOptions?: CallOptions): Promise<Uint8Array>;
|
|
19
18
|
getImages(filterSourceNames?: string[], extra?: {}, callOptions?: CallOptions): Promise<{
|
|
20
19
|
images: {
|
|
21
20
|
sourceName: string;
|
|
@@ -24,7 +23,6 @@ export declare class CameraClient implements Camera {
|
|
|
24
23
|
}[];
|
|
25
24
|
metadata: ResponseMetadata;
|
|
26
25
|
}>;
|
|
27
|
-
renderFrame(mimeType?: MimeType, extra?: {}, callOptions?: CallOptions): Promise<Blob>;
|
|
28
26
|
getPointCloud(extra?: {}, callOptions?: CallOptions): Promise<Uint8Array>;
|
|
29
27
|
getProperties(callOptions?: CallOptions): Promise<import("../../gen/component/camera/v1/camera_pb").GetPropertiesResponse>;
|
|
30
28
|
doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
|
|
@@ -15,6 +15,7 @@ export declare class GantryClient implements Gantry {
|
|
|
15
15
|
callOptions: CallOptions;
|
|
16
16
|
constructor(client: RobotClient, name: string, options?: Options);
|
|
17
17
|
getGeometries(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/common/v1/common_pb").Geometry[]>;
|
|
18
|
+
getKinematics(extra?: {}, callOptions?: CallOptions): Promise<import("../../utils").KinematicsData>;
|
|
18
19
|
getPosition(extra?: {}, callOptions?: CallOptions): Promise<number[]>;
|
|
19
20
|
moveToPosition(positionsMm: number[], speedsMmPerSec: number[], extra?: {}, callOptions?: CallOptions): Promise<void>;
|
|
20
21
|
home(extra?: {}, callOptions?: CallOptions): Promise<boolean>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Struct } from '@bufbuild/protobuf';
|
|
2
2
|
import type { Resource } from '../../types';
|
|
3
3
|
import type { Geometry } from '../../gen/common/v1/common_pb';
|
|
4
|
+
import type { KinematicsData } from '../../utils';
|
|
4
5
|
/** Represents a physical gantry that exists in three-dimensional space. */
|
|
5
6
|
export interface Gantry extends Resource {
|
|
6
7
|
/**
|
|
@@ -19,6 +20,22 @@ export interface Gantry extends Resource {
|
|
|
19
20
|
* API](https://docs.viam.com/dev/reference/apis/components/gantry/#getgeometries).
|
|
20
21
|
*/
|
|
21
22
|
getGeometries: (extra?: Struct) => Promise<Geometry[]>;
|
|
23
|
+
/**
|
|
24
|
+
* Get the kinematics information associated with the gantry.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
*
|
|
28
|
+
* ```ts
|
|
29
|
+
* const gantry = new VIAM.GantryClient(machine, 'my_gantry');
|
|
30
|
+
*
|
|
31
|
+
* // Get the kinematics information associated with the gantry
|
|
32
|
+
* const kinematics = await gantry.getKinematics();
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* For more information, see [Gantry
|
|
36
|
+
* API](https://docs.viam.com/dev/reference/apis/components/gantry/#getkinematics).
|
|
37
|
+
*/
|
|
38
|
+
getKinematics: (extra?: Struct) => Promise<KinematicsData>;
|
|
22
39
|
/**
|
|
23
40
|
* Move each axis of the gantry to the positionsMm at the speeds in
|
|
24
41
|
* speedsMmPerSec.
|
|
@@ -867,6 +867,30 @@ export declare class GetOrganizationNamespaceAvailabilityResponse extends Messag
|
|
|
867
867
|
static equals(a: GetOrganizationNamespaceAvailabilityResponse | PlainMessage<GetOrganizationNamespaceAvailabilityResponse> | undefined, b: GetOrganizationNamespaceAvailabilityResponse | PlainMessage<GetOrganizationNamespaceAvailabilityResponse> | undefined): boolean;
|
|
868
868
|
}
|
|
869
869
|
|
|
870
|
+
/**
|
|
871
|
+
* @generated from message viam.app.v1.FragmentImportList
|
|
872
|
+
*/
|
|
873
|
+
export declare class FragmentImportList extends Message<FragmentImportList> {
|
|
874
|
+
/**
|
|
875
|
+
* @generated from field: repeated viam.app.v1.FragmentImport imports = 1;
|
|
876
|
+
*/
|
|
877
|
+
imports: FragmentImport[];
|
|
878
|
+
|
|
879
|
+
constructor(data?: PartialMessage<FragmentImportList>);
|
|
880
|
+
|
|
881
|
+
static readonly runtime: typeof proto3;
|
|
882
|
+
static readonly typeName = "viam.app.v1.FragmentImportList";
|
|
883
|
+
static readonly fields: FieldList;
|
|
884
|
+
|
|
885
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): FragmentImportList;
|
|
886
|
+
|
|
887
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): FragmentImportList;
|
|
888
|
+
|
|
889
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): FragmentImportList;
|
|
890
|
+
|
|
891
|
+
static equals(a: FragmentImportList | PlainMessage<FragmentImportList> | undefined, b: FragmentImportList | PlainMessage<FragmentImportList> | undefined): boolean;
|
|
892
|
+
}
|
|
893
|
+
|
|
870
894
|
/**
|
|
871
895
|
* @generated from message viam.app.v1.UpdateOrganizationRequest
|
|
872
896
|
*/
|
|
@@ -898,6 +922,11 @@ export declare class UpdateOrganizationRequest extends Message<UpdateOrganizatio
|
|
|
898
922
|
*/
|
|
899
923
|
cid?: string;
|
|
900
924
|
|
|
925
|
+
/**
|
|
926
|
+
* @generated from field: optional viam.app.v1.FragmentImportList fragment_imports = 6;
|
|
927
|
+
*/
|
|
928
|
+
fragmentImports?: FragmentImportList;
|
|
929
|
+
|
|
901
930
|
constructor(data?: PartialMessage<UpdateOrganizationRequest>);
|
|
902
931
|
|
|
903
932
|
static readonly runtime: typeof proto3;
|
|
@@ -3913,6 +3942,51 @@ export declare class FragmentUsage extends Message<FragmentUsage> {
|
|
|
3913
3942
|
static equals(a: FragmentUsage | PlainMessage<FragmentUsage> | undefined, b: FragmentUsage | PlainMessage<FragmentUsage> | undefined): boolean;
|
|
3914
3943
|
}
|
|
3915
3944
|
|
|
3945
|
+
/**
|
|
3946
|
+
* @generated from message viam.app.v1.FragmentImport
|
|
3947
|
+
*/
|
|
3948
|
+
export declare class FragmentImport extends Message<FragmentImport> {
|
|
3949
|
+
/**
|
|
3950
|
+
* @generated from field: string fragment_id = 1;
|
|
3951
|
+
*/
|
|
3952
|
+
fragmentId: string;
|
|
3953
|
+
|
|
3954
|
+
/**
|
|
3955
|
+
* revision or tag
|
|
3956
|
+
*
|
|
3957
|
+
* @generated from field: string version = 2;
|
|
3958
|
+
*/
|
|
3959
|
+
version: string;
|
|
3960
|
+
|
|
3961
|
+
/**
|
|
3962
|
+
* namespace prefix
|
|
3963
|
+
*
|
|
3964
|
+
* @generated from field: optional string prefix = 3;
|
|
3965
|
+
*/
|
|
3966
|
+
prefix?: string;
|
|
3967
|
+
|
|
3968
|
+
/**
|
|
3969
|
+
* key-value pairs for fragment variables
|
|
3970
|
+
*
|
|
3971
|
+
* @generated from field: map<string, string> variables = 4;
|
|
3972
|
+
*/
|
|
3973
|
+
variables: { [key: string]: string };
|
|
3974
|
+
|
|
3975
|
+
constructor(data?: PartialMessage<FragmentImport>);
|
|
3976
|
+
|
|
3977
|
+
static readonly runtime: typeof proto3;
|
|
3978
|
+
static readonly typeName = "viam.app.v1.FragmentImport";
|
|
3979
|
+
static readonly fields: FieldList;
|
|
3980
|
+
|
|
3981
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): FragmentImport;
|
|
3982
|
+
|
|
3983
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): FragmentImport;
|
|
3984
|
+
|
|
3985
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): FragmentImport;
|
|
3986
|
+
|
|
3987
|
+
static equals(a: FragmentImport | PlainMessage<FragmentImport> | undefined, b: FragmentImport | PlainMessage<FragmentImport> | undefined): boolean;
|
|
3988
|
+
}
|
|
3989
|
+
|
|
3916
3990
|
/**
|
|
3917
3991
|
* @generated from message viam.app.v1.ResolvedFragment
|
|
3918
3992
|
*/
|
|
@@ -140,6 +140,11 @@ export declare class RobotConfig extends Message<RobotConfig> {
|
|
|
140
140
|
*/
|
|
141
141
|
jobs: JobConfig[];
|
|
142
142
|
|
|
143
|
+
/**
|
|
144
|
+
* @generated from field: optional viam.app.v1.TracingConfig tracing = 19;
|
|
145
|
+
*/
|
|
146
|
+
tracing?: TracingConfig;
|
|
147
|
+
|
|
143
148
|
constructor(data?: PartialMessage<RobotConfig>);
|
|
144
149
|
|
|
145
150
|
static readonly runtime: typeof proto3;
|
|
@@ -250,6 +255,56 @@ export declare class JobConfig extends Message<JobConfig> {
|
|
|
250
255
|
static equals(a: JobConfig | PlainMessage<JobConfig> | undefined, b: JobConfig | PlainMessage<JobConfig> | undefined): boolean;
|
|
251
256
|
}
|
|
252
257
|
|
|
258
|
+
/**
|
|
259
|
+
* TracingConfig configures whether viam-server will record traces and if so
|
|
260
|
+
* where it will export them.
|
|
261
|
+
*
|
|
262
|
+
* @generated from message viam.app.v1.TracingConfig
|
|
263
|
+
*/
|
|
264
|
+
export declare class TracingConfig extends Message<TracingConfig> {
|
|
265
|
+
/**
|
|
266
|
+
* Globally enable or disable tracing support.
|
|
267
|
+
*
|
|
268
|
+
* @generated from field: bool enabled = 1;
|
|
269
|
+
*/
|
|
270
|
+
enabled: boolean;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Save trace spans to a file on disk.
|
|
274
|
+
*
|
|
275
|
+
* @generated from field: bool disk = 2;
|
|
276
|
+
*/
|
|
277
|
+
disk: boolean;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Print trace spans to the console.
|
|
281
|
+
*
|
|
282
|
+
* @generated from field: bool console = 3;
|
|
283
|
+
*/
|
|
284
|
+
console: boolean;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Send trace spans to an OTLP gRPC endpoint.
|
|
288
|
+
*
|
|
289
|
+
* @generated from field: string otlp_endpoint = 4;
|
|
290
|
+
*/
|
|
291
|
+
otlpEndpoint: string;
|
|
292
|
+
|
|
293
|
+
constructor(data?: PartialMessage<TracingConfig>);
|
|
294
|
+
|
|
295
|
+
static readonly runtime: typeof proto3;
|
|
296
|
+
static readonly typeName = "viam.app.v1.TracingConfig";
|
|
297
|
+
static readonly fields: FieldList;
|
|
298
|
+
|
|
299
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TracingConfig;
|
|
300
|
+
|
|
301
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TracingConfig;
|
|
302
|
+
|
|
303
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TracingConfig;
|
|
304
|
+
|
|
305
|
+
static equals(a: TracingConfig | PlainMessage<TracingConfig> | undefined, b: TracingConfig | PlainMessage<TracingConfig> | undefined): boolean;
|
|
306
|
+
}
|
|
307
|
+
|
|
253
308
|
/**
|
|
254
309
|
* Valid location secret that can be used for authentication to the robot.
|
|
255
310
|
*
|