@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,4 +1,4 @@
|
|
|
1
|
-
import type { Extra,
|
|
1
|
+
import type { Extra, Vector3 } from '../../types';
|
|
2
2
|
/** Represents a physical base of a robot. */
|
|
3
3
|
export interface Base {
|
|
4
4
|
/**
|
|
@@ -24,14 +24,14 @@ export interface Base {
|
|
|
24
24
|
* @param linear - Desired linear power percentage from -1 to 1.
|
|
25
25
|
* @param angular - Desired angular power percentage from -1 to 1.
|
|
26
26
|
*/
|
|
27
|
-
setPower(linear:
|
|
27
|
+
setPower(linear: Vector3, angular: Vector3, extra?: Extra): Promise<void>;
|
|
28
28
|
/**
|
|
29
29
|
* Set the linear and angular velocity of a base.
|
|
30
30
|
*
|
|
31
31
|
* @param linear - Desired linear velocity in millimeters per second.
|
|
32
32
|
* @param angular - Desired angular velocity in degrees per second.
|
|
33
33
|
*/
|
|
34
|
-
setVelocity(linear:
|
|
34
|
+
setVelocity(linear: Vector3, angular: Vector3, extra?: Extra): Promise<void>;
|
|
35
35
|
/** Stop a base */
|
|
36
36
|
stop(extra?: Extra): Promise<void>;
|
|
37
37
|
/** Return true if the base is in motion. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RobotClient } from '../../robot';
|
|
2
2
|
import type { Base } from './Base';
|
|
3
|
-
import type { Options,
|
|
3
|
+
import type { Options, Vector3 } from '../../types';
|
|
4
4
|
/**
|
|
5
5
|
* A gRPC-web client for the Base component.
|
|
6
6
|
*
|
|
@@ -14,8 +14,8 @@ export declare class BaseClient implements Base {
|
|
|
14
14
|
private get baseService();
|
|
15
15
|
moveStraight(distanceMm: number, mmPerSec: number, extra?: {}): Promise<void>;
|
|
16
16
|
spin(angleDeg: number, degsPerSec: number, extra?: {}): Promise<void>;
|
|
17
|
-
setPower(linear:
|
|
18
|
-
setVelocity(linear:
|
|
17
|
+
setPower(linear: Vector3, angular: Vector3, extra?: {}): Promise<void>;
|
|
18
|
+
setVelocity(linear: Vector3, angular: Vector3, extra?: {}): Promise<void>;
|
|
19
19
|
stop(extra?: {}): Promise<void>;
|
|
20
20
|
isMoving(): Promise<boolean>;
|
|
21
21
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { RobotClient } from '../../robot';
|
|
2
|
-
import type { MovementSensor } from './MovementSensor';
|
|
3
2
|
import type { Options } from '../../types';
|
|
3
|
+
import pb from '../../gen/component/movementsensor/v1/movementsensor_pb';
|
|
4
|
+
import type { MovementSensor } from './MovementSensor';
|
|
4
5
|
/**
|
|
5
6
|
* A gRPC-web client for the MovementSensor component.
|
|
6
7
|
*
|
|
@@ -13,29 +14,13 @@ export declare class MovementSensorClient implements MovementSensor {
|
|
|
13
14
|
private readonly options;
|
|
14
15
|
constructor(client: RobotClient, name: string, options?: Options);
|
|
15
16
|
private get movementsensorService();
|
|
16
|
-
getLinearVelocity(extra?: {}): Promise<import("../../
|
|
17
|
-
getAngularVelocity(extra?: {}): Promise<import("../../
|
|
17
|
+
getLinearVelocity(extra?: {}): Promise<import("../../gen/common/v1/common_pb").Vector3.AsObject>;
|
|
18
|
+
getAngularVelocity(extra?: {}): Promise<import("../../gen/common/v1/common_pb").Vector3.AsObject>;
|
|
18
19
|
getCompassHeading(extra?: {}): Promise<number>;
|
|
19
|
-
getOrientation(extra?: {}): Promise<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
oz: number;
|
|
23
|
-
theta: number;
|
|
24
|
-
}>;
|
|
25
|
-
getPosition(extra?: {}): Promise<{
|
|
26
|
-
latitude: number;
|
|
27
|
-
longitude: number;
|
|
28
|
-
altitudeMM: number;
|
|
29
|
-
}>;
|
|
30
|
-
getProperties(extra?: {}): Promise<{
|
|
31
|
-
linearVelocitySupported: boolean;
|
|
32
|
-
angularVelocitySupported: boolean;
|
|
33
|
-
orientationSupported: boolean;
|
|
34
|
-
positionSupported: boolean;
|
|
35
|
-
compassHeadingSupported: boolean;
|
|
36
|
-
linearAccelerationSupported: boolean;
|
|
37
|
-
}>;
|
|
20
|
+
getOrientation(extra?: {}): Promise<import("../../gen/common/v1/common_pb").Orientation.AsObject>;
|
|
21
|
+
getPosition(extra?: {}): Promise<pb.GetPositionResponse.AsObject>;
|
|
22
|
+
getProperties(extra?: {}): Promise<pb.GetPropertiesResponse.AsObject>;
|
|
38
23
|
getAccuracy(extra?: {}): Promise<Record<string, number>>;
|
|
39
|
-
getLinearAcceleration(extra?: {}): Promise<import("../../
|
|
24
|
+
getLinearAcceleration(extra?: {}): Promise<import("../../gen/common/v1/common_pb").Vector3.AsObject>;
|
|
40
25
|
getReadings(extra?: {}): Promise<Record<string, unknown>>;
|
|
41
26
|
}
|
|
@@ -1,28 +1,17 @@
|
|
|
1
|
-
import type { Extra, Orientation,
|
|
1
|
+
import type { Extra, Orientation, Vector3 } from '../../types';
|
|
2
2
|
import type { Sensor } from '../sensor';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
altitudeMM: number;
|
|
7
|
-
}
|
|
8
|
-
/** The readings supported by this movement sensor */
|
|
9
|
-
export interface Properties {
|
|
10
|
-
linearVelocitySupported: boolean;
|
|
11
|
-
angularVelocitySupported: boolean;
|
|
12
|
-
orientationSupported: boolean;
|
|
13
|
-
positionSupported: boolean;
|
|
14
|
-
compassHeadingSupported: boolean;
|
|
15
|
-
linearAccelerationSupported: boolean;
|
|
16
|
-
}
|
|
3
|
+
import pb from '../../gen/component/movementsensor/v1/movementsensor_pb';
|
|
4
|
+
export type MovementSensorPosition = pb.GetPositionResponse.AsObject;
|
|
5
|
+
export type MovementSensorProperties = pb.GetPropertiesResponse.AsObject;
|
|
17
6
|
/**
|
|
18
7
|
* Represents any sensor that reports information about the robot's direction,
|
|
19
8
|
* position, and/or speed.
|
|
20
9
|
*/
|
|
21
10
|
export interface MovementSensor extends Sensor {
|
|
22
11
|
/** Get linear velocity in mm/s across x/y/z axes */
|
|
23
|
-
getLinearVelocity(extra?: Extra): Promise<
|
|
12
|
+
getLinearVelocity(extra?: Extra): Promise<Vector3>;
|
|
24
13
|
/** Get the angular velocity in degrees/s across x/y/z axes */
|
|
25
|
-
getAngularVelocity(extra?: Extra): Promise<
|
|
14
|
+
getAngularVelocity(extra?: Extra): Promise<Vector3>;
|
|
26
15
|
/**
|
|
27
16
|
* Get the compass heading, which is a number from 0-359 where 0 is North, 90
|
|
28
17
|
* is East, 180 is South, and 270 is West
|
|
@@ -34,11 +23,11 @@ export interface MovementSensor extends Sensor {
|
|
|
34
23
|
*/
|
|
35
24
|
getOrientation(extra?: Extra): Promise<Orientation>;
|
|
36
25
|
/** Get the current position latitude, longitude, and altitude (in mm) */
|
|
37
|
-
getPosition(extra?: Extra): Promise<
|
|
26
|
+
getPosition(extra?: Extra): Promise<MovementSensorPosition>;
|
|
38
27
|
/** Get the properties of this movement sensor */
|
|
39
|
-
getProperties(extra?: Extra): Promise<
|
|
28
|
+
getProperties(extra?: Extra): Promise<MovementSensorProperties>;
|
|
40
29
|
/** Get the accuracy of various sensors in mm */
|
|
41
30
|
getAccuracy(extra?: Extra): Promise<Record<string, number>>;
|
|
42
31
|
/** Get linear acceleration in mm/s/s across x/y/z axes */
|
|
43
|
-
getLinearAcceleration(extra?: Extra): Promise<
|
|
32
|
+
getLinearAcceleration(extra?: Extra): Promise<Vector3>;
|
|
44
33
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { MovementSensor } from './movementsensor/MovementSensor';
|
|
1
|
+
export type { MovementSensorPosition, MovementSensorProperties, MovementSensor, } from './movementsensor/MovementSensor';
|
|
2
2
|
export { MovementSensorClient } from './movementsensor/Client';
|
|
@@ -228,8 +228,8 @@ export class GetPositionResponse extends jspb.Message {
|
|
|
228
228
|
getCoordinate(): common_v1_common_pb.GeoPoint | undefined;
|
|
229
229
|
setCoordinate(value?: common_v1_common_pb.GeoPoint): void;
|
|
230
230
|
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
getAltitudeM(): number;
|
|
232
|
+
setAltitudeM(value: number): void;
|
|
233
233
|
|
|
234
234
|
serializeBinary(): Uint8Array;
|
|
235
235
|
toObject(includeInstance?: boolean): GetPositionResponse.AsObject;
|
|
@@ -244,7 +244,7 @@ export class GetPositionResponse extends jspb.Message {
|
|
|
244
244
|
export namespace GetPositionResponse {
|
|
245
245
|
export type AsObject = {
|
|
246
246
|
coordinate?: common_v1_common_pb.GeoPoint.AsObject,
|
|
247
|
-
|
|
247
|
+
altitudeM: number,
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
250
|
|
|
@@ -341,8 +341,8 @@ export namespace GetAccuracyRequest {
|
|
|
341
341
|
}
|
|
342
342
|
|
|
343
343
|
export class GetAccuracyResponse extends jspb.Message {
|
|
344
|
-
|
|
345
|
-
|
|
344
|
+
getAccuracyMap(): jspb.Map<string, number>;
|
|
345
|
+
clearAccuracyMap(): void;
|
|
346
346
|
serializeBinary(): Uint8Array;
|
|
347
347
|
toObject(includeInstance?: boolean): GetAccuracyResponse.AsObject;
|
|
348
348
|
static toObject(includeInstance: boolean, msg: GetAccuracyResponse): GetAccuracyResponse.AsObject;
|
|
@@ -355,7 +355,7 @@ export class GetAccuracyResponse extends jspb.Message {
|
|
|
355
355
|
|
|
356
356
|
export namespace GetAccuracyResponse {
|
|
357
357
|
export type AsObject = {
|
|
358
|
-
|
|
358
|
+
accuracyMap: Array<[string, number]>,
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
|
package/dist/main.d.ts
CHANGED
|
@@ -91,7 +91,7 @@ export { type Motor, MotorClient } from './components/motor';
|
|
|
91
91
|
* @group Raw Protobufs
|
|
92
92
|
*/
|
|
93
93
|
export { default as movementSensorApi } from './gen/component/movementsensor/v1/movementsensor_pb';
|
|
94
|
-
export { type MovementSensor, MovementSensorClient, } from './components/movementsensor';
|
|
94
|
+
export { type MovementSensor, type MovementSensorProperties, type MovementSensorPosition, MovementSensorClient, } from './components/movementsensor';
|
|
95
95
|
/**
|
|
96
96
|
* Raw Protobuf interfaces generated with
|
|
97
97
|
* https://github.com/improbable-eng/grpc-web for a Sensor component.
|
|
@@ -247,7 +247,7 @@ export { default as inputControllerApi } from './gen/component/inputcontroller/v
|
|
|
247
247
|
* @group Raw Protobufs
|
|
248
248
|
*/
|
|
249
249
|
export { default as motionApi } from './gen/service/motion/v1/motion_pb';
|
|
250
|
-
export { type Motion, type
|
|
250
|
+
export { type Motion, type Constraints, type LinearConstraint, type OrientationConstraint, type CollisionSpecification, MotionClient, } from './services/motion';
|
|
251
251
|
export { type DataManager, DataManagerClient } from './services/data-manager';
|
|
252
252
|
/**
|
|
253
253
|
* Raw Protobuf interfaces for a Navigation service.
|