@viamrobotics/sdk 0.59.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.
@@ -30,13 +30,12 @@ export interface Vision extends Resource {
30
30
  * const camera = new VIAM.CameraClient(machine, 'my_camera');
31
31
  * const vision = new VIAM.VisionClient(machine, 'my_vision');
32
32
  *
33
- * const mimeType = 'image/jpeg';
34
- * const image = await camera.getImage(mimeType);
33
+ * const { images } = await camera.getImages();
35
34
  * const detections = await vision.getDetections(
36
- * image,
35
+ * images[0].image,
37
36
  * 600,
38
37
  * 600,
39
- * mimeType
38
+ * images[0].mimeType
40
39
  * );
41
40
  * ```
42
41
  *
@@ -80,13 +79,12 @@ export interface Vision extends Resource {
80
79
  * const camera = new VIAM.CameraClient(machine, 'my_camera');
81
80
  * const vision = new VIAM.VisionClient(machine, 'my_vision');
82
81
  *
83
- * const mimeType = 'image/jpeg';
84
- * const image = await camera.getImage(mimeType);
82
+ * const { images } = await camera.getImages();
85
83
  * const classifications = await vision.getClassifications(
86
- * image,
84
+ * images[0].image,
87
85
  * 600,
88
86
  * 600,
89
- * mimeType,
87
+ * images[0].mimeType,
90
88
  * 10
91
89
  * );
92
90
  * ```
package/dist/utils.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import { Struct, type JsonValue, type PartialMessage } from '@bufbuild/protobuf';
2
2
  import type { CallOptions } from '@connectrpc/connect';
3
- import { DoCommandRequest, DoCommandResponse } from './gen/common/v1/common_pb';
4
- import type { Options } from './types';
3
+ import { DoCommandRequest, DoCommandResponse, GetKinematicsRequest, GetKinematicsResponse, GetGeometriesRequest, GetGeometriesResponse, Geometry } from './gen/common/v1/common_pb';
4
+ import type { Options, Vector3 } from './types';
5
+ import type { Frame } from './gen/app/v1/robot_pb';
5
6
  export declare const clientHeaders: Headers;
6
7
  type doCommand = (request: PartialMessage<DoCommandRequest>, options?: CallOptions) => Promise<DoCommandResponse>;
7
8
  /** Send/Receive an arbitrary command using a resource client */
@@ -10,4 +11,24 @@ export declare const enableDebugLogging: (key?: string, opts?: CallOptions) => C
10
11
  export declare const disableDebugLogging: (opts: CallOptions) => void;
11
12
  export declare const addMetadata: (key: string, value: string, opts?: CallOptions) => CallOptions;
12
13
  export declare const deleteMetadata: (opts: CallOptions, key: string) => void;
14
+ /** Shared type for kinematics return value */
15
+ export interface KinematicsData {
16
+ name: string;
17
+ kinematic_param_type: 'SVA' | 'URDF' | 'UNSPECIFIED';
18
+ joints: {
19
+ id: string;
20
+ type: string;
21
+ parent: string;
22
+ axis: Vector3;
23
+ max: number;
24
+ min: number;
25
+ }[];
26
+ links: Frame[];
27
+ }
28
+ type getKinematics = (request: PartialMessage<GetKinematicsRequest>, options?: CallOptions) => Promise<GetKinematicsResponse>;
29
+ /** Get kinematics information using a resource client */
30
+ export declare const getKinematicsFromClient: (getKinematicsMethod: getKinematics, name: string, extra?: Struct, callOptions?: CallOptions) => Promise<KinematicsData>;
31
+ type getGeometries = (request: PartialMessage<GetGeometriesRequest>, options?: CallOptions) => Promise<GetGeometriesResponse>;
32
+ /** Get geometries information using a resource client */
33
+ export declare const getGeometriesFromClient: (getGeometriesMethod: getGeometries, name: string, extra?: Struct, callOptions?: CallOptions) => Promise<Geometry[]>;
13
34
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viamrobotics/sdk",
3
- "version": "0.59.0",
3
+ "version": "0.60.0",
4
4
  "description": "",
5
5
  "main": "./dist/main.umd.js",
6
6
  "module": "./dist/main.es.js",