@viamrobotics/sdk 0.77.0 → 0.79.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.
Files changed (50) hide show
  1. package/README.md +1 -1
  2. package/dist/api-version.d.ts +1 -1
  3. package/dist/app/app-client.d.ts +109 -102
  4. package/dist/app/billing-client.d.ts +4 -4
  5. package/dist/app/data-client.d.ts +31 -31
  6. package/dist/app/ml-training-client.d.ts +6 -6
  7. package/dist/app/viam-client.d.ts +2 -1
  8. package/dist/app/viam-transport.d.ts +2 -3
  9. package/dist/components/arm/arm.d.ts +8 -9
  10. package/dist/components/base/base.d.ts +8 -8
  11. package/dist/components/board/board.d.ts +12 -12
  12. package/dist/components/button/button.d.ts +1 -1
  13. package/dist/components/camera/camera.d.ts +2 -2
  14. package/dist/components/encoder/encoder.d.ts +4 -4
  15. package/dist/components/gantry/gantry.d.ts +8 -8
  16. package/dist/components/generic/generic.d.ts +1 -1
  17. package/dist/components/gripper/gripper.d.ts +6 -6
  18. package/dist/components/input-controller/input-controller.d.ts +3 -3
  19. package/dist/components/motor/motor.d.ts +11 -11
  20. package/dist/components/movement-sensor/movement-sensor.d.ts +10 -10
  21. package/dist/components/pose-tracker/pose-tracker.d.ts +1 -1
  22. package/dist/components/power-sensor/power-sensor.d.ts +4 -4
  23. package/dist/components/sensor/sensor.d.ts +1 -1
  24. package/dist/components/servo/servo.d.ts +5 -5
  25. package/dist/components/switch/switch.d.ts +3 -3
  26. package/dist/gen/app/mltraining/v1/ml_training_pb.d.ts +7 -0
  27. package/dist/gen/app/v1/app_pb.d.ts +14 -0
  28. package/dist/gen/app/v1/billing_pb.d.ts +5 -0
  29. package/dist/gen/app/v1/robot_pb.d.ts +18 -6
  30. package/dist/gen/common/v1/common_pb.d.ts +588 -6
  31. package/dist/gen/google/api/field_behavior_pb.d.ts +1 -1
  32. package/dist/gen/proto/rpc/webrtc/v1/grpc_pb.d.ts +9 -0
  33. package/dist/gen/proto/rpc/webrtc/v1/signaling_pb.d.ts +25 -0
  34. package/dist/gen/robot/v1/robot_pb.d.ts +66 -2
  35. package/dist/gen/service/motion/v1/motion_pb.d.ts +8 -0
  36. package/dist/gen/service/navigation/v1/navigation_connect.d.ts +324 -43
  37. package/dist/gen/service/navigation/v1/navigation_pb.d.ts +2350 -229
  38. package/dist/main.d.ts +5 -5
  39. package/dist/main.es.js +9579 -7720
  40. package/dist/main.umd.js +11 -9
  41. package/dist/robot/client.d.ts +57 -1272
  42. package/dist/services/data-manager/client.d.ts +2 -2
  43. package/dist/services/motion/motion.d.ts +7 -7
  44. package/dist/services/navigation/client.d.ts +32 -11
  45. package/dist/services/navigation/navigation.d.ts +162 -110
  46. package/dist/services/navigation/types.d.ts +36 -5
  47. package/dist/services/navigation.d.ts +1 -1
  48. package/dist/services/slam/slam.d.ts +4 -4
  49. package/dist/services/vision/vision.d.ts +8 -8
  50. package/package.json +4 -4
@@ -21,7 +21,7 @@ export declare class DataManagerClient implements DataManager {
21
21
  * ```
22
22
  *
23
23
  * For more information, see [Data Manager
24
- * API](https://docs.viam.com/dev/reference/apis/services/data/#sync).
24
+ * API](https://docs.viam.com/reference/apis/services/data/#sync).
25
25
  *
26
26
  * @param extra - Extra arguments to pass to the sync request.
27
27
  * @param callOptions - Call options for the sync request.
@@ -38,7 +38,7 @@ export declare class DataManagerClient implements DataManager {
38
38
  * ```
39
39
  *
40
40
  * For more information, see [Data Manager
41
- * API](https://docs.viam.com/dev/reference/apis/services/data/#docommand).
41
+ * API](https://docs.viam.com/reference/apis/services/data/#docommand).
42
42
  *
43
43
  * @param command - The command to do.
44
44
  * @param callOptions - Call options for the command.
@@ -34,7 +34,7 @@ export interface Motion extends Resource {
34
34
  * ```
35
35
  *
36
36
  * For more information, see [Motion
37
- * API](https://docs.viam.com/dev/reference/apis/services/motion/#move).
37
+ * API](https://docs.viam.com/reference/apis/services/motion/#move).
38
38
  *
39
39
  * @param destination - Destination to move to, which can a pose in the reference frame of any
40
40
  * frame in the robot's frame system.
@@ -77,7 +77,7 @@ export interface Motion extends Resource {
77
77
  * ```
78
78
  *
79
79
  * For more information, see [Motion
80
- * API](https://docs.viam.com/dev/reference/apis/services/motion/#moveonmap).
80
+ * API](https://docs.viam.com/reference/apis/services/motion/#moveonmap).
81
81
  *
82
82
  * @param destination - Specify a destination to, which can be any `Pose` with respect to the SLAM
83
83
  * map's origin.
@@ -118,7 +118,7 @@ export interface Motion extends Resource {
118
118
  * ```
119
119
  *
120
120
  * For more information, see [Motion
121
- * API](https://docs.viam.com/dev/reference/apis/services/motion/#moveonglobe).
121
+ * API](https://docs.viam.com/reference/apis/services/motion/#moveonglobe).
122
122
  *
123
123
  * @param destination - Destination for the component to move to, represented as a `GeoPoint`.
124
124
  * @param componentName - The name of the component to move.
@@ -144,7 +144,7 @@ export interface Motion extends Resource {
144
144
  * ```
145
145
  *
146
146
  * For more information, see [Motion
147
- * API](https://docs.viam.com/dev/reference/apis/services/motion/#stopplan).
147
+ * API](https://docs.viam.com/reference/apis/services/motion/#stopplan).
148
148
  *
149
149
  * @param componentName - The component to stop
150
150
  */
@@ -173,7 +173,7 @@ export interface Motion extends Resource {
173
173
  * ```
174
174
  *
175
175
  * For more information, see [Motion
176
- * API](https://docs.viam.com/dev/reference/apis/services/motion/#getplan).
176
+ * API](https://docs.viam.com/reference/apis/services/motion/#getplan).
177
177
  *
178
178
  * @param componentName - The component to query
179
179
  * @param destinationFrame - The reference frame in which the component's `Pose` should be
@@ -201,7 +201,7 @@ export interface Motion extends Resource {
201
201
  * ```
202
202
  *
203
203
  * For more information, see [Motion
204
- * API](https://docs.viam.com/dev/reference/apis/services/motion/#listplanstatuses).
204
+ * API](https://docs.viam.com/reference/apis/services/motion/#listplanstatuses).
205
205
  *
206
206
  * @param onlyActivePlans - If true, the response will only return plans which are executing.
207
207
  */
@@ -222,7 +222,7 @@ export interface Motion extends Resource {
222
222
  * ```
223
223
  *
224
224
  * For more information, see [Motion
225
- * API](https://docs.viam.com/dev/reference/apis/services/motion/#getpose).
225
+ * API](https://docs.viam.com/reference/apis/services/motion/#getpose).
226
226
  *
227
227
  * @param componentName - The component whose `Pose` is being requested.
228
228
  * @param destinationFrame - The reference frame in which the component's `Pose` should be
@@ -1,9 +1,9 @@
1
1
  import { Struct, type JsonValue } from '@bufbuild/protobuf';
2
2
  import type { CallOptions } from '@connectrpc/connect';
3
3
  import { type RobotClient } from '../../robot';
4
- import type { GeoPoint, Options } from '../../types';
4
+ import type { Options } from '../../types';
5
5
  import type { Navigation } from './navigation';
6
- import type { Mode } from './types';
6
+ import type { NavigateRouteOptions, Plan, Position, Waypoint } from './types';
7
7
  /**
8
8
  * A gRPC-web client for a Navigation service.
9
9
  *
@@ -15,15 +15,36 @@ export declare class NavigationClient implements Navigation {
15
15
  private readonly options;
16
16
  callOptions: CallOptions;
17
17
  constructor(client: RobotClient, name: string, options?: Options);
18
- getMode(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Mode>;
19
- setMode(mode: Mode, extra?: {}, callOptions?: CallOptions): Promise<void>;
20
- getLocation(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").GetLocationResponse>;
21
- getWayPoints(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Waypoint[]>;
22
- addWayPoint(location: GeoPoint, extra?: {}, callOptions?: CallOptions): Promise<void>;
23
- removeWayPoint(id: string, extra?: {}, callOptions?: CallOptions): Promise<void>;
24
- getObstacles(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/common/v1/common_pb").GeoGeometry[]>;
25
- getPaths(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Path[]>;
26
- getProperties(callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").GetPropertiesResponse>;
18
+ addLocation(locationName: string, position?: Position, extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Location>;
19
+ getLocation(locationName: string, extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Location>;
20
+ listLocations(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Location[]>;
21
+ updateLocation(locationName: string, position?: Position, newName?: string, extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Location>;
22
+ deleteLocation(locationName: string, extra?: {}, callOptions?: CallOptions): Promise<void>;
23
+ addRoute(routeName: string, waypoints: Waypoint[], extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Route>;
24
+ getRoute(routeName: string, extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Route>;
25
+ listRoutes(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Route[]>;
26
+ updateRoute(routeName: string, newName?: string, waypoints?: Waypoint[], extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Route>;
27
+ deleteRoute(routeName: string, extra?: {}, callOptions?: CallOptions): Promise<void>;
28
+ addZone(zoneName: string, type: string, geometry: Struct, maxSpeed?: number, extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Zone>;
29
+ getZone(zoneName: string, extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Zone>;
30
+ listZones(type?: string, extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Zone[]>;
31
+ updateZone(zoneName: string, type?: string, geometry?: Struct, maxSpeed?: number, newName?: string, extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Zone>;
32
+ deleteZone(zoneName: string, extra?: {}, callOptions?: CallOptions): Promise<void>;
33
+ navigateToLocation(locationName: string, extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Status>;
34
+ navigateToPoint(destination: Position, extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Status>;
35
+ navigateRoute({ routeName, waypoints, startIndex, startNearest, loop, wait, }: NavigateRouteOptions, extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Status>;
36
+ planToPoint(destination: Position, start?: Position, extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Plan>;
37
+ planToLocation(locationName: string, start?: Position, extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Plan>;
38
+ executePlan(plan: Plan, extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Status>;
39
+ goToLocation(locationName: string, wait?: boolean, linearMPerSec?: number, extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Status>;
40
+ goToPoint(destination: Position, wait?: boolean, linearMPerSec?: number, extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Status>;
41
+ suspend(reason?: string, extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Status>;
42
+ resume(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Status>;
43
+ cancel(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Status>;
44
+ getPosition(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Position>;
45
+ getNavigationStatus(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Status>;
46
+ getProperties(callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Properties>;
47
+ getCostmap(layer?: string, stride?: number, extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").GetCostmapResponse>;
27
48
  getStatus(callOptions?: CallOptions): Promise<JsonValue>;
28
49
  doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
29
50
  }
@@ -1,170 +1,222 @@
1
1
  import type { Struct } from '@bufbuild/protobuf';
2
- import type { GeoGeometry, GeoPoint, Resource } from '../../types';
3
- import type { Mode, NavigationPosition, NavigationProperties, Path, Waypoint } from './types';
2
+ import type { Resource } from '../../types';
3
+ import type { Costmap, Location, NavigateRouteOptions, Plan, Position, Properties, Route, Status, Waypoint, Zone } from './types';
4
4
  /**
5
- * A service that uses GPS to automatically navigate a robot to user defined endpoints.
5
+ * A service that navigates a robot to user defined endpoints, locations, or routes using either a
6
+ * local SLAM map or GPS.
6
7
  *
7
8
  * @example
8
9
  *
9
10
  * ```ts
10
11
  * const navigation = new VIAM.NavigationClient(machine, 'my_navigation');
11
12
  *
12
- * const mode = await navigation.getMode();
13
+ * const status = await navigation.getNavigationStatus();
13
14
  * ```
14
15
  *
15
16
  * For more information, see [Navigation
16
- * API](https://docs.viam.com/dev/reference/apis/services/navigation/#getmode).
17
+ * API](https://docs.viam.com/reference/apis/services/navigation/).
17
18
  */
18
19
  export interface Navigation extends Resource {
19
20
  /**
20
- * Get the mode the robot is operating in.
21
+ * Save a named position on the active map. If position is omitted, the robot's current position
22
+ * from getPosition is saved.
21
23
  *
22
- * @example
23
- *
24
- * ```ts
25
- * const navigation = new VIAM.NavigationClient(machine, 'my_navigation');
26
- *
27
- * const mode = await navigation.getMode();
28
- * ```
29
- *
30
- * For more information, see [Navigation
31
- * API](https://docs.viam.com/dev/reference/apis/services/navigation/#getmode).
24
+ * @param locationName - The name to save the location under.
25
+ * @param position - The position to save. Defaults to the robot's current position.
32
26
  */
33
- getMode: (extra?: Struct) => Promise<Mode>;
27
+ addLocation: (locationName: string, position?: Position, extra?: Struct) => Promise<Location>;
34
28
  /**
35
- * Set the mode the robot is operating in.
36
- *
37
- * @example
38
- *
39
- * ```ts
40
- * const navigation = new VIAM.NavigationClient(machine, 'my_navigation');
29
+ * Get a saved location by name. This does not return the robot's current position; use
30
+ * getPosition for that.
41
31
  *
42
- * // Set the mode to 2 which corresponds to WAYPOINT
43
- * await navigation.setMode(2);
44
- * ```
45
- *
46
- * For more information, see [Navigation
47
- * API](https://docs.viam.com/dev/reference/apis/services/navigation/#setmode).
48
- *
49
- * @param mode - The mode for the service to operate in.
50
- *
51
- * - 0: MODE_UNSPECIFIED
52
- * - 1: MODE_MANUAL
53
- * - 2: MODE_WAYPOINT
54
- * - 3: MODE_EXPLORE
32
+ * @param locationName - The name of the location to get.
55
33
  */
56
- setMode: (mode: Mode, extra?: Struct) => Promise<void>;
34
+ getLocation: (locationName: string, extra?: Struct) => Promise<Location>;
35
+ /** List all saved locations on the active map. */
36
+ listLocations: (extra?: Struct) => Promise<Location[]>;
57
37
  /**
58
- * Get the current location of the robot.
38
+ * Change a saved location's position or name. Renaming a location updates every route waypoint
39
+ * that references it.
59
40
  *
60
- * @example
61
- *
62
- * ```ts
63
- * const navigation = new VIAM.NavigationClient(machine, 'my_navigation');
64
- *
65
- * const location = await navigation.getLocation();
66
- * ```
67
- *
68
- * For more information, see [Navigation
69
- * API](https://docs.viam.com/dev/reference/apis/services/navigation/#getlocation).
41
+ * @param locationName - The name of the location to update.
42
+ * @param position - The new position. Omit to leave the position unchanged.
43
+ * @param newName - The new name. Omit to leave the name unchanged.
70
44
  */
71
- getLocation: (extra?: Struct) => Promise<NavigationPosition>;
45
+ updateLocation: (locationName: string, position?: Position, newName?: string, extra?: Struct) => Promise<Location>;
72
46
  /**
73
- * Get an array of waypoints currently in the service's data storage.
74
- *
75
- * @example
76
- *
77
- * ```ts
78
- * const navigation = new VIAM.NavigationClient(machine, 'my_navigation');
47
+ * Delete a saved location. The location is also removed from every route that references it.
79
48
  *
80
- * const waypoints = await navigation.getWayPoints();
81
- * ```
49
+ * @param locationName - The name of the location to delete.
50
+ */
51
+ deleteLocation: (locationName: string, extra?: Struct) => Promise<void>;
52
+ /**
53
+ * Create a named route from an ordered list of waypoints. Every referenced location must already
54
+ * exist.
82
55
  *
83
- * For more information, see [Navigation
84
- * API](https://docs.viam.com/dev/reference/apis/services/navigation/#getwaypoints).
56
+ * @param routeName - The name to save the route under.
57
+ * @param waypoints - The ordered list of waypoints for the route.
85
58
  */
86
- getWayPoints: (extra?: Struct) => Promise<Waypoint[]>;
59
+ addRoute: (routeName: string, waypoints: Waypoint[], extra?: Struct) => Promise<Route>;
87
60
  /**
88
- * Add a waypoint to the service's data storage.
61
+ * Get a route by name.
89
62
  *
90
- * @example
63
+ * @param routeName - The name of the route to get.
64
+ */
65
+ getRoute: (routeName: string, extra?: Struct) => Promise<Route>;
66
+ /** List all routes on the active map. */
67
+ listRoutes: (extra?: Struct) => Promise<Route[]>;
68
+ /**
69
+ * Rename a route and/or replace its waypoints. An omitted waypoints list leaves the waypoints
70
+ * unchanged; an empty list clears them.
91
71
  *
92
- * ```ts
93
- * const navigation = new VIAM.NavigationClient(machine, 'my_navigation');
72
+ * @param routeName - The name of the route to update.
73
+ * @param newName - The new name. Omit to leave the name unchanged.
74
+ * @param waypoints - The replacement waypoints. Omit to leave them unchanged.
75
+ */
76
+ updateRoute: (routeName: string, newName?: string, waypoints?: Waypoint[], extra?: Struct) => Promise<Route>;
77
+ /**
78
+ * Delete a route. The locations it references are not affected.
94
79
  *
95
- * const location = { latitude: 40.7128, longitude: -74.006 };
96
- * await navigation.addWayPoint(location);
97
- * ```
80
+ * @param routeName - The name of the route to delete.
81
+ */
82
+ deleteRoute: (routeName: string, extra?: Struct) => Promise<void>;
83
+ /**
84
+ * Create a keep-out or speed-limit zone on the active map. The planner avoids keep-out zones and
85
+ * caps speed inside speed-limit zones.
98
86
  *
99
- * For more information, see [Navigation
100
- * API](https://docs.viam.com/dev/reference/apis/services/navigation/#addwaypoint).
87
+ * @param zoneName - The name to save the zone under.
88
+ * @param type - Either "keepout" or "speed_limit".
89
+ * @param geometry - The zone's geometry (circle, box, or polygon).
90
+ * @param maxSpeed - The max speed in meters/sec. Required when type is "speed_limit".
91
+ */
92
+ addZone: (zoneName: string, type: string, geometry: Struct, maxSpeed?: number, extra?: Struct) => Promise<Zone>;
93
+ /**
94
+ * Get a zone by name.
101
95
  *
102
- * @param location - A waypoint described by latitude and longitude values.
96
+ * @param zoneName - The name of the zone to get.
103
97
  */
104
- addWayPoint: (location: GeoPoint, extra?: Struct) => Promise<void>;
98
+ getZone: (zoneName: string, extra?: Struct) => Promise<Zone>;
105
99
  /**
106
- * Remove a waypoint from the service's data storage.
100
+ * List zones on the active map, optionally filtered by type.
107
101
  *
108
- * @example
102
+ * @param type - Optional; "keepout" or "speed_limit".
103
+ */
104
+ listZones: (type?: string, extra?: Struct) => Promise<Zone[]>;
105
+ /**
106
+ * Change a zone's type, geometry, speed limit, or name.
109
107
  *
110
- * ```ts
111
- * const navigation = new VIAM.NavigationClient(machine, 'my_navigation');
108
+ * @param zoneName - The name of the zone to update.
109
+ * @param type - Optional; "keepout" or "speed_limit".
110
+ * @param geometry - Optional; the zone's new geometry.
111
+ * @param maxSpeed - Optional; the new max speed in meters/sec.
112
+ * @param newName - Optional; the new name for the zone.
113
+ */
114
+ updateZone: (zoneName: string, type?: string, geometry?: Struct, maxSpeed?: number, newName?: string, extra?: Struct) => Promise<Zone>;
115
+ /**
116
+ * Delete a zone.
112
117
  *
113
- * // Remove the first waypoint
114
- * if (waypoints.length > 0) {
115
- * await navigation.removeWayPoint(waypoints[0].id);
116
- * }
117
- * ```
118
+ * @param zoneName - The name of the zone to delete.
119
+ */
120
+ deleteZone: (zoneName: string, extra?: Struct) => Promise<void>;
121
+ /**
122
+ * Plan an obstacle-aware path to a saved location and start driving it. Returns once the goal is
123
+ * accepted; track progress with getNavigationStatus.
118
124
  *
119
- * For more information, see [Navigation
120
- * API](https://docs.viam.com/dev/reference/apis/services/navigation/#removewaypoint).
125
+ * @param locationName - The name of the saved location to navigate to.
126
+ */
127
+ navigateToLocation: (locationName: string, extra?: Struct) => Promise<Status>;
128
+ /**
129
+ * Plan an obstacle-aware path to a Position and start driving it. Returns once the goal is
130
+ * accepted; track progress with getNavigationStatus.
121
131
  *
122
- * @param id - The MongoDB ObjectID of the waypoint to remove from the service's data storage.
132
+ * @param destination - The destination to navigate to.
123
133
  */
124
- removeWayPoint: (id: string, extra?: Struct) => Promise<void>;
134
+ navigateToPoint: (destination: Position, extra?: Struct) => Promise<Status>;
125
135
  /**
126
- * Get a list of obstacles.
136
+ * Drive a route one waypoint at a time using the obstacle-aware planner. Provide either routeName
137
+ * (a saved route) or waypoints (an inline list).
127
138
  *
128
139
  * @example
129
140
  *
130
141
  * ```ts
131
- * const navigation = new VIAM.NavigationClient(machine, 'my_navigation');
132
- *
133
- * const obstacles = await navigation.getObstacles();
142
+ * const status = await navigation.navigateRoute({ routeName: 'patrol', loop: true });
134
143
  * ```
135
144
  *
136
- * For more information, see [Navigation
137
- * API](https://docs.viam.com/dev/reference/apis/services/navigation/#getobstacles).
145
+ * @param options - The route, and how to drive it. See {@link NavigateRouteOptions}.
138
146
  */
139
- getObstacles: (extra?: Struct) => Promise<GeoGeometry[]>;
147
+ navigateRoute: (options: NavigateRouteOptions, extra?: Struct) => Promise<Status>;
140
148
  /**
141
- * Gets the list of paths known to the navigation service.
149
+ * Compute a path from the robot (or a given start) to a Position without moving. Pass a feasible
150
+ * result to executePlan to drive it. Raises an error if no path exists.
142
151
  *
143
- * @example
144
- *
145
- * ```ts
146
- * const navigation = new VIAM.NavigationClient(machine, 'my_navigation');
152
+ * @param destination - The destination to plan to.
153
+ * @param start - Optional; the starting position. Defaults to getPosition.
154
+ */
155
+ planToPoint: (destination: Position, start?: Position, extra?: Struct) => Promise<Plan>;
156
+ /**
157
+ * Compute a path to a saved location without moving. Accepts the same optional start as
158
+ * planToPoint. Raises an error if no path exists.
147
159
  *
148
- * const paths = await navigation.getPaths();
149
- * ```
160
+ * @param locationName - The name of the saved location to plan to.
161
+ * @param start - Optional; the starting position. Defaults to getPosition.
162
+ */
163
+ planToLocation: (locationName: string, start?: Position, extra?: Struct) => Promise<Plan>;
164
+ /**
165
+ * Drive a Plan, typically from planToPoint or planToLocation. While navigating, the active path
166
+ * is available on getNavigationStatus. Rejected if the path is empty.
150
167
  *
151
- * For more information, see [Navigation
152
- * API](https://docs.viam.com/dev/reference/apis/services/navigation/#getpaths).
168
+ * @param plan - The plan to execute.
153
169
  */
154
- getPaths: (extra?: Struct) => Promise<Path[]>;
170
+ executePlan: (plan: Plan, extra?: Struct) => Promise<Status>;
155
171
  /**
156
- * Gets information on the properties of the current navigation service.
172
+ * Drive directly to a saved location with a closed-loop controller, without full path planning.
173
+ * Intended for short hops and docking.
157
174
  *
158
- * @example
175
+ * @param locationName - The name of the saved location to go to.
176
+ * @param wait - Optional; defaults to true. With false, returns immediately while navigating.
177
+ * @param linearMPerSec - Optional; the linear speed to drive at.
178
+ */
179
+ goToLocation: (locationName: string, wait?: boolean, linearMPerSec?: number, extra?: Struct) => Promise<Status>;
180
+ /**
181
+ * Drive directly to a Position with a closed-loop controller, without full path planning.
182
+ * Intended for short hops and docking.
159
183
  *
160
- * ```ts
161
- * const navigation = new VIAM.NavigationClient(machine, 'my_navigation');
184
+ * @param destination - The destination to go to.
185
+ * @param wait - Optional; defaults to true. With false, returns immediately while navigating.
186
+ * @param linearMPerSec - Optional; the linear speed to drive at.
187
+ */
188
+ goToPoint: (destination: Position, wait?: boolean, linearMPerSec?: number, extra?: Struct) => Promise<Status>;
189
+ /**
190
+ * Stop motion but remember the current goal, including the current waypoint and loop setting for
191
+ * routes. A suspended goal must be canceled before a new one starts.
162
192
  *
163
- * const properties = await navigation.getProperties();
164
- * ```
193
+ * @param reason - Optional; reported on the suspended goal.
194
+ */
195
+ suspend: (reason?: string, extra?: Struct) => Promise<Status>;
196
+ /**
197
+ * Resume the suspended goal the same way it was started: planned navigation, simple go-to, or a
198
+ * route from its current waypoint.
199
+ */
200
+ resume: (extra?: Struct) => Promise<Status>;
201
+ /** Stop all motion and discard both the active goal and any suspended goal. */
202
+ cancel: (extra?: Struct) => Promise<Status>;
203
+ /**
204
+ * Get the robot's current position on the active map. Use this for frequent position polling;
205
+ * getNavigationStatus reports the same position alongside the rest of the navigation state.
206
+ */
207
+ getPosition: (extra?: Struct) => Promise<Position>;
208
+ /** Get the full navigation state, including the robot's current position and the latest goal. */
209
+ getNavigationStatus: (extra?: Struct) => Promise<Status>;
210
+ /**
211
+ * Get the map type the service operates on and robot properties. These values do not change while
212
+ * the service is running.
213
+ */
214
+ getProperties: () => Promise<Properties>;
215
+ /**
216
+ * Get the local or global costmap as a downsampled grid, for display in UIs.
165
217
  *
166
- * For more information, see [Navigation
167
- * API](https://docs.viam.com/dev/reference/apis/services/navigation/#getproperties).
218
+ * @param layer - Optional; "auto", "local", or "global". Defaults to "auto".
219
+ * @param stride - Optional; the downsample factor. Defaults to 2.
168
220
  */
169
- getProperties: () => Promise<NavigationProperties>;
221
+ getCostmap: (layer?: string, stride?: number, extra?: Struct) => Promise<Costmap>;
170
222
  }
@@ -1,8 +1,39 @@
1
1
  import type { PlainMessage } from '@bufbuild/protobuf';
2
2
  import * as navigationApi from '../../gen/service/navigation/v1/navigation_pb';
3
- export type NavigationPosition = navigationApi.GetLocationResponse;
4
- export type NavigationProperties = navigationApi.GetPropertiesResponse;
5
- export type Mode = navigationApi.Mode;
6
- export type Path = PlainMessage<navigationApi.Path>;
3
+ export type Position = PlainMessage<navigationApi.Position>;
4
+ export type Location = PlainMessage<navigationApi.Location>;
7
5
  export type Waypoint = PlainMessage<navigationApi.Waypoint>;
8
- export declare const NavigationPosition: typeof navigationApi.GetLocationResponse, NavigationProperties: typeof navigationApi.GetPropertiesResponse, Mode: typeof navigationApi.Mode, Path: typeof navigationApi.Path, Waypoint: typeof navigationApi.Waypoint;
6
+ export type Route = PlainMessage<navigationApi.Route>;
7
+ export type Zone = PlainMessage<navigationApi.Zone>;
8
+ export type Plan = PlainMessage<navigationApi.Plan>;
9
+ export type Velocity = PlainMessage<navigationApi.Velocity>;
10
+ export type NavError = PlainMessage<navigationApi.NavError>;
11
+ export type Progress = PlainMessage<navigationApi.Progress>;
12
+ export type RouteProgress = PlainMessage<navigationApi.RouteProgress>;
13
+ export type GoalStatus = PlainMessage<navigationApi.GoalStatus>;
14
+ export type Status = PlainMessage<navigationApi.Status>;
15
+ export type Properties = PlainMessage<navigationApi.Properties>;
16
+ export type Costmap = PlainMessage<navigationApi.GetCostmapResponse>;
17
+ export type MapType = navigationApi.MapType;
18
+ export type GoalState = navigationApi.GoalState;
19
+ export type NavMode = navigationApi.NavMode;
20
+ export type NavErrorCode = navigationApi.NavErrorCode;
21
+ export declare const MapType: typeof navigationApi.MapType, GoalState: typeof navigationApi.GoalState, NavMode: typeof navigationApi.NavMode, NavErrorCode: typeof navigationApi.NavErrorCode;
22
+ /**
23
+ * Options for {@link Navigation.navigateRoute}. Set either routeName (a saved route) or waypoints
24
+ * (an inline list).
25
+ */
26
+ export interface NavigateRouteOptions {
27
+ /** The name of a saved route. */
28
+ routeName?: string;
29
+ /** An inline list of waypoints. */
30
+ waypoints?: Waypoint[];
31
+ /** The index to start from. Defaults to 0. */
32
+ startIndex?: number;
33
+ /** Start from the nearest waypoint instead, overriding startIndex. */
34
+ startNearest?: boolean;
35
+ /** Loop the route. Defaults to false. */
36
+ loop?: boolean;
37
+ /** With loop, only return once stopped. Defaults to false. */
38
+ wait?: boolean;
39
+ }
@@ -1,3 +1,3 @@
1
1
  export { NavigationClient } from './navigation/client';
2
2
  export type { Navigation } from './navigation/navigation';
3
- export { NavigationPosition, NavigationProperties, Path, Waypoint, type Mode, } from './navigation/types';
3
+ export { type Costmap, GoalState, type GoalStatus, type Location, MapType, type NavError, NavErrorCode, NavMode, type NavigateRouteOptions, type Plan, type Position, type Progress, type Properties, type Route, type RouteProgress, type Status, type Velocity, type Waypoint, type Zone, } from './navigation/types';
@@ -19,7 +19,7 @@ export interface Slam extends Resource {
19
19
  * ```
20
20
  *
21
21
  * For more information, see [SLAM
22
- * API](https://docs.viam.com/dev/reference/apis/services/slam/#getposition).
22
+ * API](https://docs.viam.com/reference/apis/services/slam/#getposition).
23
23
  */
24
24
  getPosition: () => Promise<SlamPosition>;
25
25
  /**
@@ -38,7 +38,7 @@ export interface Slam extends Resource {
38
38
  * ```
39
39
  *
40
40
  * For more information, see [SLAM
41
- * API](https://docs.viam.com/dev/reference/apis/services/slam/#getpointcloudmap).
41
+ * API](https://docs.viam.com/reference/apis/services/slam/#getpointcloudmap).
42
42
  */
43
43
  getPointCloudMap: (returnEditedMap?: boolean) => Promise<Uint8Array>;
44
44
  /**
@@ -54,7 +54,7 @@ export interface Slam extends Resource {
54
54
  * ```
55
55
  *
56
56
  * For more information, see [SLAM
57
- * API](https://docs.viam.com/dev/reference/apis/services/slam/#getinternalstate).
57
+ * API](https://docs.viam.com/reference/apis/services/slam/#getinternalstate).
58
58
  */
59
59
  getInternalState: () => Promise<Uint8Array>;
60
60
  /**
@@ -71,7 +71,7 @@ export interface Slam extends Resource {
71
71
  * ```
72
72
  *
73
73
  * For more information, see [SLAM
74
- * API](https://docs.viam.com/dev/reference/apis/services/slam/#getproperties).
74
+ * API](https://docs.viam.com/reference/apis/services/slam/#getproperties).
75
75
  */
76
76
  getProperties: () => Promise<SlamProperties>;
77
77
  }
@@ -15,7 +15,7 @@ export interface Vision extends Resource {
15
15
  * ```
16
16
  *
17
17
  * For more information, see [Vision
18
- * API](https://docs.viam.com/dev/reference/apis/services/vision/#getdetectionsfromcamera).
18
+ * API](https://docs.viam.com/reference/apis/services/vision/#getdetectionsfromcamera).
19
19
  *
20
20
  * @param cameraName - The name of the camera to use for detection.
21
21
  * @returns - The list of Detections.
@@ -40,7 +40,7 @@ export interface Vision extends Resource {
40
40
  * ```
41
41
  *
42
42
  * For more information, see [Vision
43
- * API](https://docs.viam.com/dev/reference/apis/services/vision/#getdetections).
43
+ * API](https://docs.viam.com/reference/apis/services/vision/#getdetections).
44
44
  *
45
45
  * @param image - The image from which to get detections.
46
46
  * @param width - The width of the image.
@@ -60,7 +60,7 @@ export interface Vision extends Resource {
60
60
  * ```
61
61
  *
62
62
  * For more information, see [Vision
63
- * API](https://docs.viam.com/dev/reference/apis/services/vision/#getclassificationsfromcamera).
63
+ * API](https://docs.viam.com/reference/apis/services/vision/#getclassificationsfromcamera).
64
64
  *
65
65
  * @param cameraName - The name of the camera to use for classification.
66
66
  * @param count - The number of Classifications requested.
@@ -87,7 +87,7 @@ export interface Vision extends Resource {
87
87
  * ```
88
88
  *
89
89
  * For more information, see [Vision
90
- * API](https://docs.viam.com/dev/reference/apis/services/vision/#getclassifications).
90
+ * API](https://docs.viam.com/reference/apis/services/vision/#getclassifications).
91
91
  *
92
92
  * @param image - The image from which to get classifications.
93
93
  * @param width - The width of the image.
@@ -109,7 +109,7 @@ export interface Vision extends Resource {
109
109
  * ```
110
110
  *
111
111
  * For more information, see [Vision
112
- * API](https://docs.viam.com/dev/reference/apis/services/vision/#getobjectpointclouds).
112
+ * API](https://docs.viam.com/reference/apis/services/vision/#getobjectpointclouds).
113
113
  *
114
114
  * @param cameraName - The name of the camera.
115
115
  * @returns - The list of PointCloudObjects
@@ -129,7 +129,7 @@ export interface Vision extends Resource {
129
129
  * ```
130
130
  *
131
131
  * For more information, see [Vision
132
- * API](https://docs.viam.com/dev/reference/apis/services/vision/#getdetections3d).
132
+ * API](https://docs.viam.com/reference/apis/services/vision/#getdetections3d).
133
133
  *
134
134
  * @param cameraName - The name of the camera.
135
135
  * @returns - The list of Detection3Ds
@@ -147,7 +147,7 @@ export interface Vision extends Resource {
147
147
  * ```
148
148
  *
149
149
  * For more information, see [Vision
150
- * API](https://docs.viam.com/dev/reference/apis/services/vision/#getproperties).
150
+ * API](https://docs.viam.com/reference/apis/services/vision/#getproperties).
151
151
  *
152
152
  * @returns - The properties of the vision service
153
153
  */
@@ -170,7 +170,7 @@ export interface Vision extends Resource {
170
170
  * ```
171
171
  *
172
172
  * For more information, see [Vision
173
- * API](https://docs.viam.com/dev/reference/apis/services/vision/#captureallfromcamera).
173
+ * API](https://docs.viam.com/reference/apis/services/vision/#captureallfromcamera).
174
174
  *
175
175
  * @param cameraName - The name of the camera to use for classification, detection, and
176
176
  * segmentation.