@viamrobotics/sdk 0.0.52 → 0.0.53
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/components/arm/arm.d.ts +7 -7
- package/dist/components/arm/client.d.ts +2 -1
- package/dist/components/base/base.d.ts +8 -8
- package/dist/components/base/client.d.ts +2 -1
- package/dist/components/board/board.d.ts +11 -11
- package/dist/components/board/client.d.ts +2 -1
- package/dist/components/camera/camera.d.ts +2 -1
- package/dist/components/camera/client.d.ts +2 -1
- package/dist/components/encoder/client.d.ts +2 -1
- package/dist/components/encoder/encoder.d.ts +5 -5
- package/dist/components/gripper/client.d.ts +2 -1
- package/dist/components/gripper/gripper.d.ts +5 -5
- package/dist/components/motor/client.d.ts +2 -1
- package/dist/components/motor/motor.d.ts +10 -10
- package/dist/components/movement-sensor/client.d.ts +2 -1
- package/dist/components/movement-sensor/movement-sensor.d.ts +9 -9
- package/dist/components/sensor/client.d.ts +2 -1
- package/dist/components/sensor/sensor.d.ts +3 -3
- package/dist/main.d.ts +1 -1
- package/dist/main.es.js +67 -3
- package/dist/main.umd.js +2 -2
- package/dist/robot/robot.d.ts +2 -2
- package/dist/services/data-manager/client.d.ts +2 -1
- package/dist/services/data-manager/data-manager.d.ts +3 -3
- package/dist/services/motion/client.d.ts +2 -1
- package/dist/services/motion/motion.d.ts +6 -6
- package/dist/types.d.ts +10 -1
- package/dist/utils.d.ts +6 -1
- package/package.json +1 -1
package/dist/robot/robot.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Duration } from 'google-protobuf/google/protobuf/duration_pb';
|
|
2
2
|
import type { PoseInFrame, ResourceName, Transform } from '../gen/common/v1/common_pb';
|
|
3
|
-
import type {
|
|
3
|
+
import type { StructType } from '../types';
|
|
4
4
|
import type proto from '../gen/robot/v1/robot_pb';
|
|
5
5
|
export interface Robot {
|
|
6
6
|
/**
|
|
@@ -36,7 +36,7 @@ export interface Robot {
|
|
|
36
36
|
* @group Operations
|
|
37
37
|
* @alpha
|
|
38
38
|
*/
|
|
39
|
-
stopAll(extra?: Map<string,
|
|
39
|
+
stopAll(extra?: Map<string, StructType>): Promise<void>;
|
|
40
40
|
/**
|
|
41
41
|
* Get the configuration of the frame system of a given robot.
|
|
42
42
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RobotClient } from '../../robot';
|
|
2
|
-
import type { Options } from '../../types';
|
|
2
|
+
import type { Options, StructType } from '../../types';
|
|
3
3
|
import type { DataManager } from './data-manager';
|
|
4
4
|
export declare class DataManagerClient implements DataManager {
|
|
5
5
|
private client;
|
|
@@ -8,4 +8,5 @@ export declare class DataManagerClient implements DataManager {
|
|
|
8
8
|
constructor(client: RobotClient, name: string, options?: Options);
|
|
9
9
|
private get datamanagerService();
|
|
10
10
|
sync(extra?: {}): Promise<void>;
|
|
11
|
+
doCommand(command: StructType): Promise<StructType>;
|
|
11
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface DataManager {
|
|
3
|
-
sync: (extra?:
|
|
1
|
+
import type { Resource, StructType } from '../../types';
|
|
2
|
+
export interface DataManager extends Resource {
|
|
3
|
+
sync: (extra?: StructType) => Promise<void>;
|
|
4
4
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RobotClient } from '../../robot';
|
|
2
|
-
import type { Options, Pose, PoseInFrame, ResourceName, Transform, WorldState } from '../../types';
|
|
2
|
+
import type { Options, Pose, PoseInFrame, ResourceName, StructType, Transform, WorldState } from '../../types';
|
|
3
3
|
import { type Constraints } from './types';
|
|
4
4
|
import type { Motion } from './motion';
|
|
5
5
|
/**
|
|
@@ -17,4 +17,5 @@ export declare class MotionClient implements Motion {
|
|
|
17
17
|
moveOnMap(destination: Pose, componentName: ResourceName, slamServiceName: ResourceName, extra?: {}): Promise<boolean>;
|
|
18
18
|
moveSingleComponent(destination: PoseInFrame, componentName: ResourceName, worldState?: WorldState, extra?: {}): Promise<boolean>;
|
|
19
19
|
getPose(componentName: ResourceName, destinationFrame: string, supplementalTransforms: Transform[], extra?: {}): Promise<import("../../gen/common/v1/common_pb").PoseInFrame.AsObject>;
|
|
20
|
+
doCommand(command: StructType): Promise<StructType>;
|
|
20
21
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Pose, PoseInFrame, Resource, ResourceName, StructType, Transform, WorldState } from '../../types';
|
|
2
2
|
import type { Constraints } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* A service that coordinates motion planning across all of the components in a
|
|
5
5
|
* given robot.
|
|
6
6
|
*/
|
|
7
|
-
export interface Motion {
|
|
7
|
+
export interface Motion extends Resource {
|
|
8
8
|
/**
|
|
9
9
|
* Move any component on the robot to a specified destination which can be
|
|
10
10
|
* from the reference frame of any other component on the robot.
|
|
@@ -18,7 +18,7 @@ export interface Motion {
|
|
|
18
18
|
* additional transforms to add to it for the duration of the Move.
|
|
19
19
|
* @param constraints - Constrain the way the robot will move.
|
|
20
20
|
*/
|
|
21
|
-
move: (destination: PoseInFrame, componentName: ResourceName, worldState?: WorldState, constraints?: Constraints, extra?:
|
|
21
|
+
move: (destination: PoseInFrame, componentName: ResourceName, worldState?: WorldState, constraints?: Constraints, extra?: StructType) => Promise<boolean>;
|
|
22
22
|
/**
|
|
23
23
|
* @param destination - Specify a destination to, which can be any pose with
|
|
24
24
|
* respect to the SLAM map's origin.
|
|
@@ -27,7 +27,7 @@ export interface Motion {
|
|
|
27
27
|
* @param slamServiceName - Name of the slam service from which the SLAM map
|
|
28
28
|
* is requested
|
|
29
29
|
*/
|
|
30
|
-
moveOnMap: (destination: Pose, componentName: ResourceName, slamServiceName: ResourceName, extra?:
|
|
30
|
+
moveOnMap: (destination: Pose, componentName: ResourceName, slamServiceName: ResourceName, extra?: StructType) => Promise<boolean>;
|
|
31
31
|
/**
|
|
32
32
|
* @param destination - Destination to move to, which can a pose in the
|
|
33
33
|
* reference frame of any frame in the robot's frame system.
|
|
@@ -37,7 +37,7 @@ export interface Motion {
|
|
|
37
37
|
* world state. Augment the frame system of the robot by specifying
|
|
38
38
|
* additional transforms to add to it for the duration of the Move.
|
|
39
39
|
*/
|
|
40
|
-
moveSingleComponent: (destination: PoseInFrame, componentName: ResourceName, worldState?: WorldState, extra?:
|
|
40
|
+
moveSingleComponent: (destination: PoseInFrame, componentName: ResourceName, worldState?: WorldState, extra?: StructType) => Promise<boolean>;
|
|
41
41
|
/**
|
|
42
42
|
* @param componentName - The component whose pose is being requested.
|
|
43
43
|
* @param destinationFrame - The reference frame in which the component's pose
|
|
@@ -46,5 +46,5 @@ export interface Motion {
|
|
|
46
46
|
* @param supplementalTransforms - Pose information on any additional
|
|
47
47
|
* reference frames that are needed to compute the component's pose.
|
|
48
48
|
*/
|
|
49
|
-
getPose: (componentName: ResourceName, destinationFrame: string, supplementalTransforms: Transform[], extra?:
|
|
49
|
+
getPose: (componentName: ResourceName, destinationFrame: string, supplementalTransforms: Transform[], extra?: StructType) => Promise<PoseInFrame>;
|
|
50
50
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
|
+
import type { JavaScriptValue } from 'google-protobuf/google/protobuf/struct_pb';
|
|
1
2
|
import common from './gen/common/v1/common_pb';
|
|
2
|
-
export type
|
|
3
|
+
export type StructType = Record<string, JavaScriptValue>;
|
|
3
4
|
export interface Options {
|
|
4
5
|
requestLogger?: (req: unknown) => void;
|
|
5
6
|
}
|
|
7
|
+
export interface Resource {
|
|
8
|
+
/**
|
|
9
|
+
* Send/Receive arbitrary commands to the resource.
|
|
10
|
+
*
|
|
11
|
+
* @param command - The command to execute.
|
|
12
|
+
*/
|
|
13
|
+
doCommand: (command: StructType) => Promise<StructType>;
|
|
14
|
+
}
|
|
6
15
|
export type ResourceName = common.ResourceName.AsObject;
|
|
7
16
|
export type GeoPoint = common.GeoPoint.AsObject;
|
|
8
17
|
export type Vector3 = common.Vector3.AsObject;
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { grpc } from '@improbable-eng/grpc-web';
|
|
2
2
|
import type { ServiceError } from './gen/robot/v1/robot_pb_service';
|
|
3
3
|
import common from './gen/common/v1/common_pb';
|
|
4
|
-
import type { Vector3 } from './types';
|
|
4
|
+
import type { Options, StructType, Vector3 } from './types';
|
|
5
5
|
type Callback<T> = (error: ServiceError | null, response: T | null) => void;
|
|
6
6
|
type ServiceFunc<Req, Resp> = (request: Req, metadata: grpc.Metadata, callback: Callback<Resp>) => void;
|
|
7
7
|
export declare const promisify: <Req, Resp>(func: ServiceFunc<Req, Resp>, request: Req) => Promise<Resp>;
|
|
8
|
+
interface DoCommandClient {
|
|
9
|
+
doCommand: ServiceFunc<common.DoCommandRequest, common.DoCommandResponse>;
|
|
10
|
+
}
|
|
11
|
+
/** Send/Receive an arbitrary command using a resource client */
|
|
12
|
+
export declare const doCommandFromClient: (client: DoCommandClient, name: string, command: StructType, options?: Options) => Promise<StructType>;
|
|
8
13
|
/** Convert a 3D Vector POJO to a Protobuf Datatype */
|
|
9
14
|
export declare const encodeVector3: (value: Vector3) => common.Vector3;
|
|
10
15
|
/** Convert a Pose object to a Protobuf Datatype. */
|