@viamrobotics/sdk 0.8.2 → 0.9.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gen/app/build/v1/build_pb.d.ts +221 -0
- package/dist/gen/app/build/v1/build_pb_service.d.ts +93 -0
- package/dist/gen/app/cloudslam/v1/cloud_slam_pb.d.ts +0 -50
- package/dist/gen/app/cloudslam/v1/cloud_slam_pb_service.d.ts +0 -19
- package/dist/gen/app/mltraining/v1/ml_training_pb.d.ts +0 -7
- package/dist/gen/app/v1/app_pb.d.ts +355 -0
- package/dist/gen/app/v1/app_pb_service.d.ts +57 -0
- package/dist/gen/component/camera/v1/camera_pb.d.ts +6 -0
- package/dist/gen/google/api/client_pb.d.ts +6 -0
- package/dist/gen/google/bytestream/bytestream_pb.d.ts +0 -2
- package/dist/gen/service/motion/v1/motion_pb.d.ts +72 -84
- package/dist/gen/service/motion/v1/motion_pb_service.d.ts +16 -16
- package/dist/main.d.ts +3 -2
- package/dist/main.es.js +265 -264
- package/dist/main.umd.js +2 -2
- package/dist/services/motion/client.d.ts +5 -1
- package/dist/services/motion/motion.d.ts +47 -4
- package/dist/services/motion/types.d.ts +6 -0
- package/dist/services/motion.d.ts +1 -1
- package/dist/services/navigation/client.d.ts +1 -0
- package/dist/services/navigation/navigation.d.ts +3 -1
- package/dist/services/navigation/types.d.ts +1 -0
- package/dist/services/navigation.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import pb from '../../gen/service/motion/v1/motion_pb';
|
|
1
2
|
import type { RobotClient } from '../../robot';
|
|
2
3
|
import type { GeoObstacle, GeoPoint, Options, Pose, PoseInFrame, ResourceName, StructType, Transform, WorldState } from '../../types';
|
|
3
4
|
import { type Constraints, type MotionConfiguration } from './types';
|
|
@@ -15,7 +16,10 @@ export declare class MotionClient implements Motion {
|
|
|
15
16
|
private get service();
|
|
16
17
|
move(destination: PoseInFrame, componentName: ResourceName, worldState?: WorldState, constraints?: Constraints, extra?: {}): Promise<boolean>;
|
|
17
18
|
moveOnMap(destination: Pose, componentName: ResourceName, slamServiceName: ResourceName, extra?: {}): Promise<boolean>;
|
|
18
|
-
moveOnGlobe(destination: GeoPoint, componentName: ResourceName, movementSensorName: ResourceName, heading?: number, obstaclesList?: GeoObstacle[], motionConfig?: MotionConfiguration, extra?: {}): Promise<
|
|
19
|
+
moveOnGlobe(destination: GeoPoint, componentName: ResourceName, movementSensorName: ResourceName, heading?: number, obstaclesList?: GeoObstacle[], motionConfig?: MotionConfiguration, extra?: {}): Promise<string>;
|
|
20
|
+
stopPlan(componentName: ResourceName, extra?: {}): Promise<null>;
|
|
21
|
+
getPlan(componentName: ResourceName, lastPlanOnly?: boolean, executionId?: string, extra?: {}): Promise<pb.GetPlanResponse.AsObject>;
|
|
22
|
+
listPlanStatuses(onlyActivePlans?: boolean, extra?: {}): Promise<pb.ListPlanStatusesResponse.AsObject>;
|
|
19
23
|
getPose(componentName: ResourceName, destinationFrame: string, supplementalTransforms: Transform[], extra?: {}): Promise<import("../../gen/common/v1/common_pb").PoseInFrame.AsObject>;
|
|
20
24
|
doCommand(command: StructType): Promise<StructType>;
|
|
21
25
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GeoObstacle, GeoPoint, Pose, PoseInFrame, Resource, ResourceName, StructType, Transform, WorldState } from '../../types';
|
|
2
|
-
import type { Constraints, MotionConfiguration } from './types';
|
|
2
|
+
import type { Constraints, MotionConfiguration, GetPlanResponse, ListPlanStatusesResponse } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* A service that coordinates motion planning across all of the components in a
|
|
5
5
|
* given robot.
|
|
@@ -31,8 +31,13 @@ export interface Motion extends Resource {
|
|
|
31
31
|
*/
|
|
32
32
|
moveOnMap: (destination: Pose, componentName: ResourceName, slamServiceName: ResourceName, extra?: StructType) => Promise<boolean>;
|
|
33
33
|
/**
|
|
34
|
-
* Move a component to a specific latitude and longitude, using a
|
|
35
|
-
*
|
|
34
|
+
* Move a component to a specific latitude and longitude, using a
|
|
35
|
+
* `MovementSensor` to check the location. `moveOnGlobe()` is non blocking,
|
|
36
|
+
* meaning the motion service will move the component to the destination GPS
|
|
37
|
+
* point after `moveOnGlobe()` returns. Each successful `moveOnGlobe()` call
|
|
38
|
+
* retuns a unique ExectionID which you can use to identify all plans
|
|
39
|
+
* generated durring the `moveOnGlobe()` call. You can monitor the progress of
|
|
40
|
+
* the `moveOnGlobe()` call by querying `getPlan()` and `listPlanStatuses()`.
|
|
36
41
|
*
|
|
37
42
|
* @param destination - Destination for the component to move to, represented
|
|
38
43
|
* as a `GeoPoint`.
|
|
@@ -44,7 +49,45 @@ export interface Motion extends Resource {
|
|
|
44
49
|
* @param heading - Compass heading, in degrees, to achieve at destination.
|
|
45
50
|
* @param motionConfiguration - Optional motion configuration options.
|
|
46
51
|
*/
|
|
47
|
-
moveOnGlobe: (destination: GeoPoint, componentName: ResourceName, movementSensorName: ResourceName, heading?: number, obstaclesList?: GeoObstacle[], motionConfiguration?: MotionConfiguration, extra?: StructType) => Promise<
|
|
52
|
+
moveOnGlobe: (destination: GeoPoint, componentName: ResourceName, movementSensorName: ResourceName, heading?: number, obstaclesList?: GeoObstacle[], motionConfiguration?: MotionConfiguration, extra?: StructType) => Promise<string>;
|
|
53
|
+
/**
|
|
54
|
+
* Stop a component being moved by an in progress `moveOnGlobe()` call.
|
|
55
|
+
*
|
|
56
|
+
* @param componentName - The component to stop
|
|
57
|
+
*/
|
|
58
|
+
stopPlan: (componentName: ResourceName, extra?: StructType) => Promise<null>;
|
|
59
|
+
/**
|
|
60
|
+
* By default: returns the plan history of the most recent
|
|
61
|
+
* `move_on_globe_new()` call to move a component. The plan history for
|
|
62
|
+
* executions before the most recent can be requested by providing an
|
|
63
|
+
* ExecutionID in the request. Returns a result if both of the following
|
|
64
|
+
* conditions are met:
|
|
65
|
+
*
|
|
66
|
+
* - The execution (call to `move_on_globe_new()`) is still executing **or**
|
|
67
|
+
* changed state within the last 24 hours
|
|
68
|
+
* - The robot has not reinitialized Plans never change. Replans always create
|
|
69
|
+
* new plans. Replans share the ExecutionID of the previously executing
|
|
70
|
+
* plan. All repeated fields are in time ascending order.
|
|
71
|
+
*
|
|
72
|
+
* @param componentName - The component to query
|
|
73
|
+
* @param destinationFrame - The reference frame in which the component's
|
|
74
|
+
* `Pose` should be provided, if unset this defaults to the "world"
|
|
75
|
+
* reference frame.
|
|
76
|
+
* @param supplementalTransforms - `Pose` information on any additional
|
|
77
|
+
* reference frames that are needed to compute the component's `Pose`.
|
|
78
|
+
*/
|
|
79
|
+
getPlan: (componentName: ResourceName, lastPlanOnly?: boolean, executionId?: string, extra?: StructType) => Promise<GetPlanResponse>;
|
|
80
|
+
/**
|
|
81
|
+
* Get the current location and orientation of a component.
|
|
82
|
+
*
|
|
83
|
+
* @param componentName - The component whose `Pose` is being requested.
|
|
84
|
+
* @param destinationFrame - The reference frame in which the component's
|
|
85
|
+
* `Pose` should be provided, if unset this defaults to the "world"
|
|
86
|
+
* reference frame.
|
|
87
|
+
* @param supplementalTransforms - `Pose` information on any additional
|
|
88
|
+
* reference frames that are needed to compute the component's `Pose`.
|
|
89
|
+
*/
|
|
90
|
+
listPlanStatuses: (onlyActivePlans?: boolean, extra?: StructType) => Promise<ListPlanStatusesResponse>;
|
|
48
91
|
/**
|
|
49
92
|
* Get the current location and orientation of a component.
|
|
50
93
|
*
|
|
@@ -5,6 +5,12 @@ export type LinearConstraint = pb.LinearConstraint.AsObject;
|
|
|
5
5
|
export type OrientationConstraint = pb.OrientationConstraint.AsObject;
|
|
6
6
|
export type CollisionSpecification = pb.CollisionSpecification.AsObject;
|
|
7
7
|
export type MotionConfiguration = pb.MotionConfiguration.AsObject;
|
|
8
|
+
export type GetPlanResponse = pb.GetPlanResponse.AsObject;
|
|
9
|
+
export type ListPlanStatusesResponse = pb.ListPlanStatusesResponse.AsObject;
|
|
10
|
+
type ValueOf<T> = T[keyof T];
|
|
11
|
+
export declare const PlanState: pb.PlanStateMap;
|
|
12
|
+
export type PlanState = ValueOf<typeof pb.PlanState>;
|
|
8
13
|
/** Convert a Constraints object to a Protobuf Datatype. */
|
|
9
14
|
export declare const encodeConstraints: (obj: Constraints) => pb.Constraints;
|
|
10
15
|
export declare const encodeMotionConfiguration: (obj: MotionConfiguration) => pb.MotionConfiguration;
|
|
16
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export type { Motion } from './motion/motion';
|
|
2
|
-
export type { Constraints, LinearConstraint, ObstacleDetector, OrientationConstraint, CollisionSpecification, MotionConfiguration, } from './motion/types';
|
|
2
|
+
export type { Constraints, LinearConstraint, ObstacleDetector, OrientationConstraint, CollisionSpecification, MotionConfiguration, GetPlanResponse, ListPlanStatusesResponse, PlanState, } from './motion/types';
|
|
3
3
|
export { MotionClient } from './motion/client';
|
|
@@ -21,5 +21,6 @@ export declare class NavigationClient implements Navigation {
|
|
|
21
21
|
addWayPoint(location: GeoPoint, extra?: {}): Promise<void>;
|
|
22
22
|
removeWayPoint(id: string, extra?: {}): Promise<void>;
|
|
23
23
|
getObstacles(extra?: {}): Promise<import("../../gen/common/v1/common_pb").GeoObstacle.AsObject[]>;
|
|
24
|
+
getPaths(extra?: {}): Promise<pb.Path.AsObject[]>;
|
|
24
25
|
doCommand(command: StructType): Promise<StructType>;
|
|
25
26
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GeoObstacle, GeoPoint, Resource, StructType } from '../../types';
|
|
2
|
-
import type { ModeMap, Waypoint, NavigationPosition } from './types';
|
|
2
|
+
import type { ModeMap, Waypoint, NavigationPosition, Path } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* A service that uses GPS to automatically navigate a robot to user defined
|
|
5
5
|
* endpoints.
|
|
@@ -33,4 +33,6 @@ export interface Navigation extends Resource {
|
|
|
33
33
|
removeWayPoint: (id: string, extra?: StructType) => Promise<void>;
|
|
34
34
|
/** Get a list of obstacles. */
|
|
35
35
|
getObstacles: (extra?: StructType) => Promise<GeoObstacle[]>;
|
|
36
|
+
/** Gets the list of paths known to the navigation service. */
|
|
37
|
+
getPaths: (extra?: StructType) => Promise<Path[]>;
|
|
36
38
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export type { Navigation } from './navigation/navigation';
|
|
2
|
-
export type { ModeMap, Waypoint, NavigationPosition } from './navigation/types';
|
|
2
|
+
export type { ModeMap, Waypoint, NavigationPosition, Path, } from './navigation/types';
|
|
3
3
|
export { NavigationClient } from './navigation/client';
|