@viamrobotics/sdk 0.73.0-b.0 → 0.73.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/app/app-client.d.ts +254 -130
- package/dist/app/billing-client.d.ts +15 -6
- package/dist/app/data-client.d.ts +252 -175
- package/dist/app/ml-training-client.d.ts +5 -5
- package/dist/app/provisioning-client.d.ts +4 -2
- package/dist/app/viam-client.d.ts +1 -1
- package/dist/app/viam-transport.d.ts +4 -1
- package/dist/assert.d.ts +3 -2
- package/dist/components/arm/arm.d.ts +2 -2
- package/dist/components/arm/client.d.ts +1 -1
- package/dist/components/audio-out/audio-out.d.ts +7 -6
- package/dist/components/audioin.d.ts +1 -1
- package/dist/components/audioout.d.ts +1 -1
- package/dist/components/base/base.d.ts +11 -10
- package/dist/components/board/board.d.ts +15 -8
- package/dist/components/board/client.d.ts +1 -1
- package/dist/components/camera/camera.d.ts +4 -2
- package/dist/components/camera/client.d.ts +2 -2
- package/dist/components/encoder/encoder.d.ts +5 -4
- package/dist/components/encoder.d.ts +1 -1
- package/dist/components/gantry/gantry.d.ts +10 -7
- package/dist/components/generic/generic.d.ts +4 -1
- package/dist/components/gripper/gripper.d.ts +2 -1
- package/dist/components/input-controller/input-controller.d.ts +15 -5
- package/dist/components/inputcontroller.d.ts +1 -1
- package/dist/components/motor/motor.d.ts +19 -17
- package/dist/components/movement-sensor/movement-sensor.d.ts +42 -14
- package/dist/components/pose-tracker/pose-tracker.d.ts +4 -1
- package/dist/components/power-sensor/power-sensor.d.ts +20 -6
- package/dist/components/switch/switch.d.ts +3 -2
- package/dist/debug.d.ts +15 -7
- package/dist/events.d.ts +10 -12
- package/dist/extra/stream/client.d.ts +11 -12
- package/dist/extra/stream/stream.d.ts +1 -1
- package/dist/gen/app/agent/v1/agent_connect.d.ts +1 -1
- package/dist/gen/app/build/v1/build_connect.d.ts +1 -1
- package/dist/gen/app/cloudslam/v1/cloud_slam_connect.d.ts +1 -1
- package/dist/gen/app/data/v1/data_connect.d.ts +1 -1
- package/dist/gen/app/datapipelines/v1/data_pipelines_connect.d.ts +1 -1
- package/dist/gen/app/dataset/v1/dataset_connect.d.ts +1 -1
- package/dist/gen/app/datasync/v1/data_sync_connect.d.ts +1 -1
- package/dist/gen/app/mlinference/v1/ml_inference_connect.d.ts +1 -1
- package/dist/gen/app/mltraining/v1/ml_training_connect.d.ts +1 -1
- package/dist/gen/app/packages/v1/packages_connect.d.ts +1 -1
- package/dist/gen/app/v1/app_connect.d.ts +1 -1
- package/dist/gen/app/v1/billing_connect.d.ts +1 -1
- package/dist/gen/app/v1/end_user_connect.d.ts +1 -1
- package/dist/gen/app/v1/robot_connect.d.ts +1 -1
- package/dist/gen/component/arm/v1/arm_connect.d.ts +1 -1
- package/dist/gen/component/audioin/v1/audioin_connect.d.ts +1 -1
- package/dist/gen/component/audioout/v1/audioout_connect.d.ts +1 -1
- package/dist/gen/component/base/v1/base_connect.d.ts +1 -1
- package/dist/gen/component/board/v1/board_connect.d.ts +1 -1
- package/dist/gen/component/button/v1/button_connect.d.ts +1 -1
- package/dist/gen/component/camera/v1/camera_connect.d.ts +1 -1
- package/dist/gen/component/encoder/v1/encoder_connect.d.ts +1 -1
- package/dist/gen/component/gantry/v1/gantry_connect.d.ts +1 -1
- package/dist/gen/component/generic/v1/generic_connect.d.ts +1 -1
- package/dist/gen/component/gripper/v1/gripper_connect.d.ts +1 -1
- package/dist/gen/component/inputcontroller/v1/input_controller_connect.d.ts +1 -1
- package/dist/gen/component/motor/v1/motor_connect.d.ts +1 -1
- package/dist/gen/component/movementsensor/v1/movementsensor_connect.d.ts +1 -1
- package/dist/gen/component/posetracker/v1/pose_tracker_connect.d.ts +1 -1
- package/dist/gen/component/powersensor/v1/powersensor_connect.d.ts +1 -1
- package/dist/gen/component/sensor/v1/sensor_connect.d.ts +1 -1
- package/dist/gen/component/servo/v1/servo_connect.d.ts +1 -1
- package/dist/gen/component/switch/v1/switch_connect.d.ts +1 -1
- package/dist/gen/component/testecho/v1/testecho_connect.d.ts +1 -1
- package/dist/gen/google/bytestream/bytestream_connect.d.ts +1 -1
- package/dist/gen/google/iam/v1/iam_policy_connect.d.ts +1 -1
- package/dist/gen/google/longrunning/operations_connect.d.ts +1 -1
- package/dist/gen/grpc/reflection/v1/reflection_connect.d.ts +1 -1
- package/dist/gen/opentelemetry/proto/collector/logs/v1/logs_service_connect.d.ts +1 -1
- package/dist/gen/opentelemetry/proto/collector/metrics/v1/metrics_service_connect.d.ts +1 -1
- package/dist/gen/opentelemetry/proto/collector/profiles/v1development/profiles_service_connect.d.ts +1 -1
- package/dist/gen/opentelemetry/proto/collector/trace/v1/trace_service_connect.d.ts +1 -1
- package/dist/gen/proto/rpc/examples/echo/v1/echo_connect.d.ts +1 -1
- package/dist/gen/proto/rpc/examples/echoresource/v1/echoresource_connect.d.ts +1 -1
- package/dist/gen/proto/rpc/v1/auth_connect.d.ts +1 -1
- package/dist/gen/proto/rpc/webrtc/v1/signaling_connect.d.ts +1 -1
- package/dist/gen/provisioning/v1/provisioning_connect.d.ts +1 -1
- package/dist/gen/robot/v1/robot_connect.d.ts +1 -1
- package/dist/gen/service/datamanager/v1/data_manager_connect.d.ts +1 -1
- package/dist/gen/service/discovery/v1/discovery_connect.d.ts +1 -1
- package/dist/gen/service/generic/v1/generic_connect.d.ts +1 -1
- package/dist/gen/service/mlmodel/v1/mlmodel_connect.d.ts +1 -1
- package/dist/gen/service/motion/v1/motion_connect.d.ts +1 -1
- package/dist/gen/service/navigation/v1/navigation_connect.d.ts +1 -1
- package/dist/gen/service/sensors/v1/sensors_connect.d.ts +1 -1
- package/dist/gen/service/shell/v1/shell_connect.d.ts +1 -1
- package/dist/gen/service/slam/v1/slam_connect.d.ts +1 -1
- package/dist/gen/service/video/v1/video_connect.d.ts +1 -1
- package/dist/gen/service/vision/v1/vision_connect.d.ts +1 -1
- package/dist/gen/service/worldstatestore/v1/world_state_store_connect.d.ts +1 -1
- package/dist/gen/stream/v1/stream_connect.d.ts +1 -1
- package/dist/main.d.ts +11 -10
- package/dist/main.es.js +33210 -28872
- package/dist/main.umd.js +7 -6
- package/dist/robot/client.d.ts +86 -59
- package/dist/robot/dial.d.ts +10 -7
- package/dist/robot/robot.d.ts +29 -27
- package/dist/rpc/client-channel.d.ts +1 -1
- package/dist/rpc/client-stream.d.ts +5 -4
- package/dist/rpc/connection-closed-error.d.ts +1 -1
- package/dist/rpc/dial.d.ts +41 -34
- package/dist/rpc/signaling-exchange.d.ts +1 -1
- package/dist/rpc/stream-client-stream.d.ts +1 -1
- package/dist/rpc/unary-client-stream.d.ts +1 -1
- package/dist/services/data-manager/client.d.ts +14 -5
- package/dist/services/data-manager/data-manager.d.ts +1 -1
- package/dist/services/generic/client.d.ts +1 -1
- package/dist/services/generic/generic.d.ts +2 -1
- package/dist/services/motion/motion.d.ts +78 -53
- package/dist/services/navigation/client.d.ts +1 -1
- package/dist/services/navigation/navigation.d.ts +4 -2
- package/dist/services/slam/client.d.ts +1 -1
- package/dist/services/slam/slam.d.ts +6 -4
- package/dist/services/video/video.d.ts +6 -2
- package/dist/services/vision/vision.d.ts +19 -13
- package/dist/services/world-state-store/world-state-store.d.ts +19 -6
- package/dist/types.d.ts +7 -5
- package/dist/utils.d.ts +5 -5
- package/package.json +29 -29
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Message, PartialMessage } from '@bufbuild/protobuf';
|
|
2
2
|
import type { ContextValues, StreamResponse } from '@connectrpc/connect';
|
|
3
|
-
import {
|
|
3
|
+
import { ResponseHeaders, ResponseTrailers } from '../gen/proto/rpc/webrtc/v1/grpc_pb';
|
|
4
4
|
import { ClientStream } from './client-stream';
|
|
5
5
|
export declare class StreamClientStream<I extends Message<I>, O extends Message<O>> extends ClientStream<I, O> {
|
|
6
6
|
private awaitingHeadersResult?;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Message, PartialMessage } from '@bufbuild/protobuf';
|
|
2
2
|
import type { ContextValues, UnaryResponse } from '@connectrpc/connect';
|
|
3
|
-
import {
|
|
3
|
+
import { ResponseHeaders, ResponseTrailers } from '../gen/proto/rpc/webrtc/v1/grpc_pb';
|
|
4
4
|
import { ClientStream } from './client-stream';
|
|
5
5
|
export declare class UnaryClientStream<I extends Message<I>, O extends Message<O>> extends ClientStream<I, O> {
|
|
6
6
|
private result?;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Struct, type JsonValue } from '@bufbuild/protobuf';
|
|
2
2
|
import type { CallOptions } from '@connectrpc/connect';
|
|
3
|
-
import {
|
|
3
|
+
import { MimeType } from '../../gen/app/datasync/v1/data_sync_pb.js';
|
|
4
4
|
import type { RobotClient } from '../../robot';
|
|
5
5
|
import type { Options } from '../../types';
|
|
6
6
|
import type { DataManager } from './data-manager';
|
|
@@ -16,7 +16,10 @@ export declare class DataManagerClient implements DataManager {
|
|
|
16
16
|
* @example
|
|
17
17
|
*
|
|
18
18
|
* ```ts
|
|
19
|
-
* const dataManager = new VIAM.DataManagerClient(
|
|
19
|
+
* const dataManager = new VIAM.DataManagerClient(
|
|
20
|
+
* machine,
|
|
21
|
+
* 'my_data_manager'
|
|
22
|
+
* );
|
|
20
23
|
* await dataManager.sync();
|
|
21
24
|
* ```
|
|
22
25
|
*
|
|
@@ -33,7 +36,10 @@ export declare class DataManagerClient implements DataManager {
|
|
|
33
36
|
* @example
|
|
34
37
|
*
|
|
35
38
|
* ```ts
|
|
36
|
-
* const dataManager = new VIAM.DataManagerClient(
|
|
39
|
+
* const dataManager = new VIAM.DataManagerClient(
|
|
40
|
+
* machine,
|
|
41
|
+
* 'my_data_manager'
|
|
42
|
+
* );
|
|
37
43
|
* await dataManager.doCommand(new Struct({ cmd: 'test', data1: 500 }));
|
|
38
44
|
* ```
|
|
39
45
|
*
|
|
@@ -51,12 +57,15 @@ export declare class DataManagerClient implements DataManager {
|
|
|
51
57
|
* @example
|
|
52
58
|
*
|
|
53
59
|
* ```ts
|
|
54
|
-
* const dataManager = new VIAM.DataManagerClient(
|
|
60
|
+
* const dataManager = new VIAM.DataManagerClient(
|
|
61
|
+
* machine,
|
|
62
|
+
* 'my_data_manager'
|
|
63
|
+
* );
|
|
55
64
|
* await dataManager.uploadBinaryDataToDatasets(
|
|
56
65
|
* new Uint8Array([1, 2, 3]),
|
|
57
66
|
* ['tag1', 'tag2'],
|
|
58
67
|
* ['datasetId1', 'datasetId2'],
|
|
59
|
-
* MimeType.MIME_TYPE_JPEG
|
|
68
|
+
* MimeType.MIME_TYPE_JPEG
|
|
60
69
|
* );
|
|
61
70
|
* ```
|
|
62
71
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Struct } from '@bufbuild/protobuf';
|
|
2
|
-
import {
|
|
2
|
+
import { MimeType } from '../../gen/app/datasync/v1/data_sync_pb.js';
|
|
3
3
|
import type { Resource } from '../../types';
|
|
4
4
|
export interface DataManager extends Resource {
|
|
5
5
|
sync: (extra?: Struct) => Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { JsonValue, Struct } from '@bufbuild/protobuf';
|
|
2
2
|
import type { CallOptions } from '@connectrpc/connect';
|
|
3
|
-
import {
|
|
3
|
+
import { RobotClient } from '../../robot';
|
|
4
4
|
import type { Options } from '../../types';
|
|
5
5
|
import type { Generic } from './generic';
|
|
6
6
|
/**
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { Struct } from '@bufbuild/protobuf';
|
|
2
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
|
+
* A service that coordinates motion planning across all of the components in a
|
|
6
|
+
* given robot.
|
|
7
|
+
*/
|
|
5
8
|
export interface Motion extends Resource {
|
|
6
9
|
/**
|
|
7
|
-
* Move any component on the robot to a specified destination which can be
|
|
8
|
-
* frame of any other component on the robot.
|
|
10
|
+
* Move any component on the robot to a specified destination which can be
|
|
11
|
+
* from the reference frame of any other component on the robot.
|
|
9
12
|
*
|
|
10
13
|
* @example
|
|
11
14
|
*
|
|
@@ -36,22 +39,24 @@ export interface Motion extends Resource {
|
|
|
36
39
|
* For more information, see [Motion
|
|
37
40
|
* API](https://docs.viam.com/dev/reference/apis/services/motion/#move).
|
|
38
41
|
*
|
|
39
|
-
* @param destination - Destination to move to, which can a pose in the
|
|
40
|
-
* frame in the robot's frame system.
|
|
41
|
-
* @param componentName - Component on the robot to move to the specified
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
42
|
+
* @param destination - Destination to move to, which can a pose in the
|
|
43
|
+
* reference frame of any frame in the robot's frame system.
|
|
44
|
+
* @param componentName - Component on the robot to move to the specified
|
|
45
|
+
* destination.
|
|
46
|
+
* @param worldState - Avoid obstacles by specifying their geometries in the
|
|
47
|
+
* world state. Augment the frame system of the robot by specifying
|
|
48
|
+
* additional transforms to add to it for the duration of the Move.
|
|
45
49
|
* @param constraints - Constrain the way the robot will move.
|
|
46
50
|
*/
|
|
47
51
|
move: (destination: PoseInFrame, componentName: string, worldState?: WorldState, constraints?: Constraints, extra?: Struct) => Promise<boolean>;
|
|
48
52
|
/**
|
|
49
|
-
* Move a component to a `Pose` in respect to the origin of the SLAM map,
|
|
50
|
-
* to check the location. moveOnMap()`is non blocking,
|
|
51
|
-
* component to the destination Pose
|
|
52
|
-
* retuns a unique
|
|
53
|
-
*
|
|
54
|
-
*
|
|
53
|
+
* Move a component to a `Pose` in respect to the origin of the SLAM map,
|
|
54
|
+
* using a `SLAM` service to check the location. moveOnMap()`is non blocking,
|
|
55
|
+
* meaning the motion service will move the component to the destination Pose
|
|
56
|
+
* after`moveOnMap()`returns. Each successful`moveOnMap()`call retuns a unique
|
|
57
|
+
* ExectionID which you can use to identify all plans generated durring
|
|
58
|
+
* the`moveOnMap()`call. You can monitor the progress of the`moveOnMap()`call
|
|
59
|
+
* by querying`getPlan()`and`listPlanStatuses()`.
|
|
55
60
|
*
|
|
56
61
|
* @example
|
|
57
62
|
*
|
|
@@ -73,27 +78,34 @@ export interface Motion extends Resource {
|
|
|
73
78
|
* const slamServiceName = 'my_slam_service';
|
|
74
79
|
*
|
|
75
80
|
* // Move the base to Y=10 (location of 0,10,0) relative to map origin
|
|
76
|
-
* const executionId = await motion.moveOnMap(
|
|
81
|
+
* const executionId = await motion.moveOnMap(
|
|
82
|
+
* myPose,
|
|
83
|
+
* baseName,
|
|
84
|
+
* slamServiceName
|
|
85
|
+
* );
|
|
77
86
|
* ```
|
|
78
87
|
*
|
|
79
88
|
* For more information, see [Motion
|
|
80
89
|
* API](https://docs.viam.com/dev/reference/apis/services/motion/#moveonmap).
|
|
81
90
|
*
|
|
82
|
-
* @param destination - Specify a destination to, which can be any `Pose` with
|
|
83
|
-
* map's origin.
|
|
84
|
-
* @param componentName - Component on the robot to move to the specified
|
|
85
|
-
*
|
|
91
|
+
* @param destination - Specify a destination to, which can be any `Pose` with
|
|
92
|
+
* respect to the SLAM map's origin.
|
|
93
|
+
* @param componentName - Component on the robot to move to the specified
|
|
94
|
+
* destination.
|
|
95
|
+
* @param slamServiceName - Name of the `SLAM` service from which the SLAM map
|
|
96
|
+
* is requested
|
|
86
97
|
* @param motionConfiguration - Optional motion configuration options.
|
|
87
98
|
* @param obstacles - Optional obstacles to be considered for motion planning.
|
|
88
99
|
*/
|
|
89
100
|
moveOnMap: (destination: Pose, componentName: string, slamServiceName: string, motionConfiguration?: MotionConfiguration, obstacles?: Geometry[], extra?: Struct) => Promise<string>;
|
|
90
101
|
/**
|
|
91
|
-
* Move a component to a specific latitude and longitude, using a
|
|
92
|
-
* location. `moveOnGlobe()` is non blocking,
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* `
|
|
102
|
+
* Move a component to a specific latitude and longitude, using a
|
|
103
|
+
* `MovementSensor` to check the location. `moveOnGlobe()` is non blocking,
|
|
104
|
+
* meaning the motion service will move the component to the destination GPS
|
|
105
|
+
* point after `moveOnGlobe()` returns. Each successful `moveOnGlobe()` call
|
|
106
|
+
* retuns a unique ExectionID which you can use to identify all plans
|
|
107
|
+
* generated durring the `moveOnGlobe()` call. You can monitor the progress of
|
|
108
|
+
* the `moveOnGlobe()` call by querying `getPlan()` and `listPlanStatuses()`.
|
|
97
109
|
*
|
|
98
110
|
* @example
|
|
99
111
|
*
|
|
@@ -113,25 +125,29 @@ export interface Motion extends Resource {
|
|
|
113
125
|
* const globeExecutionId = await motion.moveOnGlobe(
|
|
114
126
|
* destination,
|
|
115
127
|
* baseName,
|
|
116
|
-
* movementSensorName
|
|
128
|
+
* movementSensorName
|
|
117
129
|
* );
|
|
118
130
|
* ```
|
|
119
131
|
*
|
|
120
132
|
* For more information, see [Motion
|
|
121
133
|
* API](https://docs.viam.com/dev/reference/apis/services/motion/#moveonglobe).
|
|
122
134
|
*
|
|
123
|
-
* @param destination - Destination for the component to move to, represented
|
|
135
|
+
* @param destination - Destination for the component to move to, represented
|
|
136
|
+
* as a `GeoPoint`.
|
|
124
137
|
* @param componentName - The name of the component to move.
|
|
125
|
-
* @param movementSensorName - The name of the `Movement Sensor` used to check
|
|
126
|
-
* location.
|
|
127
|
-
* @param obstaclesList - Obstacles to consider when planning the motion of
|
|
138
|
+
* @param movementSensorName - The name of the `Movement Sensor` used to check
|
|
139
|
+
* the robot's location.
|
|
140
|
+
* @param obstaclesList - Obstacles to consider when planning the motion of
|
|
141
|
+
* the component.
|
|
128
142
|
* @param heading - Compass heading, in degrees, to achieve at destination.
|
|
129
143
|
* @param motionConfiguration - Optional motion configuration options.
|
|
130
|
-
* @param boundingRegion - Set of obstacles which the robot must remain within
|
|
144
|
+
* @param boundingRegion - Set of obstacles which the robot must remain within
|
|
145
|
+
* while navigating
|
|
131
146
|
*/
|
|
132
147
|
moveOnGlobe: (destination: GeoPoint, componentName: string, movementSensorName: string, heading?: number, obstaclesList?: GeoGeometry[], motionConfiguration?: MotionConfiguration, boundingRegion?: GeoGeometry[], extra?: Struct) => Promise<string>;
|
|
133
148
|
/**
|
|
134
|
-
* Stop a component being moved by an in progress `moveOnGlobe()` or
|
|
149
|
+
* Stop a component being moved by an in progress `moveOnGlobe()` or
|
|
150
|
+
* `moveOnMap()` call.
|
|
135
151
|
*
|
|
136
152
|
* @example
|
|
137
153
|
*
|
|
@@ -150,17 +166,18 @@ export interface Motion extends Resource {
|
|
|
150
166
|
*/
|
|
151
167
|
stopPlan: (componentName: string, extra?: Struct) => Promise<null>;
|
|
152
168
|
/**
|
|
153
|
-
* By default: returns the plan history of the most recent `moveOnGlobe()` or
|
|
154
|
-
* to move a component. The plan history for executions
|
|
155
|
-
*
|
|
156
|
-
* are met:
|
|
169
|
+
* By default: returns the plan history of the most recent `moveOnGlobe()` or
|
|
170
|
+
* `moveOnMap()` call to move a component. The plan history for executions
|
|
171
|
+
* before the most recent can be requested by providing an ExecutionID in the
|
|
172
|
+
* request. Returns a result if both of the following conditions are met:
|
|
157
173
|
*
|
|
158
|
-
* - The execution (call to `moveOnGlobe()` or `moveOnMap()`) is still executing
|
|
159
|
-
* state within the last 24 hours
|
|
174
|
+
* - The execution (call to `moveOnGlobe()` or `moveOnMap()`) is still executing
|
|
175
|
+
* **or** changed state within the last 24 hours
|
|
160
176
|
* - The robot has not reinitialized
|
|
161
177
|
*
|
|
162
|
-
* Plans never change. Replans always create new plans. Replans share the
|
|
163
|
-
* previously executing plan. All repeated fields are in
|
|
178
|
+
* Plans never change. Replans always create new plans. Replans share the
|
|
179
|
+
* ExecutionID of the previously executing plan. All repeated fields are in
|
|
180
|
+
* chronological order.
|
|
164
181
|
*
|
|
165
182
|
* @example
|
|
166
183
|
*
|
|
@@ -176,15 +193,17 @@ export interface Motion extends Resource {
|
|
|
176
193
|
* API](https://docs.viam.com/dev/reference/apis/services/motion/#getplan).
|
|
177
194
|
*
|
|
178
195
|
* @param componentName - The component to query
|
|
179
|
-
* @param destinationFrame - The reference frame in which the component's
|
|
180
|
-
* provided, if unset this defaults to the "world"
|
|
181
|
-
*
|
|
182
|
-
*
|
|
196
|
+
* @param destinationFrame - The reference frame in which the component's
|
|
197
|
+
* `Pose` should be provided, if unset this defaults to the "world"
|
|
198
|
+
* reference frame.
|
|
199
|
+
* @param supplementalTransforms - `Pose` information on any additional
|
|
200
|
+
* reference frames that are needed to compute the component's `Pose`.
|
|
183
201
|
*/
|
|
184
202
|
getPlan: (componentName: string, lastPlanOnly?: boolean, executionId?: string, extra?: Struct) => Promise<GetPlanResponse>;
|
|
185
203
|
/**
|
|
186
|
-
* Returns the statuses of plans created by MoveOnGlobe calls that meet at
|
|
187
|
-
* following conditions since the motion service
|
|
204
|
+
* Returns the statuses of plans created by MoveOnGlobe calls that meet at
|
|
205
|
+
* least one of the following conditions since the motion service
|
|
206
|
+
* initialized:
|
|
188
207
|
*
|
|
189
208
|
* - The plan's status is in progress
|
|
190
209
|
* - The plan's status changed state within the last 24 hours
|
|
@@ -203,7 +222,8 @@ export interface Motion extends Resource {
|
|
|
203
222
|
* For more information, see [Motion
|
|
204
223
|
* API](https://docs.viam.com/dev/reference/apis/services/motion/#listplanstatuses).
|
|
205
224
|
*
|
|
206
|
-
* @param onlyActivePlans - If true, the response will only return plans which
|
|
225
|
+
* @param onlyActivePlans - If true, the response will only return plans which
|
|
226
|
+
* are executing.
|
|
207
227
|
*/
|
|
208
228
|
listPlanStatuses: (onlyActivePlans?: boolean, extra?: Struct) => Promise<ListPlanStatusesResponse>;
|
|
209
229
|
/**
|
|
@@ -218,17 +238,22 @@ export interface Motion extends Resource {
|
|
|
218
238
|
* const gripperName = 'my_gripper';
|
|
219
239
|
*
|
|
220
240
|
* // Get the gripper's pose in world coordinates
|
|
221
|
-
* const gripperPoseInWorld = await motion.getPose(
|
|
241
|
+
* const gripperPoseInWorld = await motion.getPose(
|
|
242
|
+
* gripperName,
|
|
243
|
+
* 'world',
|
|
244
|
+
* []
|
|
245
|
+
* );
|
|
222
246
|
* ```
|
|
223
247
|
*
|
|
224
248
|
* For more information, see [Motion
|
|
225
249
|
* API](https://docs.viam.com/dev/reference/apis/services/motion/#getpose).
|
|
226
250
|
*
|
|
227
251
|
* @param componentName - The component whose `Pose` is being requested.
|
|
228
|
-
* @param destinationFrame - The reference frame in which the component's
|
|
229
|
-
* provided, if unset this defaults to the "world"
|
|
230
|
-
*
|
|
231
|
-
*
|
|
252
|
+
* @param destinationFrame - The reference frame in which the component's
|
|
253
|
+
* `Pose` should be provided, if unset this defaults to the "world"
|
|
254
|
+
* reference frame.
|
|
255
|
+
* @param supplementalTransforms - `Pose` information on any additional
|
|
256
|
+
* reference frames that are needed to compute the component's `Pose`.
|
|
232
257
|
*/
|
|
233
258
|
getPose: (componentName: string, destinationFrame: string, supplementalTransforms: Transform[], extra?: Struct) => Promise<PoseInFrame>;
|
|
234
259
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Struct, type JsonValue } from '@bufbuild/protobuf';
|
|
2
2
|
import type { CallOptions } from '@connectrpc/connect';
|
|
3
|
-
import {
|
|
3
|
+
import { RobotClient } from '../../robot';
|
|
4
4
|
import type { GeoPoint, Options } from '../../types';
|
|
5
5
|
import type { Navigation } from './navigation';
|
|
6
6
|
import type { Mode } from './types';
|
|
@@ -2,7 +2,8 @@ import type { Struct } from '@bufbuild/protobuf';
|
|
|
2
2
|
import type { GeoGeometry, GeoPoint, Resource } from '../../types';
|
|
3
3
|
import type { Mode, NavigationPosition, NavigationProperties, Path, Waypoint } from './types';
|
|
4
4
|
/**
|
|
5
|
-
* A service that uses GPS to automatically navigate a robot to user defined
|
|
5
|
+
* A service that uses GPS to automatically navigate a robot to user defined
|
|
6
|
+
* endpoints.
|
|
6
7
|
*
|
|
7
8
|
* @example
|
|
8
9
|
*
|
|
@@ -119,7 +120,8 @@ export interface Navigation extends Resource {
|
|
|
119
120
|
* For more information, see [Navigation
|
|
120
121
|
* API](https://docs.viam.com/dev/reference/apis/services/navigation/#removewaypoint).
|
|
121
122
|
*
|
|
122
|
-
* @param id - The MongoDB ObjectID of the waypoint to remove from the
|
|
123
|
+
* @param id - The MongoDB ObjectID of the waypoint to remove from the
|
|
124
|
+
* service's data storage.
|
|
123
125
|
*/
|
|
124
126
|
removeWayPoint: (id: string, extra?: Struct) => Promise<void>;
|
|
125
127
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { JsonValue, Struct } from '@bufbuild/protobuf';
|
|
2
2
|
import type { CallOptions } from '@connectrpc/connect';
|
|
3
|
-
import {
|
|
3
|
+
import { RobotClient } from '../../robot';
|
|
4
4
|
import type { Options } from '../../types';
|
|
5
5
|
import type { Slam } from './slam';
|
|
6
6
|
/**
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { Resource } from '../../types';
|
|
2
2
|
import type { SlamPosition, SlamProperties } from './types';
|
|
3
3
|
/**
|
|
4
|
-
* A service that allows your robot to create a map of its surroundings and find
|
|
5
|
-
* that map.
|
|
4
|
+
* A service that allows your robot to create a map of its surroundings and find
|
|
5
|
+
* its location within that map.
|
|
6
6
|
*/
|
|
7
7
|
export interface Slam extends Resource {
|
|
8
8
|
/**
|
|
9
|
-
* Get the current position of the specified source component in the point
|
|
9
|
+
* Get the current position of the specified source component in the point
|
|
10
|
+
* cloud SLAM map.
|
|
10
11
|
*
|
|
11
12
|
* @example
|
|
12
13
|
*
|
|
@@ -42,7 +43,8 @@ export interface Slam extends Resource {
|
|
|
42
43
|
*/
|
|
43
44
|
getPointCloudMap: (returnEditedMap?: boolean) => Promise<Uint8Array>;
|
|
44
45
|
/**
|
|
45
|
-
* Get the internal state of the SLAM algorithm required to continue
|
|
46
|
+
* Get the internal state of the SLAM algorithm required to continue
|
|
47
|
+
* mapping/localization.
|
|
46
48
|
*
|
|
47
49
|
* @example
|
|
48
50
|
*
|
|
@@ -14,11 +14,15 @@ export interface Video extends Resource {
|
|
|
14
14
|
* new Date('2025-01-01T00:00:00Z'),
|
|
15
15
|
* new Date('2025-01-01T00:10:00Z'),
|
|
16
16
|
* 'h264',
|
|
17
|
-
* 'mp4'
|
|
17
|
+
* 'mp4'
|
|
18
18
|
* );
|
|
19
19
|
*
|
|
20
20
|
* for await (const chunk of videoStream) {
|
|
21
|
-
* console.log(
|
|
21
|
+
* console.log(
|
|
22
|
+
* 'Received video chunk:',
|
|
23
|
+
* chunk.videoData.length,
|
|
24
|
+
* 'bytes'
|
|
25
|
+
* );
|
|
22
26
|
* }
|
|
23
27
|
* ```
|
|
24
28
|
*
|
|
@@ -35,7 +35,7 @@ export interface Vision extends Resource {
|
|
|
35
35
|
* images[0].image,
|
|
36
36
|
* 600,
|
|
37
37
|
* 600,
|
|
38
|
-
* images[0].mimeType
|
|
38
|
+
* images[0].mimeType
|
|
39
39
|
* );
|
|
40
40
|
* ```
|
|
41
41
|
*
|
|
@@ -56,7 +56,10 @@ export interface Vision extends Resource {
|
|
|
56
56
|
*
|
|
57
57
|
* ```ts
|
|
58
58
|
* const vision = new VIAM.VisionClient(machine, 'my_vision');
|
|
59
|
-
* const classifications = await vision.getClassificationsFromCamera(
|
|
59
|
+
* const classifications = await vision.getClassificationsFromCamera(
|
|
60
|
+
* 'my_camera',
|
|
61
|
+
* 10
|
|
62
|
+
* );
|
|
60
63
|
* ```
|
|
61
64
|
*
|
|
62
65
|
* For more information, see [Vision
|
|
@@ -82,7 +85,7 @@ export interface Vision extends Resource {
|
|
|
82
85
|
* 600,
|
|
83
86
|
* 600,
|
|
84
87
|
* images[0].mimeType,
|
|
85
|
-
* 10
|
|
88
|
+
* 10
|
|
86
89
|
* );
|
|
87
90
|
* ```
|
|
88
91
|
*
|
|
@@ -98,14 +101,15 @@ export interface Vision extends Resource {
|
|
|
98
101
|
*/
|
|
99
102
|
getClassifications: (image: Uint8Array, width: number, height: number, mimeType: MimeType, count: number, extra?: Struct) => Promise<Classification[]>;
|
|
100
103
|
/**
|
|
101
|
-
* Returns a list of the 3D point cloud objects and associated metadata in the
|
|
102
|
-
* obtained from the specified 3D camera.
|
|
104
|
+
* Returns a list of the 3D point cloud objects and associated metadata in the
|
|
105
|
+
* latest picture obtained from the specified 3D camera.
|
|
103
106
|
*
|
|
104
107
|
* @example
|
|
105
108
|
*
|
|
106
109
|
* ```ts
|
|
107
110
|
* const vision = new VIAM.VisionClient(machine, 'my_vision');
|
|
108
|
-
* const pointCloudObjects =
|
|
111
|
+
* const pointCloudObjects =
|
|
112
|
+
* await vision.getObjectPointClouds('my_camera');
|
|
109
113
|
* ```
|
|
110
114
|
*
|
|
111
115
|
* For more information, see [Vision
|
|
@@ -116,8 +120,9 @@ export interface Vision extends Resource {
|
|
|
116
120
|
*/
|
|
117
121
|
getObjectPointClouds: (cameraName: string, extra?: Struct) => Promise<PointCloudObject[]>;
|
|
118
122
|
/**
|
|
119
|
-
* Returns an object describing the properties of the vision service, namely
|
|
120
|
-
* whether classifications, detections, and 3d
|
|
123
|
+
* Returns an object describing the properties of the vision service, namely
|
|
124
|
+
* booleans indicating whether classifications, detections, and 3d
|
|
125
|
+
* segmentation are supported.
|
|
121
126
|
*
|
|
122
127
|
* @example
|
|
123
128
|
*
|
|
@@ -133,8 +138,8 @@ export interface Vision extends Resource {
|
|
|
133
138
|
*/
|
|
134
139
|
getProperties: (extra?: Struct) => Promise<Properties>;
|
|
135
140
|
/**
|
|
136
|
-
* Returns the requested image, classifications, detections, and 3d point
|
|
137
|
-
* next image given a camera.
|
|
141
|
+
* Returns the requested image, classifications, detections, and 3d point
|
|
142
|
+
* cloud objects in the next image given a camera.
|
|
138
143
|
*
|
|
139
144
|
* @example
|
|
140
145
|
*
|
|
@@ -151,10 +156,11 @@ export interface Vision extends Resource {
|
|
|
151
156
|
* For more information, see [Vision
|
|
152
157
|
* API](https://docs.viam.com/dev/reference/apis/services/vision/#captureallfromcamera).
|
|
153
158
|
*
|
|
154
|
-
* @param cameraName - The name of the camera to use for classification,
|
|
155
|
-
* segmentation.
|
|
159
|
+
* @param cameraName - The name of the camera to use for classification,
|
|
160
|
+
* detection, and segmentation.
|
|
156
161
|
* @param opts - The fields desired in the response.
|
|
157
|
-
* @returns - The requested image, classifications, detections, and 3d point
|
|
162
|
+
* @returns - The requested image, classifications, detections, and 3d point
|
|
163
|
+
* cloud objects.
|
|
158
164
|
*/
|
|
159
165
|
captureAllFromCamera: (cameraName: string, opts: CaptureAllOptions, extra?: Struct) => Promise<CaptureAllResponse>;
|
|
160
166
|
}
|
|
@@ -2,8 +2,8 @@ import type { Struct } from '@bufbuild/protobuf';
|
|
|
2
2
|
import type { Transform, Resource } from '../../types';
|
|
3
3
|
import type { TransformChangeEvent, TransformWithUUID } from './types';
|
|
4
4
|
/**
|
|
5
|
-
* A service that manages world state transforms, allowing storage and retrieval
|
|
6
|
-
* relationships between reference frames.
|
|
5
|
+
* A service that manages world state transforms, allowing storage and retrieval
|
|
6
|
+
* of spatial relationships between reference frames.
|
|
7
7
|
*/
|
|
8
8
|
export interface WorldStateStore extends Resource {
|
|
9
9
|
/**
|
|
@@ -12,7 +12,10 @@ export interface WorldStateStore extends Resource {
|
|
|
12
12
|
* @example
|
|
13
13
|
*
|
|
14
14
|
* ```ts
|
|
15
|
-
* const worldStateStore = new VIAM.WorldStateStoreClient(
|
|
15
|
+
* const worldStateStore = new VIAM.WorldStateStoreClient(
|
|
16
|
+
* machine,
|
|
17
|
+
* 'builtin'
|
|
18
|
+
* );
|
|
16
19
|
*
|
|
17
20
|
* // Get all transform UUIDs
|
|
18
21
|
* const uuids = await worldStateStore.listUUIDs();
|
|
@@ -27,7 +30,10 @@ export interface WorldStateStore extends Resource {
|
|
|
27
30
|
* @example
|
|
28
31
|
*
|
|
29
32
|
* ```ts
|
|
30
|
-
* const worldStateStore = new VIAM.WorldStateStoreClient(
|
|
33
|
+
* const worldStateStore = new VIAM.WorldStateStoreClient(
|
|
34
|
+
* machine,
|
|
35
|
+
* 'builtin'
|
|
36
|
+
* );
|
|
31
37
|
*
|
|
32
38
|
* // Get a specific transform by UUID
|
|
33
39
|
* const transform = await worldStateStore.getTransform(uuid);
|
|
@@ -45,12 +51,19 @@ export interface WorldStateStore extends Resource {
|
|
|
45
51
|
* @example
|
|
46
52
|
*
|
|
47
53
|
* ```ts
|
|
48
|
-
* const worldStateStore = new VIAM.WorldStateStoreClient(
|
|
54
|
+
* const worldStateStore = new VIAM.WorldStateStoreClient(
|
|
55
|
+
* machine,
|
|
56
|
+
* 'builtin'
|
|
57
|
+
* );
|
|
49
58
|
*
|
|
50
59
|
* // Stream transform changes
|
|
51
60
|
* const stream = worldStateStore.streamTransformChanges();
|
|
52
61
|
* for await (const change of stream) {
|
|
53
|
-
* console.log(
|
|
62
|
+
* console.log(
|
|
63
|
+
* 'Transform change:',
|
|
64
|
+
* change.changeType,
|
|
65
|
+
* change.transform
|
|
66
|
+
* );
|
|
54
67
|
* }
|
|
55
68
|
* ```
|
|
56
69
|
*
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Struct, type JsonValue, type PlainMessage } from '@bufbuild/protobuf';
|
|
2
2
|
export { Code, ConnectError } from '@connectrpc/connect';
|
|
3
3
|
export { ConnectionClosedError } from './rpc';
|
|
4
4
|
export interface Options {
|
|
@@ -21,11 +21,13 @@ export interface Resource {
|
|
|
21
21
|
* // Struct (still supported)
|
|
22
22
|
* import { Struct } from '@viamrobotics/sdk';
|
|
23
23
|
*
|
|
24
|
-
* const result = await resource.doCommand(
|
|
24
|
+
* const result = await resource.doCommand(
|
|
25
|
+
* Struct.fromJson({ myCommand: { key: 'value' } })
|
|
26
|
+
* );
|
|
25
27
|
* ```
|
|
26
28
|
*
|
|
27
|
-
* @param command - The command to execute. Accepts either a {@link Struct} or
|
|
28
|
-
* which will be converted automatically.
|
|
29
|
+
* @param command - The command to execute. Accepts either a {@link Struct} or
|
|
30
|
+
* a plain object, which will be converted automatically.
|
|
29
31
|
*/
|
|
30
32
|
doCommand(command: Struct | Record<string, JsonValue>): Promise<JsonValue>;
|
|
31
33
|
/** Get the status of the resource. */
|
|
@@ -49,4 +51,4 @@ export type Vector3 = PlainMessage<commonApi.Vector3>;
|
|
|
49
51
|
export type WorldState = PlainMessage<commonApi.WorldState>;
|
|
50
52
|
export declare const Capsule: typeof commonApi.Capsule, GeoGeometry: typeof commonApi.GeoGeometry, GeoPoint: typeof commonApi.GeoPoint, GeometriesInFrame: typeof commonApi.GeometriesInFrame, Geometry: typeof commonApi.Geometry, Orientation: typeof commonApi.Orientation, PointCloud: typeof commonApi.PointCloud, Pose: typeof commonApi.Pose, PoseInFrame: typeof commonApi.PoseInFrame, RectangularPrism: typeof commonApi.RectangularPrism, ResourceName: typeof commonApi.ResourceName, Sphere: typeof commonApi.Sphere, Transform: typeof commonApi.Transform, Vector3: typeof commonApi.Vector3, WorldState: typeof commonApi.WorldState;
|
|
51
53
|
export declare const isValidGeoPoint: (value: GeoPoint) => boolean;
|
|
52
|
-
export { Duration, Struct, Timestamp, type JsonValue, type PlainMessage } from '@bufbuild/protobuf';
|
|
54
|
+
export { Duration, Struct, Timestamp, type JsonValue, type PlainMessage, } from '@bufbuild/protobuf';
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Struct, type JsonValue, type PartialMessage } from '@bufbuild/protobuf';
|
|
2
2
|
import type { CallOptions } from '@connectrpc/connect';
|
|
3
|
-
import
|
|
4
|
-
import { DoCommandRequest, type DoCommandResponse, type Geometry, GetGeometriesRequest, type GetGeometriesResponse, GetKinematicsRequest, type GetKinematicsResponse, GetStatusRequest, type GetStatusResponse, type Mesh } from './gen/common/v1/common_pb';
|
|
3
|
+
import { DoCommandRequest, DoCommandResponse, GetKinematicsRequest, GetKinematicsResponse, GetGeometriesRequest, GetGeometriesResponse, GetStatusRequest, GetStatusResponse, Geometry, Mesh } from './gen/common/v1/common_pb';
|
|
5
4
|
import type { Options, Vector3 } from './types';
|
|
5
|
+
import type { Frame } from './gen/app/v1/robot_pb';
|
|
6
6
|
export declare const clientHeaders: Headers;
|
|
7
7
|
type doCommand = (request: PartialMessage<DoCommandRequest>, options?: CallOptions) => Promise<DoCommandResponse>;
|
|
8
8
|
/**
|
|
@@ -20,12 +20,12 @@ type doCommand = (request: PartialMessage<DoCommandRequest>, options?: CallOptio
|
|
|
20
20
|
* const result = await doCommandFromClient(
|
|
21
21
|
* doFn,
|
|
22
22
|
* name,
|
|
23
|
-
* Struct.fromJson({ myCommand: { key: 'value' } })
|
|
23
|
+
* Struct.fromJson({ myCommand: { key: 'value' } })
|
|
24
24
|
* );
|
|
25
25
|
* ```
|
|
26
26
|
*
|
|
27
|
-
* @param command - The command to execute. Accepts either a {@link Struct} or a
|
|
28
|
-
* will be converted automatically.
|
|
27
|
+
* @param command - The command to execute. Accepts either a {@link Struct} or a
|
|
28
|
+
* plain object, which will be converted automatically.
|
|
29
29
|
*/
|
|
30
30
|
export declare const doCommandFromClient: (doCommander: doCommand, name: string, command: Struct | Record<string, JsonValue>, options?: Options, callOptions?: CallOptions) => Promise<JsonValue>;
|
|
31
31
|
export declare const enableDebugLogging: (key?: string, opts?: CallOptions) => CallOptions;
|