@viamrobotics/sdk 0.0.9 → 0.0.10
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/Client.d.ts +0 -3
- package/dist/components/base/Base.d.ts +6 -5
- package/dist/components/motor/Motor.d.ts +9 -8
- package/dist/extra/stream/Client.d.ts +9 -0
- package/dist/extra/stream/Stream.d.ts +4 -0
- package/dist/gen/component/motor/v1/motor_pb.d.ts +0 -4
- package/dist/gen/component/motor/v1/motor_pb.esm.d.ts +0 -4
- package/dist/main.d.ts +2 -1
- package/dist/main.es.js +63542 -63548
- package/dist/main.umd.js +23 -23
- package/package.json +2 -1
package/dist/Client.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ import { RobotServiceClient } from './gen/robot/v1/robot_pb_service.esm';
|
|
|
14
14
|
import { SLAMServiceClient } from './gen/service/slam/v1/slam_pb_service.esm';
|
|
15
15
|
import { SensorsServiceClient } from './gen/service/sensors/v1/sensors_pb_service.esm';
|
|
16
16
|
import { ServoServiceClient } from './gen/component/servo/v1/servo_pb_service.esm';
|
|
17
|
-
import { StreamServiceClient } from './gen/proto/stream/v1/stream_pb_service.esm';
|
|
18
17
|
import { VisionServiceClient } from './gen/service/vision/v1/vision_pb_service.esm';
|
|
19
18
|
import type { grpc } from '@improbable-eng/grpc-web';
|
|
20
19
|
interface WebRTCOptions {
|
|
@@ -42,7 +41,6 @@ export default class Client {
|
|
|
42
41
|
private connectResolve;
|
|
43
42
|
private savedAuthEntity;
|
|
44
43
|
private savedCreds;
|
|
45
|
-
private streamServiceClient;
|
|
46
44
|
private robotServiceClient;
|
|
47
45
|
private armServiceClient;
|
|
48
46
|
private baseServiceClient;
|
|
@@ -62,7 +60,6 @@ export default class Client {
|
|
|
62
60
|
constructor(serviceHost: string, webrtcOptions?: WebRTCOptions, sessionOptions?: SessionOptions);
|
|
63
61
|
get sessionId(): string;
|
|
64
62
|
private static readonly notConnectedYetStr;
|
|
65
|
-
get streamService(): StreamServiceClient;
|
|
66
63
|
get robotService(): RobotServiceClient;
|
|
67
64
|
get armService(): ArmServiceClient;
|
|
68
65
|
get baseService(): BaseServiceClient;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { baseApi, commonApi } from '../../main';
|
|
2
|
+
import type { Extra } from '../../types';
|
|
2
3
|
export interface Base {
|
|
3
|
-
moveStraight(distanceMm: number, mmPerSec: number, extra?:
|
|
4
|
-
spin(angleDeg: number, degsPerSec: number, extra?:
|
|
5
|
-
setPower(linear: commonApi.Vector3, angular: commonApi.Vector3, extra?:
|
|
6
|
-
setVelocity(linear: commonApi.Vector3, angular: commonApi.Vector3, extra?:
|
|
7
|
-
stop(extra?:
|
|
4
|
+
moveStraight(distanceMm: number, mmPerSec: number, extra?: Extra): Promise<baseApi.MoveStraightResponse>;
|
|
5
|
+
spin(angleDeg: number, degsPerSec: number, extra?: Extra): Promise<baseApi.SpinResponse>;
|
|
6
|
+
setPower(linear: commonApi.Vector3, angular: commonApi.Vector3, extra?: Extra): Promise<baseApi.SetPowerResponse>;
|
|
7
|
+
setVelocity(linear: commonApi.Vector3, angular: commonApi.Vector3, extra?: Extra): Promise<baseApi.SetVelocityResponse>;
|
|
8
|
+
stop(extra?: Extra): Promise<baseApi.StopResponse>;
|
|
8
9
|
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import type { Extra } from '../../types';
|
|
1
2
|
import type { motorApi } from '../../main';
|
|
2
3
|
export interface Properties {
|
|
3
4
|
positionReporting: boolean;
|
|
4
5
|
}
|
|
5
6
|
export interface Motor {
|
|
6
|
-
setPower(power: number, extra?:
|
|
7
|
-
goFor(rpm: number, revolutions: number, extra?:
|
|
8
|
-
goTo(rpm: number, positionRevolutions: number, extra?:
|
|
9
|
-
resetZeroPosition(offset: number, extra?:
|
|
10
|
-
motorStop(extra?:
|
|
11
|
-
getProperties(extra?:
|
|
12
|
-
getPosition(extra?:
|
|
13
|
-
isPowered(extra?:
|
|
7
|
+
setPower(power: number, extra?: Extra): Promise<motorApi.SetPowerResponse>;
|
|
8
|
+
goFor(rpm: number, revolutions: number, extra?: Extra): Promise<motorApi.GoForResponse>;
|
|
9
|
+
goTo(rpm: number, positionRevolutions: number, extra?: Extra): Promise<motorApi.GoToResponse>;
|
|
10
|
+
resetZeroPosition(offset: number, extra?: Extra): Promise<motorApi.ResetZeroPositionResponse>;
|
|
11
|
+
motorStop(extra?: Extra): Promise<motorApi.StopResponse>;
|
|
12
|
+
getProperties(extra?: Extra): Promise<Properties>;
|
|
13
|
+
getPosition(extra?: Extra): Promise<number>;
|
|
14
|
+
isPowered(extra?: Extra): Promise<readonly [boolean, number]>;
|
|
14
15
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type Client from '../../Client';
|
|
2
|
+
import type { Stream } from './Stream';
|
|
3
|
+
export declare class StreamClient implements Stream {
|
|
4
|
+
private client;
|
|
5
|
+
constructor(client: Client);
|
|
6
|
+
private get streamService();
|
|
7
|
+
add(name: string): Promise<void>;
|
|
8
|
+
remove(name: string): Promise<void>;
|
|
9
|
+
}
|
|
@@ -386,9 +386,6 @@ export class Status extends jspb.Message {
|
|
|
386
386
|
getIsPowered(): boolean;
|
|
387
387
|
setIsPowered(value: boolean): void;
|
|
388
388
|
|
|
389
|
-
getPositionReporting(): boolean;
|
|
390
|
-
setPositionReporting(value: boolean): void;
|
|
391
|
-
|
|
392
389
|
getPosition(): number;
|
|
393
390
|
setPosition(value: number): void;
|
|
394
391
|
|
|
@@ -408,7 +405,6 @@ export class Status extends jspb.Message {
|
|
|
408
405
|
export namespace Status {
|
|
409
406
|
export type AsObject = {
|
|
410
407
|
isPowered: boolean,
|
|
411
|
-
positionReporting: boolean,
|
|
412
408
|
position: number,
|
|
413
409
|
isMoving: boolean,
|
|
414
410
|
}
|
|
@@ -386,9 +386,6 @@ export class Status extends jspb.Message {
|
|
|
386
386
|
getIsPowered(): boolean;
|
|
387
387
|
setIsPowered(value: boolean): void;
|
|
388
388
|
|
|
389
|
-
getPositionReporting(): boolean;
|
|
390
|
-
setPositionReporting(value: boolean): void;
|
|
391
|
-
|
|
392
389
|
getPosition(): number;
|
|
393
390
|
setPosition(value: number): void;
|
|
394
391
|
|
|
@@ -408,7 +405,6 @@ export class Status extends jspb.Message {
|
|
|
408
405
|
export namespace Status {
|
|
409
406
|
export type AsObject = {
|
|
410
407
|
isPowered: boolean,
|
|
411
|
-
positionReporting: boolean,
|
|
412
408
|
position: number,
|
|
413
409
|
isMoving: boolean,
|
|
414
410
|
}
|
package/dist/main.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { BaseClient } from './components/base/Client';
|
|
|
5
5
|
import { CameraClient } from './components/camera/Client';
|
|
6
6
|
import Client from './Client';
|
|
7
7
|
import { MotorClient } from './components/motor/Client';
|
|
8
|
+
import { StreamClient } from './extra/stream/Client';
|
|
8
9
|
import armApi from './gen/component/arm/v1/arm_pb.esm';
|
|
9
10
|
import baseApi from './gen/component/base/v1/base_pb.esm';
|
|
10
11
|
import boardApi from './gen/component/board/v1/board_pb.esm';
|
|
@@ -24,5 +25,5 @@ import servoApi from './gen/component/servo/v1/servo_pb.esm';
|
|
|
24
25
|
import slamApi from './gen/service/slam/v1/slam_pb.esm';
|
|
25
26
|
import streamApi from './gen/proto/stream/v1/stream_pb.esm';
|
|
26
27
|
import visionApi from './gen/service/vision/v1/vision_pb.esm';
|
|
27
|
-
export { commonApi, armApi, baseApi, boardApi, cameraApi, gantryApi, genericApi, gripperApi, inputControllerApi, motorApi, motionApi, movementSensorApi, servoApi, robotApi, navigationApi, sensorsApi, slamApi, visionApi, streamApi, Camera, Motor, Base, BaseClient, CameraClient, Client, MotorClient };
|
|
28
|
+
export { commonApi, armApi, baseApi, boardApi, cameraApi, gantryApi, genericApi, gripperApi, inputControllerApi, motorApi, motionApi, movementSensorApi, servoApi, robotApi, navigationApi, sensorsApi, slamApi, visionApi, streamApi, Camera, Motor, Base, BaseClient, CameraClient, Client, MotorClient, StreamClient };
|
|
28
29
|
export type { ResponseStream, ServiceError } from './gen/robot/v1/robot_pb_service.esm';
|