@viamrobotics/sdk 0.0.45 → 0.0.47-alpha.1
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/base/Base.d.ts +3 -3
- package/dist/components/base/Client.d.ts +3 -3
- package/dist/components/movementsensor/Client.d.ts +8 -23
- package/dist/components/movementsensor/MovementSensor.d.ts +9 -20
- package/dist/components/movementsensor.d.ts +1 -1
- package/dist/gen/component/movementsensor/v1/movementsensor_pb.d.ts +6 -6
- package/dist/main.d.ts +2 -2
- package/dist/main.es.js +499 -496
- package/dist/main.umd.js +7 -7
- package/dist/services/motion/Client.d.ts +2 -2
- package/dist/services/motion/Motion.d.ts +2 -2
- package/dist/services/motion/types.d.ts +5 -2
- package/dist/services/motion.d.ts +1 -1
- package/dist/types.d.ts +8 -11
- package/dist/utils.d.ts +3 -5
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RobotClient } from '../../robot';
|
|
2
2
|
import type { Options, Pose, PoseInFrame, ResourceName, Transform, WorldState } from '../../types';
|
|
3
|
-
import { type
|
|
3
|
+
import { type Constraints } from './types';
|
|
4
4
|
import type { Motion } from './Motion';
|
|
5
5
|
/**
|
|
6
6
|
* A gRPC-web client for a Motion service.
|
|
@@ -13,7 +13,7 @@ export declare class MotionClient implements Motion {
|
|
|
13
13
|
private readonly options;
|
|
14
14
|
constructor(client: RobotClient, name: string, options?: Options);
|
|
15
15
|
private get service();
|
|
16
|
-
move(destination: PoseInFrame, componentName: ResourceName, worldState?: WorldState, constraints?:
|
|
16
|
+
move(destination: PoseInFrame, componentName: ResourceName, worldState?: WorldState, constraints?: Constraints, extra?: {}): Promise<boolean>;
|
|
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>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Extra, Pose, PoseInFrame, ResourceName, Transform, WorldState } from '../../types';
|
|
2
|
-
import type {
|
|
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.
|
|
@@ -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?:
|
|
21
|
+
move: (destination: PoseInFrame, componentName: ResourceName, worldState?: WorldState, constraints?: Constraints, extra?: Extra) => 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.
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import pb from '../../gen/service/motion/v1/motion_pb';
|
|
2
|
-
export type
|
|
2
|
+
export type Constraints = pb.Constraints.AsObject;
|
|
3
|
+
export type LinearConstraint = pb.LinearConstraint.AsObject;
|
|
4
|
+
export type OrientationConstraint = pb.OrientationConstraint.AsObject;
|
|
5
|
+
export type CollisionSpecification = pb.CollisionSpecification.AsObject;
|
|
3
6
|
/** Convert a Constraints object to a Protobuf Datatype. */
|
|
4
|
-
export declare const encodeConstraints: (obj:
|
|
7
|
+
export declare const encodeConstraints: (obj: Constraints) => pb.Constraints;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export type { Motion } from './motion/Motion';
|
|
2
|
-
export type {
|
|
2
|
+
export type { Constraints, LinearConstraint, OrientationConstraint, CollisionSpecification, } from './motion/types';
|
|
3
3
|
export { MotionClient } from './motion/Client';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
import common from './gen/common/v1/common_pb';
|
|
2
2
|
export type Extra = Map<string, any>;
|
|
3
|
-
export interface Vector3D {
|
|
4
|
-
x: number;
|
|
5
|
-
y: number;
|
|
6
|
-
z: number;
|
|
7
|
-
}
|
|
8
|
-
export interface Orientation {
|
|
9
|
-
ox: number;
|
|
10
|
-
oy: number;
|
|
11
|
-
oz: number;
|
|
12
|
-
theta: number;
|
|
13
|
-
}
|
|
14
3
|
export interface Options {
|
|
15
4
|
requestLogger?: (req: unknown) => void;
|
|
16
5
|
}
|
|
@@ -20,7 +9,15 @@ export declare enum PositionType {
|
|
|
20
9
|
POSITION_TYPE_ANGLE_DEGREES = 2
|
|
21
10
|
}
|
|
22
11
|
export type ResourceName = common.ResourceName.AsObject;
|
|
12
|
+
export type GeoPoint = common.GeoPoint.AsObject;
|
|
13
|
+
export type Vector3 = common.Vector3.AsObject;
|
|
14
|
+
export type Orientation = common.Orientation.AsObject;
|
|
23
15
|
export type Pose = common.Pose.AsObject;
|
|
24
16
|
export type PoseInFrame = common.PoseInFrame.AsObject;
|
|
25
17
|
export type Transform = common.Transform.AsObject;
|
|
26
18
|
export type WorldState = common.WorldState.AsObject;
|
|
19
|
+
export type GeometriesInFrame = common.GeometriesInFrame.AsObject;
|
|
20
|
+
export type Geometry = common.Geometry.AsObject;
|
|
21
|
+
export type Sphere = common.Sphere.AsObject;
|
|
22
|
+
export type RectangularPrism = common.RectangularPrism.AsObject;
|
|
23
|
+
export type Capsule = common.Capsule.AsObject;
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import type { ServiceError } from './gen/robot/v1/robot_pb_service';
|
|
2
1
|
import { grpc } from '@improbable-eng/grpc-web';
|
|
2
|
+
import type { ServiceError } from './gen/robot/v1/robot_pb_service';
|
|
3
3
|
import common from './gen/common/v1/common_pb';
|
|
4
|
-
import type {
|
|
4
|
+
import type { 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
8
|
/** Convert a 3D Vector POJO to a Protobuf Datatype */
|
|
9
|
-
export declare const
|
|
10
|
-
/** Convert a 3D Vector Protobuf Datatype to a POJO */
|
|
11
|
-
export declare const decodeVector3D: (proto: common.Vector3) => Vector3D;
|
|
9
|
+
export declare const encodeVector3: (value: Vector3) => common.Vector3;
|
|
12
10
|
/** Convert a Pose object to a Protobuf Datatype. */
|
|
13
11
|
export declare const encodePose: (obj: common.Pose.AsObject) => common.Pose;
|
|
14
12
|
/** Convert a PoseInFrame object to a Protobuf Datatype. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viamrobotics/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.47-alpha.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/main.umd.js",
|
|
6
6
|
"module": "./dist/main.es.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"homepage": "https://github.com/viamrobotics/viam-typescript-sdk#readme",
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@viamrobotics/rpc": "^0.1.
|
|
47
|
+
"@viamrobotics/rpc": "^0.1.35"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@bufbuild/buf": "^1.15.0-1",
|