@viamrobotics/sdk 0.17.1 → 0.18.0-rc.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/gen/app/v1/app_pb.d.ts +8 -0
- package/dist/gen/app/v1/robot_pb.d.ts +6 -0
- package/dist/main.es.js +64 -2
- package/dist/main.umd.js +1 -1
- package/dist/services/vision/client.d.ts +14 -1
- package/dist/services/vision/types.d.ts +21 -0
- package/dist/services/vision/vision.d.ts +20 -1
- package/package.json +1 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import pb from '../../gen/service/vision/v1/vision_pb';
|
|
2
|
+
import commonPB from '../../gen/common/v1/common_pb';
|
|
2
3
|
import type { MimeType } from '../../main';
|
|
3
4
|
import type { RobotClient } from '../../robot';
|
|
4
5
|
import type { Options, StructType } from '../../types';
|
|
5
6
|
import type { Vision } from './vision';
|
|
7
|
+
import type { CaptureAllOptions } from './types';
|
|
6
8
|
/**
|
|
7
9
|
* A gRPC-web client for a Vision service.
|
|
8
10
|
*
|
|
@@ -18,6 +20,17 @@ export declare class VisionClient implements Vision {
|
|
|
18
20
|
getDetections(image: Uint8Array, width: number, height: number, mimeType: MimeType, extra?: StructType): Promise<pb.Detection.AsObject[]>;
|
|
19
21
|
getClassificationsFromCamera(cameraName: string, count: number, extra?: StructType): Promise<pb.Classification.AsObject[]>;
|
|
20
22
|
getClassifications(image: Uint8Array, width: number, height: number, mimeType: MimeType, count: number, extra?: StructType): Promise<pb.Classification.AsObject[]>;
|
|
21
|
-
getObjectPointClouds(cameraName: string, extra?: StructType): Promise<
|
|
23
|
+
getObjectPointClouds(cameraName: string, extra?: StructType): Promise<commonPB.PointCloudObject.AsObject[]>;
|
|
24
|
+
getProperties(extra?: {}): Promise<{
|
|
25
|
+
classificationsSupported: boolean;
|
|
26
|
+
detectionsSupported: boolean;
|
|
27
|
+
objectPointCloudsSupported: boolean;
|
|
28
|
+
}>;
|
|
29
|
+
captureAllFromCamera(cameraName: string, { returnImage, returnClassifications, returnDetections, returnObjectPointClouds, }: CaptureAllOptions, extra?: {}): Promise<{
|
|
30
|
+
image: import("../../gen/component/camera/v1/camera_pb").Image.AsObject | undefined;
|
|
31
|
+
classifications: pb.Classification.AsObject[];
|
|
32
|
+
detections: pb.Detection.AsObject[];
|
|
33
|
+
objectPointClouds: commonPB.PointCloudObject.AsObject[];
|
|
34
|
+
}>;
|
|
22
35
|
doCommand(command: StructType): Promise<StructType>;
|
|
23
36
|
}
|
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
import pb from '../../gen/service/vision/v1/vision_pb';
|
|
2
2
|
import commonPB from '../../gen/common/v1/common_pb';
|
|
3
|
+
import cameraPB from '../../gen/component/camera/v1/camera_pb';
|
|
3
4
|
export type Detection = pb.Detection.AsObject;
|
|
4
5
|
export type Classification = pb.Classification.AsObject;
|
|
5
6
|
export type PointCloudObject = commonPB.PointCloudObject.AsObject;
|
|
7
|
+
export interface Properties {
|
|
8
|
+
/** Whether or not classifactions are supported by the vision service */
|
|
9
|
+
classificationsSupported: boolean;
|
|
10
|
+
/** Whether or not detections are supported by the vision service */
|
|
11
|
+
detectionsSupported: boolean;
|
|
12
|
+
/** Whether or not 3d segmentation is supported by the vision service */
|
|
13
|
+
objectPointCloudsSupported: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface CaptureAllOptions {
|
|
16
|
+
returnImage: boolean;
|
|
17
|
+
returnClassifications: boolean;
|
|
18
|
+
returnDetections: boolean;
|
|
19
|
+
returnObjectPointClouds: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface CaptureAllResponse {
|
|
22
|
+
image: cameraPB.Image.AsObject | undefined;
|
|
23
|
+
classifications: Classification[];
|
|
24
|
+
detections: Detection[];
|
|
25
|
+
objectPointClouds: PointCloudObject[];
|
|
26
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MimeType } from '../../main';
|
|
2
2
|
import type { Resource, StructType } from '../../types';
|
|
3
|
-
import type { Classification, Detection, PointCloudObject } from './types';
|
|
3
|
+
import type { Classification, Detection, PointCloudObject, Properties, CaptureAllOptions, CaptureAllResponse } from './types';
|
|
4
4
|
/** A service that enables various computer vision algorithms */
|
|
5
5
|
export interface Vision extends Resource {
|
|
6
6
|
/**
|
|
@@ -47,4 +47,23 @@ export interface Vision extends Resource {
|
|
|
47
47
|
* @returns - The list of PointCloudObjects
|
|
48
48
|
*/
|
|
49
49
|
getObjectPointClouds: (cameraName: string, extra?: StructType) => Promise<PointCloudObject[]>;
|
|
50
|
+
/**
|
|
51
|
+
* Returns an object describing the properties of the vision service, namely
|
|
52
|
+
* booleans indicating whether classifications, detections, and 3d
|
|
53
|
+
* segmentation are supported.
|
|
54
|
+
*
|
|
55
|
+
* @returns - The properties of the vision service
|
|
56
|
+
*/
|
|
57
|
+
getProperties: (extra?: StructType) => Promise<Properties>;
|
|
58
|
+
/**
|
|
59
|
+
* Returns the requested image, classifications, detections, and 3d point
|
|
60
|
+
* cloud objects in the next image given a camera.
|
|
61
|
+
*
|
|
62
|
+
* @param cameraName - The name of the camera to use for classification,
|
|
63
|
+
* detection, and segmentation.
|
|
64
|
+
* @param opts - The fields desired in the response.
|
|
65
|
+
* @returns - The requested image, classifications, detections, and 3d point
|
|
66
|
+
* cloud objects.
|
|
67
|
+
*/
|
|
68
|
+
captureAllFromCamera: (cameraName: string, opts: CaptureAllOptions, extra?: StructType) => Promise<CaptureAllResponse>;
|
|
50
69
|
}
|