@viamrobotics/sdk 0.1.0-pre.0 → 0.1.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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RobotClient } from '../../robot';
|
|
2
2
|
import type { Options, StructType } from '../../types';
|
|
3
3
|
import pb from '../../gen/component/movementsensor/v1/movementsensor_pb';
|
|
4
|
-
import type { MovementSensor } from './movement-sensor';
|
|
4
|
+
import type { MovementSensor, MovementSensorReadings } from './movement-sensor';
|
|
5
5
|
/**
|
|
6
6
|
* A gRPC-web client for the MovementSensor component.
|
|
7
7
|
*
|
|
@@ -9,7 +9,6 @@ import type { MovementSensor } from './movement-sensor';
|
|
|
9
9
|
*/
|
|
10
10
|
export declare class MovementSensorClient implements MovementSensor {
|
|
11
11
|
private client;
|
|
12
|
-
private sensorclient;
|
|
13
12
|
private readonly name;
|
|
14
13
|
private readonly options;
|
|
15
14
|
constructor(client: RobotClient, name: string, options?: Options);
|
|
@@ -22,6 +21,6 @@ export declare class MovementSensorClient implements MovementSensor {
|
|
|
22
21
|
getProperties(extra?: {}): Promise<pb.GetPropertiesResponse.AsObject>;
|
|
23
22
|
getAccuracy(extra?: {}): Promise<Record<string, number>>;
|
|
24
23
|
getLinearAcceleration(extra?: {}): Promise<import("../../gen/common/v1/common_pb").Vector3.AsObject>;
|
|
25
|
-
getReadings(extra?: {}): Promise<
|
|
24
|
+
getReadings(extra?: {}): Promise<MovementSensorReadings>;
|
|
26
25
|
doCommand(command: StructType): Promise<StructType>;
|
|
27
26
|
}
|
|
@@ -3,6 +3,14 @@ import type { Sensor } from '../sensor';
|
|
|
3
3
|
import pb from '../../gen/component/movementsensor/v1/movementsensor_pb';
|
|
4
4
|
export type MovementSensorPosition = pb.GetPositionResponse.AsObject;
|
|
5
5
|
export type MovementSensorProperties = pb.GetPropertiesResponse.AsObject;
|
|
6
|
+
export type MovementSensorReadings = {
|
|
7
|
+
position?: MovementSensorPosition;
|
|
8
|
+
linearVelocity?: Vector3;
|
|
9
|
+
angularVelocity?: Vector3;
|
|
10
|
+
linearAcceleration?: Vector3;
|
|
11
|
+
compassHeading?: number;
|
|
12
|
+
orientation?: Orientation;
|
|
13
|
+
};
|
|
6
14
|
/**
|
|
7
15
|
* Represents any sensor that reports information about the robot's direction,
|
|
8
16
|
* position, and/or speed.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { MovementSensorPosition, MovementSensorProperties, MovementSensor, } from './movement-sensor/movement-sensor';
|
|
1
|
+
export type { MovementSensorPosition, MovementSensorProperties, MovementSensorReadings, MovementSensor, } from './movement-sensor/movement-sensor';
|
|
2
2
|
export { MovementSensorClient } from './movement-sensor/client';
|
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, type MovementSensorProperties, type MovementSensorPosition, MovementSensorClient, } from './components/movementsensor';
|
|
94
|
+
export { type MovementSensor, type MovementSensorProperties, type MovementSensorPosition, type MovementSensorReadings, 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.
|
package/dist/main.es.js
CHANGED
|
@@ -8271,9 +8271,9 @@ var struct_pb = {};
|
|
|
8271
8271
|
};
|
|
8272
8272
|
})(struct_pb);
|
|
8273
8273
|
(function(t) {
|
|
8274
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
8275
|
-
return this
|
|
8276
|
-
}.call(null), u = descriptor_pb;
|
|
8274
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
8275
|
+
return this;
|
|
8276
|
+
}.call(null) || Function("return this")(), u = descriptor_pb;
|
|
8277
8277
|
s.object.extend(proto, u);
|
|
8278
8278
|
var g = struct_pb;
|
|
8279
8279
|
s.object.extend(proto, g), s.exportSymbol("proto.viam.common.v1.ActuatorStatus", null, i), s.exportSymbol("proto.viam.common.v1.AnalogStatus", null, i), s.exportSymbol("proto.viam.common.v1.BoardStatus", null, i), s.exportSymbol("proto.viam.common.v1.Capsule", null, i), s.exportSymbol("proto.viam.common.v1.DigitalInterruptStatus", null, i), s.exportSymbol("proto.viam.common.v1.DoCommandRequest", null, i), s.exportSymbol("proto.viam.common.v1.DoCommandResponse", null, i), s.exportSymbol("proto.viam.common.v1.GeoObstacle", null, i), s.exportSymbol("proto.viam.common.v1.GeoPoint", null, i), s.exportSymbol("proto.viam.common.v1.GeometriesInFrame", null, i), s.exportSymbol("proto.viam.common.v1.Geometry", null, i), s.exportSymbol("proto.viam.common.v1.Geometry.GeometryTypeCase", null, i), s.exportSymbol("proto.viam.common.v1.Orientation", null, i), s.exportSymbol("proto.viam.common.v1.PointCloudObject", null, i), s.exportSymbol("proto.viam.common.v1.Pose", null, i), s.exportSymbol("proto.viam.common.v1.PoseInFrame", null, i), s.exportSymbol("proto.viam.common.v1.RectangularPrism", null, i), s.exportSymbol("proto.viam.common.v1.ResourceName", null, i), s.exportSymbol("proto.viam.common.v1.Sphere", null, i), s.exportSymbol("proto.viam.common.v1.Transform", null, i), s.exportSymbol("proto.viam.common.v1.Vector3", null, i), s.exportSymbol("proto.viam.common.v1.WorldState", null, i), s.exportSymbol("proto.viam.common.v1.safetyHeartbeatMonitored", null, i), proto.viam.common.v1.ResourceName = function(p) {
|
|
@@ -9835,9 +9835,9 @@ var struct_pb = {};
|
|
|
9835
9835
|
})(common_pb);
|
|
9836
9836
|
var annotations_pb = {}, http_pb = {};
|
|
9837
9837
|
(function(t) {
|
|
9838
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
9839
|
-
return this
|
|
9840
|
-
}.call(null);
|
|
9838
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
9839
|
+
return this;
|
|
9840
|
+
}.call(null) || Function("return this")();
|
|
9841
9841
|
s.exportSymbol("proto.google.api.CustomHttpPattern", null, i), s.exportSymbol("proto.google.api.Http", null, i), s.exportSymbol("proto.google.api.HttpRule", null, i), s.exportSymbol("proto.google.api.HttpRule.PatternCase", null, i), proto.google.api.Http = function(u) {
|
|
9842
9842
|
e.Message.initialize(this, u, 0, -1, proto.google.api.Http.repeatedFields_, null);
|
|
9843
9843
|
}, s.inherits(proto.google.api.Http, e.Message), s.DEBUG && !COMPILED && (proto.google.api.Http.displayName = "proto.google.api.Http"), proto.google.api.HttpRule = function(u) {
|
|
@@ -10226,9 +10226,9 @@ var annotations_pb = {}, http_pb = {};
|
|
|
10226
10226
|
}, s.object.extend(t, proto.google.api);
|
|
10227
10227
|
})(http_pb);
|
|
10228
10228
|
(function(t) {
|
|
10229
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
10230
|
-
return this
|
|
10231
|
-
}.call(null), u = http_pb;
|
|
10229
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
10230
|
+
return this;
|
|
10231
|
+
}.call(null) || Function("return this")(), u = http_pb;
|
|
10232
10232
|
s.object.extend(proto, u);
|
|
10233
10233
|
var g = descriptor_pb;
|
|
10234
10234
|
s.object.extend(proto, g), s.exportSymbol("proto.google.api.http", null, i), proto.google.api.http = new e.ExtensionFieldInfo(
|
|
@@ -10396,9 +10396,9 @@ var timestamp_pb = {};
|
|
|
10396
10396
|
};
|
|
10397
10397
|
})(timestamp_pb);
|
|
10398
10398
|
(function(t) {
|
|
10399
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
10400
|
-
return this
|
|
10401
|
-
}.call(null), u = common_pb;
|
|
10399
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
10400
|
+
return this;
|
|
10401
|
+
}.call(null) || Function("return this")(), u = common_pb;
|
|
10402
10402
|
s.object.extend(proto, u);
|
|
10403
10403
|
var g = annotations_pb;
|
|
10404
10404
|
s.object.extend(proto, g);
|
|
@@ -23071,9 +23071,9 @@ const promisify = (t, e) => new Promise((s, i) => {
|
|
|
23071
23071
|
};
|
|
23072
23072
|
var arm_pb = {};
|
|
23073
23073
|
(function(t) {
|
|
23074
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
23075
|
-
return this
|
|
23076
|
-
}.call(null), u = common_pb;
|
|
23074
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
23075
|
+
return this;
|
|
23076
|
+
}.call(null) || Function("return this")(), u = common_pb;
|
|
23077
23077
|
s.object.extend(proto, u);
|
|
23078
23078
|
var g = annotations_pb;
|
|
23079
23079
|
s.object.extend(proto, g);
|
|
@@ -24062,9 +24062,9 @@ ArmServiceClient.prototype.doCommand = function t(e, s, i) {
|
|
|
24062
24062
|
};
|
|
24063
24063
|
var ArmServiceClient_1 = ArmServiceClient, base_pb = {};
|
|
24064
24064
|
(function(t) {
|
|
24065
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
24066
|
-
return this
|
|
24067
|
-
}.call(null), u = common_pb;
|
|
24065
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
24066
|
+
return this;
|
|
24067
|
+
}.call(null) || Function("return this")(), u = common_pb;
|
|
24068
24068
|
s.object.extend(proto, u);
|
|
24069
24069
|
var g = annotations_pb;
|
|
24070
24070
|
s.object.extend(proto, g);
|
|
@@ -24985,9 +24985,9 @@ BaseServiceClient.prototype.doCommand = function t(e, s, i) {
|
|
|
24985
24985
|
};
|
|
24986
24986
|
var BaseServiceClient_1 = BaseServiceClient, board_pb = {};
|
|
24987
24987
|
(function(t) {
|
|
24988
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
24989
|
-
return this
|
|
24990
|
-
}.call(null), u = common_pb;
|
|
24988
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
24989
|
+
return this;
|
|
24990
|
+
}.call(null) || Function("return this")(), u = common_pb;
|
|
24991
24991
|
s.object.extend(proto, u);
|
|
24992
24992
|
var g = annotations_pb;
|
|
24993
24993
|
s.object.extend(proto, g);
|
|
@@ -26605,9 +26605,9 @@ BoardServiceClient.prototype.setPowerMode = function t(e, s, i) {
|
|
|
26605
26605
|
};
|
|
26606
26606
|
var BoardServiceClient_1 = BoardServiceClient, encoder_pb = {};
|
|
26607
26607
|
(function(t) {
|
|
26608
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
26609
|
-
return this
|
|
26610
|
-
}.call(null), u = common_pb;
|
|
26608
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
26609
|
+
return this;
|
|
26610
|
+
}.call(null) || Function("return this")(), u = common_pb;
|
|
26611
26611
|
s.object.extend(proto, u);
|
|
26612
26612
|
var g = annotations_pb;
|
|
26613
26613
|
s.object.extend(proto, g);
|
|
@@ -27120,9 +27120,9 @@ EncoderServiceClient.prototype.doCommand = function t(e, s, i) {
|
|
|
27120
27120
|
};
|
|
27121
27121
|
var EncoderServiceClient_1 = EncoderServiceClient, gantry_pb = {};
|
|
27122
27122
|
(function(t) {
|
|
27123
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
27124
|
-
return this
|
|
27125
|
-
}.call(null), u = common_pb;
|
|
27123
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
27124
|
+
return this;
|
|
27125
|
+
}.call(null) || Function("return this")(), u = common_pb;
|
|
27126
27126
|
s.object.extend(proto, u);
|
|
27127
27127
|
var g = annotations_pb;
|
|
27128
27128
|
s.object.extend(proto, g);
|
|
@@ -27930,9 +27930,9 @@ GantryServiceClient.prototype.doCommand = function t(e, s, i) {
|
|
|
27930
27930
|
}
|
|
27931
27931
|
};
|
|
27932
27932
|
};
|
|
27933
|
-
var GantryServiceClient_1 = GantryServiceClient, generic_pb = {}, jspb = googleProtobuf, goog = jspb, global$1 = function() {
|
|
27934
|
-
return this
|
|
27935
|
-
}.call(null), common_v1_common_pb$e = common_pb;
|
|
27933
|
+
var GantryServiceClient_1 = GantryServiceClient, generic_pb = {}, jspb = googleProtobuf, goog = jspb, global$1 = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof global$1 < "u" && global$1 || typeof self < "u" && self || function() {
|
|
27934
|
+
return this;
|
|
27935
|
+
}.call(null) || Function("return this")(), common_v1_common_pb$e = common_pb;
|
|
27936
27936
|
goog.object.extend(proto, common_v1_common_pb$e);
|
|
27937
27937
|
var google_api_annotations_pb = annotations_pb;
|
|
27938
27938
|
goog.object.extend(proto, google_api_annotations_pb);
|
|
@@ -27977,9 +27977,9 @@ GenericServiceClient.prototype.doCommand = function t(e, s, i) {
|
|
|
27977
27977
|
};
|
|
27978
27978
|
var GenericServiceClient_1 = GenericServiceClient, gripper_pb = {};
|
|
27979
27979
|
(function(t) {
|
|
27980
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
27981
|
-
return this
|
|
27982
|
-
}.call(null), u = common_pb;
|
|
27980
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
27981
|
+
return this;
|
|
27982
|
+
}.call(null) || Function("return this")(), u = common_pb;
|
|
27983
27983
|
s.object.extend(proto, u);
|
|
27984
27984
|
var g = annotations_pb;
|
|
27985
27985
|
s.object.extend(proto, g);
|
|
@@ -28549,9 +28549,9 @@ GripperServiceClient.prototype.doCommand = function t(e, s, i) {
|
|
|
28549
28549
|
};
|
|
28550
28550
|
var GripperServiceClient_1 = GripperServiceClient, input_controller_pb = {};
|
|
28551
28551
|
(function(t) {
|
|
28552
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
28553
|
-
return this
|
|
28554
|
-
}.call(null), u = common_pb;
|
|
28552
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
28553
|
+
return this;
|
|
28554
|
+
}.call(null) || Function("return this")(), u = common_pb;
|
|
28555
28555
|
s.object.extend(proto, u);
|
|
28556
28556
|
var g = annotations_pb;
|
|
28557
28557
|
s.object.extend(proto, g);
|
|
@@ -29451,9 +29451,9 @@ InputControllerServiceClient.prototype.doCommand = function t(e, s, i) {
|
|
|
29451
29451
|
};
|
|
29452
29452
|
var InputControllerServiceClient_1 = InputControllerServiceClient, motion_pb = {};
|
|
29453
29453
|
(function(t) {
|
|
29454
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
29455
|
-
return this
|
|
29456
|
-
}.call(null), u = common_pb;
|
|
29454
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
29455
|
+
return this;
|
|
29456
|
+
}.call(null) || Function("return this")(), u = common_pb;
|
|
29457
29457
|
s.object.extend(proto, u);
|
|
29458
29458
|
var g = annotations_pb;
|
|
29459
29459
|
s.object.extend(proto, g);
|
|
@@ -30959,9 +30959,9 @@ MotionServiceClient.prototype.doCommand = function t(e, s, i) {
|
|
|
30959
30959
|
};
|
|
30960
30960
|
var MotionServiceClient_1 = MotionServiceClient, motor_pb = {};
|
|
30961
30961
|
(function(t) {
|
|
30962
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
30963
|
-
return this
|
|
30964
|
-
}.call(null), u = common_pb;
|
|
30962
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
30963
|
+
return this;
|
|
30964
|
+
}.call(null) || Function("return this")(), u = common_pb;
|
|
30965
30965
|
s.object.extend(proto, u);
|
|
30966
30966
|
var g = annotations_pb;
|
|
30967
30967
|
s.object.extend(proto, g);
|
|
@@ -32360,9 +32360,9 @@ MotorServiceClient.prototype.doCommand = function t(e, s, i) {
|
|
|
32360
32360
|
};
|
|
32361
32361
|
var MotorServiceClient_1 = MotorServiceClient, movementsensor_pb = {};
|
|
32362
32362
|
(function(t) {
|
|
32363
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
32364
|
-
return this
|
|
32365
|
-
}.call(null), u = common_pb;
|
|
32363
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
32364
|
+
return this;
|
|
32365
|
+
}.call(null) || Function("return this")(), u = common_pb;
|
|
32366
32366
|
s.object.extend(proto, u);
|
|
32367
32367
|
var g = annotations_pb;
|
|
32368
32368
|
s.object.extend(proto, g);
|
|
@@ -33657,9 +33657,9 @@ MovementSensorServiceClient.prototype.doCommand = function t(e, s, i) {
|
|
|
33657
33657
|
};
|
|
33658
33658
|
var MovementSensorServiceClient_1 = MovementSensorServiceClient, navigation_pb = {};
|
|
33659
33659
|
(function(t) {
|
|
33660
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
33661
|
-
return this
|
|
33662
|
-
}.call(null), u = common_pb;
|
|
33660
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
33661
|
+
return this;
|
|
33662
|
+
}.call(null) || Function("return this")(), u = common_pb;
|
|
33663
33663
|
s.object.extend(proto, u);
|
|
33664
33664
|
var g = annotations_pb;
|
|
33665
33665
|
s.object.extend(proto, g);
|
|
@@ -35106,9 +35106,9 @@ RobotServiceClient.prototype.sendSessionHeartbeat = function t(e, s, i) {
|
|
|
35106
35106
|
};
|
|
35107
35107
|
var RobotServiceClient_1 = RobotServiceClient, slam_pb = {};
|
|
35108
35108
|
(function(t) {
|
|
35109
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
35110
|
-
return this
|
|
35111
|
-
}.call(null), u = common_pb;
|
|
35109
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
35110
|
+
return this;
|
|
35111
|
+
}.call(null) || Function("return this")(), u = common_pb;
|
|
35112
35112
|
s.object.extend(proto, u);
|
|
35113
35113
|
var g = annotations_pb;
|
|
35114
35114
|
s.object.extend(proto, g);
|
|
@@ -35607,9 +35607,9 @@ SLAMServiceClient.prototype.doCommand = function t(e, s, i) {
|
|
|
35607
35607
|
};
|
|
35608
35608
|
var SLAMServiceClient_1 = SLAMServiceClient, sensors_pb = {};
|
|
35609
35609
|
(function(t) {
|
|
35610
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
35611
|
-
return this
|
|
35612
|
-
}.call(null), u = common_pb;
|
|
35610
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
35611
|
+
return this;
|
|
35612
|
+
}.call(null) || Function("return this")(), u = common_pb;
|
|
35613
35613
|
s.object.extend(proto, u);
|
|
35614
35614
|
var g = annotations_pb;
|
|
35615
35615
|
s.object.extend(proto, g);
|
|
@@ -36041,9 +36041,9 @@ SensorsServiceClient.prototype.doCommand = function t(e, s, i) {
|
|
|
36041
36041
|
};
|
|
36042
36042
|
var SensorsServiceClient_1 = SensorsServiceClient, servo_pb = {};
|
|
36043
36043
|
(function(t) {
|
|
36044
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
36045
|
-
return this
|
|
36046
|
-
}.call(null), u = common_pb;
|
|
36044
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
36045
|
+
return this;
|
|
36046
|
+
}.call(null) || Function("return this")(), u = common_pb;
|
|
36047
36047
|
s.object.extend(proto, u);
|
|
36048
36048
|
var g = annotations_pb;
|
|
36049
36049
|
s.object.extend(proto, g);
|
|
@@ -36674,9 +36674,9 @@ ServoServiceClient.prototype.doCommand = function t(e, s, i) {
|
|
|
36674
36674
|
};
|
|
36675
36675
|
var ServoServiceClient_1 = ServoServiceClient, vision_pb = {};
|
|
36676
36676
|
(function(t) {
|
|
36677
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
36678
|
-
return this
|
|
36679
|
-
}.call(null), u = common_pb;
|
|
36677
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
36678
|
+
return this;
|
|
36679
|
+
}.call(null) || Function("return this")(), u = common_pb;
|
|
36680
36680
|
s.object.extend(proto, u);
|
|
36681
36681
|
var g = annotations_pb;
|
|
36682
36682
|
s.object.extend(proto, g);
|
|
@@ -38779,9 +38779,9 @@ var camera_pb = {}, httpbody_pb = {}, any_pb = {};
|
|
|
38779
38779
|
};
|
|
38780
38780
|
})(any_pb);
|
|
38781
38781
|
(function(t) {
|
|
38782
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
38783
|
-
return this
|
|
38784
|
-
}.call(null), u = any_pb;
|
|
38782
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
38783
|
+
return this;
|
|
38784
|
+
}.call(null) || Function("return this")(), u = any_pb;
|
|
38785
38785
|
s.object.extend(proto, u), s.exportSymbol("proto.google.api.HttpBody", null, i), proto.google.api.HttpBody = function(g) {
|
|
38786
38786
|
e.Message.initialize(this, g, 0, -1, proto.google.api.HttpBody.repeatedFields_, null);
|
|
38787
38787
|
}, s.inherits(proto.google.api.HttpBody, e.Message), s.DEBUG && !COMPILED && (proto.google.api.HttpBody.displayName = "proto.google.api.HttpBody"), proto.google.api.HttpBody.repeatedFields_ = [3], e.Message.GENERATE_TO_OBJECT && (proto.google.api.HttpBody.prototype.toObject = function(g) {
|
|
@@ -38886,9 +38886,9 @@ var camera_pb = {}, httpbody_pb = {}, any_pb = {};
|
|
|
38886
38886
|
}, s.object.extend(t, proto.google.api);
|
|
38887
38887
|
})(httpbody_pb);
|
|
38888
38888
|
(function(t) {
|
|
38889
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
38890
|
-
return this
|
|
38891
|
-
}.call(null), u = common_pb;
|
|
38889
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
38890
|
+
return this;
|
|
38891
|
+
}.call(null) || Function("return this")(), u = common_pb;
|
|
38892
38892
|
s.object.extend(proto, u);
|
|
38893
38893
|
var g = annotations_pb;
|
|
38894
38894
|
s.object.extend(proto, g);
|
|
@@ -40129,11 +40129,119 @@ class MotorClient {
|
|
|
40129
40129
|
return doCommandFromClient(s, this.name, e, this.options);
|
|
40130
40130
|
}
|
|
40131
40131
|
}
|
|
40132
|
+
class MovementSensorClient {
|
|
40133
|
+
client;
|
|
40134
|
+
name;
|
|
40135
|
+
options;
|
|
40136
|
+
constructor(e, s, i = {}) {
|
|
40137
|
+
this.client = e.createServiceClient(MovementSensorServiceClient_1), this.name = s, this.options = i;
|
|
40138
|
+
}
|
|
40139
|
+
get movementsensorService() {
|
|
40140
|
+
return this.client;
|
|
40141
|
+
}
|
|
40142
|
+
async getLinearVelocity(e = {}) {
|
|
40143
|
+
const { movementsensorService: s } = this, i = new movementsensor_pb.GetLinearVelocityRequest();
|
|
40144
|
+
i.setName(this.name), i.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(i);
|
|
40145
|
+
const g = (await promisify(
|
|
40146
|
+
s.getLinearVelocity.bind(s),
|
|
40147
|
+
i
|
|
40148
|
+
)).getLinearVelocity();
|
|
40149
|
+
if (!g)
|
|
40150
|
+
throw new Error("no linear velocity");
|
|
40151
|
+
return g.toObject();
|
|
40152
|
+
}
|
|
40153
|
+
async getAngularVelocity(e = {}) {
|
|
40154
|
+
const { movementsensorService: s } = this, i = new movementsensor_pb.GetAngularVelocityRequest();
|
|
40155
|
+
i.setName(this.name), i.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(i);
|
|
40156
|
+
const g = (await promisify(
|
|
40157
|
+
s.getAngularVelocity.bind(s),
|
|
40158
|
+
i
|
|
40159
|
+
)).getAngularVelocity();
|
|
40160
|
+
if (!g)
|
|
40161
|
+
throw new Error("no angular velocity");
|
|
40162
|
+
return g.toObject();
|
|
40163
|
+
}
|
|
40164
|
+
async getCompassHeading(e = {}) {
|
|
40165
|
+
const { movementsensorService: s } = this, i = new movementsensor_pb.GetCompassHeadingRequest();
|
|
40166
|
+
return i.setName(this.name), i.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(i), (await promisify(
|
|
40167
|
+
s.getCompassHeading.bind(s),
|
|
40168
|
+
i
|
|
40169
|
+
)).getValue();
|
|
40170
|
+
}
|
|
40171
|
+
async getOrientation(e = {}) {
|
|
40172
|
+
const { movementsensorService: s } = this, i = new movementsensor_pb.GetOrientationRequest();
|
|
40173
|
+
i.setName(this.name), i.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(i);
|
|
40174
|
+
const g = (await promisify(
|
|
40175
|
+
s.getOrientation.bind(s),
|
|
40176
|
+
i
|
|
40177
|
+
)).getOrientation();
|
|
40178
|
+
if (!g)
|
|
40179
|
+
throw new Error("no orientation");
|
|
40180
|
+
return g.toObject();
|
|
40181
|
+
}
|
|
40182
|
+
async getPosition(e = {}) {
|
|
40183
|
+
const { movementsensorService: s } = this, i = new movementsensor_pb.GetPositionRequest();
|
|
40184
|
+
return i.setName(this.name), i.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(i), (await promisify(s.getPosition.bind(s), i)).toObject();
|
|
40185
|
+
}
|
|
40186
|
+
async getProperties(e = {}) {
|
|
40187
|
+
const { movementsensorService: s } = this, i = new movementsensor_pb.GetPropertiesRequest();
|
|
40188
|
+
return i.setName(this.name), i.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(i), (await promisify(s.getProperties.bind(s), i)).toObject();
|
|
40189
|
+
}
|
|
40190
|
+
async getAccuracy(e = {}) {
|
|
40191
|
+
const { movementsensorService: s } = this, i = new movementsensor_pb.GetAccuracyRequest();
|
|
40192
|
+
i.setName(this.name), i.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(i);
|
|
40193
|
+
const g = (await promisify(s.getAccuracy.bind(s), i)).getAccuracyMap(), p = {};
|
|
40194
|
+
for (const [o, r] of g.entries())
|
|
40195
|
+
p[o] = r;
|
|
40196
|
+
return p;
|
|
40197
|
+
}
|
|
40198
|
+
async getLinearAcceleration(e = {}) {
|
|
40199
|
+
const { movementsensorService: s } = this, i = new movementsensor_pb.GetLinearAccelerationRequest();
|
|
40200
|
+
i.setName(this.name), i.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(i);
|
|
40201
|
+
const g = (await promisify(
|
|
40202
|
+
s.getLinearAcceleration.bind(s),
|
|
40203
|
+
i
|
|
40204
|
+
)).getLinearAcceleration();
|
|
40205
|
+
if (!g)
|
|
40206
|
+
throw new Error("no linear acceleration");
|
|
40207
|
+
return g.toObject();
|
|
40208
|
+
}
|
|
40209
|
+
async getReadings(e = {}) {
|
|
40210
|
+
const s = {
|
|
40211
|
+
position: this.getPosition.bind(this),
|
|
40212
|
+
linearVelocity: this.getLinearVelocity.bind(this),
|
|
40213
|
+
angularVelocity: this.getAngularVelocity.bind(this),
|
|
40214
|
+
linearAcceleration: this.getLinearAcceleration.bind(this),
|
|
40215
|
+
compassHeading: this.getCompassHeading.bind(this),
|
|
40216
|
+
orientation: this.getOrientation.bind(this)
|
|
40217
|
+
}, i = Object.entries(s).flatMap(
|
|
40218
|
+
([g, p]) => (async () => {
|
|
40219
|
+
try {
|
|
40220
|
+
return [[g, await p(e)]];
|
|
40221
|
+
} catch (o) {
|
|
40222
|
+
if (!o.message.includes("Unimplemented"))
|
|
40223
|
+
throw o;
|
|
40224
|
+
return [];
|
|
40225
|
+
}
|
|
40226
|
+
})()
|
|
40227
|
+
), u = await Promise.all(i);
|
|
40228
|
+
return Object.fromEntries(u.flat());
|
|
40229
|
+
}
|
|
40230
|
+
async doCommand(e) {
|
|
40231
|
+
const { movementsensorService: s } = this;
|
|
40232
|
+
return doCommandFromClient(
|
|
40233
|
+
s,
|
|
40234
|
+
this.name,
|
|
40235
|
+
e,
|
|
40236
|
+
this.options
|
|
40237
|
+
);
|
|
40238
|
+
}
|
|
40239
|
+
}
|
|
40132
40240
|
var sensor_pb = {};
|
|
40133
40241
|
(function(t) {
|
|
40134
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
40135
|
-
return this
|
|
40136
|
-
}.call(null), u = common_pb;
|
|
40242
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
40243
|
+
return this;
|
|
40244
|
+
}.call(null) || Function("return this")(), u = common_pb;
|
|
40137
40245
|
s.object.extend(proto, u);
|
|
40138
40246
|
var g = annotations_pb;
|
|
40139
40247
|
s.object.extend(proto, g);
|
|
@@ -40345,102 +40453,11 @@ class SensorClient {
|
|
|
40345
40453
|
return doCommandFromClient(s, this.name, e, this.options);
|
|
40346
40454
|
}
|
|
40347
40455
|
}
|
|
40348
|
-
class MovementSensorClient {
|
|
40349
|
-
client;
|
|
40350
|
-
sensorclient;
|
|
40351
|
-
name;
|
|
40352
|
-
options;
|
|
40353
|
-
constructor(e, s, i = {}) {
|
|
40354
|
-
this.client = e.createServiceClient(MovementSensorServiceClient_1), this.sensorclient = new SensorClient(e, s, i), this.name = s, this.options = i;
|
|
40355
|
-
}
|
|
40356
|
-
get movementsensorService() {
|
|
40357
|
-
return this.client;
|
|
40358
|
-
}
|
|
40359
|
-
async getLinearVelocity(e = {}) {
|
|
40360
|
-
const { movementsensorService: s } = this, i = new movementsensor_pb.GetLinearVelocityRequest();
|
|
40361
|
-
i.setName(this.name), i.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(i);
|
|
40362
|
-
const g = (await promisify(
|
|
40363
|
-
s.getLinearVelocity.bind(s),
|
|
40364
|
-
i
|
|
40365
|
-
)).getLinearVelocity();
|
|
40366
|
-
if (!g)
|
|
40367
|
-
throw new Error("no linear velocity");
|
|
40368
|
-
return g.toObject();
|
|
40369
|
-
}
|
|
40370
|
-
async getAngularVelocity(e = {}) {
|
|
40371
|
-
const { movementsensorService: s } = this, i = new movementsensor_pb.GetAngularVelocityRequest();
|
|
40372
|
-
i.setName(this.name), i.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(i);
|
|
40373
|
-
const g = (await promisify(
|
|
40374
|
-
s.getAngularVelocity.bind(s),
|
|
40375
|
-
i
|
|
40376
|
-
)).getAngularVelocity();
|
|
40377
|
-
if (!g)
|
|
40378
|
-
throw new Error("no angular velocity");
|
|
40379
|
-
return g.toObject();
|
|
40380
|
-
}
|
|
40381
|
-
async getCompassHeading(e = {}) {
|
|
40382
|
-
const { movementsensorService: s } = this, i = new movementsensor_pb.GetCompassHeadingRequest();
|
|
40383
|
-
return i.setName(this.name), i.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(i), (await promisify(
|
|
40384
|
-
s.getCompassHeading.bind(s),
|
|
40385
|
-
i
|
|
40386
|
-
)).getValue();
|
|
40387
|
-
}
|
|
40388
|
-
async getOrientation(e = {}) {
|
|
40389
|
-
const { movementsensorService: s } = this, i = new movementsensor_pb.GetOrientationRequest();
|
|
40390
|
-
i.setName(this.name), i.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(i);
|
|
40391
|
-
const g = (await promisify(
|
|
40392
|
-
s.getOrientation.bind(s),
|
|
40393
|
-
i
|
|
40394
|
-
)).getOrientation();
|
|
40395
|
-
if (!g)
|
|
40396
|
-
throw new Error("no orientation");
|
|
40397
|
-
return g.toObject();
|
|
40398
|
-
}
|
|
40399
|
-
async getPosition(e = {}) {
|
|
40400
|
-
const { movementsensorService: s } = this, i = new movementsensor_pb.GetPositionRequest();
|
|
40401
|
-
return i.setName(this.name), i.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(i), (await promisify(s.getPosition.bind(s), i)).toObject();
|
|
40402
|
-
}
|
|
40403
|
-
async getProperties(e = {}) {
|
|
40404
|
-
const { movementsensorService: s } = this, i = new movementsensor_pb.GetPropertiesRequest();
|
|
40405
|
-
return i.setName(this.name), i.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(i), (await promisify(s.getProperties.bind(s), i)).toObject();
|
|
40406
|
-
}
|
|
40407
|
-
async getAccuracy(e = {}) {
|
|
40408
|
-
const { movementsensorService: s } = this, i = new movementsensor_pb.GetAccuracyRequest();
|
|
40409
|
-
i.setName(this.name), i.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(i);
|
|
40410
|
-
const g = (await promisify(s.getAccuracy.bind(s), i)).getAccuracyMap(), p = {};
|
|
40411
|
-
for (const [o, r] of g.entries())
|
|
40412
|
-
p[o] = r;
|
|
40413
|
-
return p;
|
|
40414
|
-
}
|
|
40415
|
-
async getLinearAcceleration(e = {}) {
|
|
40416
|
-
const { movementsensorService: s } = this, i = new movementsensor_pb.GetLinearAccelerationRequest();
|
|
40417
|
-
i.setName(this.name), i.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(i);
|
|
40418
|
-
const g = (await promisify(
|
|
40419
|
-
s.getLinearAcceleration.bind(s),
|
|
40420
|
-
i
|
|
40421
|
-
)).getLinearAcceleration();
|
|
40422
|
-
if (!g)
|
|
40423
|
-
throw new Error("no linear acceleration");
|
|
40424
|
-
return g.toObject();
|
|
40425
|
-
}
|
|
40426
|
-
getReadings(e = {}) {
|
|
40427
|
-
return this.sensorclient.getReadings(e);
|
|
40428
|
-
}
|
|
40429
|
-
async doCommand(e) {
|
|
40430
|
-
const { movementsensorService: s } = this;
|
|
40431
|
-
return doCommandFromClient(
|
|
40432
|
-
s,
|
|
40433
|
-
this.name,
|
|
40434
|
-
e,
|
|
40435
|
-
this.options
|
|
40436
|
-
);
|
|
40437
|
-
}
|
|
40438
|
-
}
|
|
40439
40456
|
var stream_pb = {};
|
|
40440
40457
|
(function(t) {
|
|
40441
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
40442
|
-
return this
|
|
40443
|
-
}.call(null);
|
|
40458
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
40459
|
+
return this;
|
|
40460
|
+
}.call(null) || Function("return this")();
|
|
40444
40461
|
s.exportSymbol("proto.proto.stream.v1.AddStreamRequest", null, i), s.exportSymbol("proto.proto.stream.v1.AddStreamResponse", null, i), s.exportSymbol("proto.proto.stream.v1.ListStreamsRequest", null, i), s.exportSymbol("proto.proto.stream.v1.ListStreamsResponse", null, i), s.exportSymbol("proto.proto.stream.v1.RemoveStreamRequest", null, i), s.exportSymbol("proto.proto.stream.v1.RemoveStreamResponse", null, i), proto.proto.stream.v1.ListStreamsRequest = function(u) {
|
|
40445
40462
|
e.Message.initialize(this, u, 0, -1, null, null);
|
|
40446
40463
|
}, s.inherits(proto.proto.stream.v1.ListStreamsRequest, e.Message), s.DEBUG && !COMPILED && (proto.proto.stream.v1.ListStreamsRequest.displayName = "proto.proto.stream.v1.ListStreamsRequest"), proto.proto.stream.v1.ListStreamsResponse = function(u) {
|
|
@@ -40912,9 +40929,9 @@ class MotionClient {
|
|
|
40912
40929
|
}
|
|
40913
40930
|
var data_manager_pb = {};
|
|
40914
40931
|
(function(t) {
|
|
40915
|
-
var e = googleProtobuf, s = e, i = function() {
|
|
40916
|
-
return this
|
|
40917
|
-
}.call(null), u = common_pb;
|
|
40932
|
+
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
40933
|
+
return this;
|
|
40934
|
+
}.call(null) || Function("return this")(), u = common_pb;
|
|
40918
40935
|
s.object.extend(proto, u);
|
|
40919
40936
|
var g = annotations_pb;
|
|
40920
40937
|
s.object.extend(proto, g);
|
|
@@ -41148,7 +41165,7 @@ class ServoClient {
|
|
|
41148
41165
|
return doCommandFromClient(s, this.name, e, this.options);
|
|
41149
41166
|
}
|
|
41150
41167
|
}
|
|
41151
|
-
const version = "0.1.0
|
|
41168
|
+
const version = "0.1.0";
|
|
41152
41169
|
export {
|
|
41153
41170
|
ArmClient,
|
|
41154
41171
|
BaseClient,
|