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