@viamrobotics/sdk 0.12.0-rc.0 → 0.12.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/README.md +1 -1
- package/dist/gen/app/v1/robot_pb.d.ts +6 -0
- package/dist/gen/component/board/v1/board_pb.d.ts +60 -0
- package/dist/gen/component/board/v1/board_pb_service.d.ts +11 -0
- package/dist/gen/google/api/client_pb.d.ts +6 -0
- package/dist/gen/service/slam/v1/slam_pb.d.ts +50 -0
- package/dist/main.es.js +380 -34
- package/dist/main.umd.js +4 -4
- package/dist/services/slam/client.d.ts +1 -1
- package/dist/services/slam/slam.d.ts +1 -1
- package/package.json +1 -1
package/dist/main.es.js
CHANGED
|
@@ -30847,7 +30847,7 @@ var BaseServiceClient_1 = BaseServiceClient, board_pb = {};
|
|
|
30847
30847
|
var u = duration_pb$1;
|
|
30848
30848
|
n.object.extend(proto, u);
|
|
30849
30849
|
var t = struct_pb;
|
|
30850
|
-
n.object.extend(proto, t), n.exportSymbol("proto.viam.component.board.v1.GetDigitalInterruptValueRequest", null, g), n.exportSymbol("proto.viam.component.board.v1.GetDigitalInterruptValueResponse", null, g), n.exportSymbol("proto.viam.component.board.v1.GetGPIORequest", null, g), n.exportSymbol("proto.viam.component.board.v1.GetGPIOResponse", null, g), n.exportSymbol("proto.viam.component.board.v1.PWMFrequencyRequest", null, g), n.exportSymbol("proto.viam.component.board.v1.PWMFrequencyResponse", null, g), n.exportSymbol("proto.viam.component.board.v1.PWMRequest", null, g), n.exportSymbol("proto.viam.component.board.v1.PWMResponse", null, g), n.exportSymbol("proto.viam.component.board.v1.PowerMode", null, g), n.exportSymbol("proto.viam.component.board.v1.ReadAnalogReaderRequest", null, g), n.exportSymbol("proto.viam.component.board.v1.ReadAnalogReaderResponse", null, g), n.exportSymbol("proto.viam.component.board.v1.SetGPIORequest", null, g), n.exportSymbol("proto.viam.component.board.v1.SetGPIOResponse", null, g), n.exportSymbol("proto.viam.component.board.v1.SetPWMFrequencyRequest", null, g), n.exportSymbol("proto.viam.component.board.v1.SetPWMFrequencyResponse", null, g), n.exportSymbol("proto.viam.component.board.v1.SetPWMRequest", null, g), n.exportSymbol("proto.viam.component.board.v1.SetPWMResponse", null, g), n.exportSymbol("proto.viam.component.board.v1.SetPowerModeRequest", null, g), n.exportSymbol("proto.viam.component.board.v1.SetPowerModeResponse", null, g), n.exportSymbol("proto.viam.component.board.v1.StatusRequest", null, g), n.exportSymbol("proto.viam.component.board.v1.StatusResponse", null, g), n.exportSymbol("proto.viam.component.board.v1.WriteAnalogRequest", null, g), n.exportSymbol("proto.viam.component.board.v1.WriteAnalogResponse", null, g), proto.viam.component.board.v1.StatusRequest = function(r) {
|
|
30850
|
+
n.object.extend(proto, t), n.exportSymbol("proto.viam.component.board.v1.GetDigitalInterruptValueRequest", null, g), n.exportSymbol("proto.viam.component.board.v1.GetDigitalInterruptValueResponse", null, g), n.exportSymbol("proto.viam.component.board.v1.GetGPIORequest", null, g), n.exportSymbol("proto.viam.component.board.v1.GetGPIOResponse", null, g), n.exportSymbol("proto.viam.component.board.v1.PWMFrequencyRequest", null, g), n.exportSymbol("proto.viam.component.board.v1.PWMFrequencyResponse", null, g), n.exportSymbol("proto.viam.component.board.v1.PWMRequest", null, g), n.exportSymbol("proto.viam.component.board.v1.PWMResponse", null, g), n.exportSymbol("proto.viam.component.board.v1.PowerMode", null, g), n.exportSymbol("proto.viam.component.board.v1.ReadAnalogReaderRequest", null, g), n.exportSymbol("proto.viam.component.board.v1.ReadAnalogReaderResponse", null, g), n.exportSymbol("proto.viam.component.board.v1.SetGPIORequest", null, g), n.exportSymbol("proto.viam.component.board.v1.SetGPIOResponse", null, g), n.exportSymbol("proto.viam.component.board.v1.SetPWMFrequencyRequest", null, g), n.exportSymbol("proto.viam.component.board.v1.SetPWMFrequencyResponse", null, g), n.exportSymbol("proto.viam.component.board.v1.SetPWMRequest", null, g), n.exportSymbol("proto.viam.component.board.v1.SetPWMResponse", null, g), n.exportSymbol("proto.viam.component.board.v1.SetPowerModeRequest", null, g), n.exportSymbol("proto.viam.component.board.v1.SetPowerModeResponse", null, g), n.exportSymbol("proto.viam.component.board.v1.StatusRequest", null, g), n.exportSymbol("proto.viam.component.board.v1.StatusResponse", null, g), n.exportSymbol("proto.viam.component.board.v1.StreamTicksRequest", null, g), n.exportSymbol("proto.viam.component.board.v1.StreamTicksResponse", null, g), n.exportSymbol("proto.viam.component.board.v1.WriteAnalogRequest", null, g), n.exportSymbol("proto.viam.component.board.v1.WriteAnalogResponse", null, g), proto.viam.component.board.v1.StatusRequest = function(r) {
|
|
30851
30851
|
e.Message.initialize(this, r, 0, -1, null, null);
|
|
30852
30852
|
}, n.inherits(proto.viam.component.board.v1.StatusRequest, e.Message), n.DEBUG && !COMPILED && (proto.viam.component.board.v1.StatusRequest.displayName = "proto.viam.component.board.v1.StatusRequest"), proto.viam.component.board.v1.StatusResponse = function(r) {
|
|
30853
30853
|
e.Message.initialize(this, r, 0, -1, null, null);
|
|
@@ -30887,7 +30887,11 @@ var BaseServiceClient_1 = BaseServiceClient, board_pb = {};
|
|
|
30887
30887
|
e.Message.initialize(this, r, 0, -1, null, null);
|
|
30888
30888
|
}, n.inherits(proto.viam.component.board.v1.GetDigitalInterruptValueRequest, e.Message), n.DEBUG && !COMPILED && (proto.viam.component.board.v1.GetDigitalInterruptValueRequest.displayName = "proto.viam.component.board.v1.GetDigitalInterruptValueRequest"), proto.viam.component.board.v1.GetDigitalInterruptValueResponse = function(r) {
|
|
30889
30889
|
e.Message.initialize(this, r, 0, -1, null, null);
|
|
30890
|
-
}, n.inherits(proto.viam.component.board.v1.GetDigitalInterruptValueResponse, e.Message), n.DEBUG && !COMPILED && (proto.viam.component.board.v1.GetDigitalInterruptValueResponse.displayName = "proto.viam.component.board.v1.GetDigitalInterruptValueResponse"), proto.viam.component.board.v1.
|
|
30890
|
+
}, n.inherits(proto.viam.component.board.v1.GetDigitalInterruptValueResponse, e.Message), n.DEBUG && !COMPILED && (proto.viam.component.board.v1.GetDigitalInterruptValueResponse.displayName = "proto.viam.component.board.v1.GetDigitalInterruptValueResponse"), proto.viam.component.board.v1.StreamTicksRequest = function(r) {
|
|
30891
|
+
e.Message.initialize(this, r, 0, -1, proto.viam.component.board.v1.StreamTicksRequest.repeatedFields_, null);
|
|
30892
|
+
}, n.inherits(proto.viam.component.board.v1.StreamTicksRequest, e.Message), n.DEBUG && !COMPILED && (proto.viam.component.board.v1.StreamTicksRequest.displayName = "proto.viam.component.board.v1.StreamTicksRequest"), proto.viam.component.board.v1.StreamTicksResponse = function(r) {
|
|
30893
|
+
e.Message.initialize(this, r, 0, -1, null, null);
|
|
30894
|
+
}, n.inherits(proto.viam.component.board.v1.StreamTicksResponse, e.Message), n.DEBUG && !COMPILED && (proto.viam.component.board.v1.StreamTicksResponse.displayName = "proto.viam.component.board.v1.StreamTicksResponse"), proto.viam.component.board.v1.SetPowerModeRequest = function(r) {
|
|
30891
30895
|
e.Message.initialize(this, r, 0, -1, null, null);
|
|
30892
30896
|
}, n.inherits(proto.viam.component.board.v1.SetPowerModeRequest, e.Message), n.DEBUG && !COMPILED && (proto.viam.component.board.v1.SetPowerModeRequest.displayName = "proto.viam.component.board.v1.SetPowerModeRequest"), proto.viam.component.board.v1.SetPowerModeResponse = function(r) {
|
|
30893
30897
|
e.Message.initialize(this, r, 0, -1, null, null);
|
|
@@ -32103,6 +32107,170 @@ var BaseServiceClient_1 = BaseServiceClient, board_pb = {};
|
|
|
32103
32107
|
);
|
|
32104
32108
|
}, proto.viam.component.board.v1.GetDigitalInterruptValueResponse.prototype.setValue = function(r) {
|
|
32105
32109
|
return e.Message.setProto3IntField(this, 1, r);
|
|
32110
|
+
}, proto.viam.component.board.v1.StreamTicksRequest.repeatedFields_ = [2], e.Message.GENERATE_TO_OBJECT && (proto.viam.component.board.v1.StreamTicksRequest.prototype.toObject = function(r) {
|
|
32111
|
+
return proto.viam.component.board.v1.StreamTicksRequest.toObject(r, this);
|
|
32112
|
+
}, proto.viam.component.board.v1.StreamTicksRequest.toObject = function(r, i) {
|
|
32113
|
+
var l, c = {
|
|
32114
|
+
name: e.Message.getFieldWithDefault(i, 1, ""),
|
|
32115
|
+
pinNamesList: (l = e.Message.getRepeatedField(i, 2)) == null ? void 0 : l,
|
|
32116
|
+
extra: (l = i.getExtra()) && t.Struct.toObject(r, l)
|
|
32117
|
+
};
|
|
32118
|
+
return r && (c.$jspbMessageInstance = i), c;
|
|
32119
|
+
}), proto.viam.component.board.v1.StreamTicksRequest.deserializeBinary = function(r) {
|
|
32120
|
+
var i = new e.BinaryReader(r), l = new proto.viam.component.board.v1.StreamTicksRequest();
|
|
32121
|
+
return proto.viam.component.board.v1.StreamTicksRequest.deserializeBinaryFromReader(l, i);
|
|
32122
|
+
}, proto.viam.component.board.v1.StreamTicksRequest.deserializeBinaryFromReader = function(r, i) {
|
|
32123
|
+
for (; i.nextField() && !i.isEndGroup(); ) {
|
|
32124
|
+
var l = i.getFieldNumber();
|
|
32125
|
+
switch (l) {
|
|
32126
|
+
case 1:
|
|
32127
|
+
var c = (
|
|
32128
|
+
/** @type {string} */
|
|
32129
|
+
i.readString()
|
|
32130
|
+
);
|
|
32131
|
+
r.setName(c);
|
|
32132
|
+
break;
|
|
32133
|
+
case 2:
|
|
32134
|
+
var c = (
|
|
32135
|
+
/** @type {string} */
|
|
32136
|
+
i.readString()
|
|
32137
|
+
);
|
|
32138
|
+
r.addPinNames(c);
|
|
32139
|
+
break;
|
|
32140
|
+
case 99:
|
|
32141
|
+
var c = new t.Struct();
|
|
32142
|
+
i.readMessage(c, t.Struct.deserializeBinaryFromReader), r.setExtra(c);
|
|
32143
|
+
break;
|
|
32144
|
+
default:
|
|
32145
|
+
i.skipField();
|
|
32146
|
+
break;
|
|
32147
|
+
}
|
|
32148
|
+
}
|
|
32149
|
+
return r;
|
|
32150
|
+
}, proto.viam.component.board.v1.StreamTicksRequest.prototype.serializeBinary = function() {
|
|
32151
|
+
var r = new e.BinaryWriter();
|
|
32152
|
+
return proto.viam.component.board.v1.StreamTicksRequest.serializeBinaryToWriter(this, r), r.getResultBuffer();
|
|
32153
|
+
}, proto.viam.component.board.v1.StreamTicksRequest.serializeBinaryToWriter = function(r, i) {
|
|
32154
|
+
var l = void 0;
|
|
32155
|
+
l = r.getName(), l.length > 0 && i.writeString(
|
|
32156
|
+
1,
|
|
32157
|
+
l
|
|
32158
|
+
), l = r.getPinNamesList(), l.length > 0 && i.writeRepeatedString(
|
|
32159
|
+
2,
|
|
32160
|
+
l
|
|
32161
|
+
), l = r.getExtra(), l != null && i.writeMessage(
|
|
32162
|
+
99,
|
|
32163
|
+
l,
|
|
32164
|
+
t.Struct.serializeBinaryToWriter
|
|
32165
|
+
);
|
|
32166
|
+
}, proto.viam.component.board.v1.StreamTicksRequest.prototype.getName = function() {
|
|
32167
|
+
return (
|
|
32168
|
+
/** @type {string} */
|
|
32169
|
+
e.Message.getFieldWithDefault(this, 1, "")
|
|
32170
|
+
);
|
|
32171
|
+
}, proto.viam.component.board.v1.StreamTicksRequest.prototype.setName = function(r) {
|
|
32172
|
+
return e.Message.setProto3StringField(this, 1, r);
|
|
32173
|
+
}, proto.viam.component.board.v1.StreamTicksRequest.prototype.getPinNamesList = function() {
|
|
32174
|
+
return (
|
|
32175
|
+
/** @type {!Array<string>} */
|
|
32176
|
+
e.Message.getRepeatedField(this, 2)
|
|
32177
|
+
);
|
|
32178
|
+
}, proto.viam.component.board.v1.StreamTicksRequest.prototype.setPinNamesList = function(r) {
|
|
32179
|
+
return e.Message.setField(this, 2, r || []);
|
|
32180
|
+
}, proto.viam.component.board.v1.StreamTicksRequest.prototype.addPinNames = function(r, i) {
|
|
32181
|
+
return e.Message.addToRepeatedField(this, 2, r, i);
|
|
32182
|
+
}, proto.viam.component.board.v1.StreamTicksRequest.prototype.clearPinNamesList = function() {
|
|
32183
|
+
return this.setPinNamesList([]);
|
|
32184
|
+
}, proto.viam.component.board.v1.StreamTicksRequest.prototype.getExtra = function() {
|
|
32185
|
+
return (
|
|
32186
|
+
/** @type{?proto.google.protobuf.Struct} */
|
|
32187
|
+
e.Message.getWrapperField(this, t.Struct, 99)
|
|
32188
|
+
);
|
|
32189
|
+
}, proto.viam.component.board.v1.StreamTicksRequest.prototype.setExtra = function(r) {
|
|
32190
|
+
return e.Message.setWrapperField(this, 99, r);
|
|
32191
|
+
}, proto.viam.component.board.v1.StreamTicksRequest.prototype.clearExtra = function() {
|
|
32192
|
+
return this.setExtra(void 0);
|
|
32193
|
+
}, proto.viam.component.board.v1.StreamTicksRequest.prototype.hasExtra = function() {
|
|
32194
|
+
return e.Message.getField(this, 99) != null;
|
|
32195
|
+
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.component.board.v1.StreamTicksResponse.prototype.toObject = function(r) {
|
|
32196
|
+
return proto.viam.component.board.v1.StreamTicksResponse.toObject(r, this);
|
|
32197
|
+
}, proto.viam.component.board.v1.StreamTicksResponse.toObject = function(r, i) {
|
|
32198
|
+
var l = {
|
|
32199
|
+
pinName: e.Message.getFieldWithDefault(i, 1, ""),
|
|
32200
|
+
time: e.Message.getFieldWithDefault(i, 2, 0),
|
|
32201
|
+
high: e.Message.getBooleanFieldWithDefault(i, 3, !1)
|
|
32202
|
+
};
|
|
32203
|
+
return r && (l.$jspbMessageInstance = i), l;
|
|
32204
|
+
}), proto.viam.component.board.v1.StreamTicksResponse.deserializeBinary = function(r) {
|
|
32205
|
+
var i = new e.BinaryReader(r), l = new proto.viam.component.board.v1.StreamTicksResponse();
|
|
32206
|
+
return proto.viam.component.board.v1.StreamTicksResponse.deserializeBinaryFromReader(l, i);
|
|
32207
|
+
}, proto.viam.component.board.v1.StreamTicksResponse.deserializeBinaryFromReader = function(r, i) {
|
|
32208
|
+
for (; i.nextField() && !i.isEndGroup(); ) {
|
|
32209
|
+
var l = i.getFieldNumber();
|
|
32210
|
+
switch (l) {
|
|
32211
|
+
case 1:
|
|
32212
|
+
var c = (
|
|
32213
|
+
/** @type {string} */
|
|
32214
|
+
i.readString()
|
|
32215
|
+
);
|
|
32216
|
+
r.setPinName(c);
|
|
32217
|
+
break;
|
|
32218
|
+
case 2:
|
|
32219
|
+
var c = (
|
|
32220
|
+
/** @type {number} */
|
|
32221
|
+
i.readUint64()
|
|
32222
|
+
);
|
|
32223
|
+
r.setTime(c);
|
|
32224
|
+
break;
|
|
32225
|
+
case 3:
|
|
32226
|
+
var c = (
|
|
32227
|
+
/** @type {boolean} */
|
|
32228
|
+
i.readBool()
|
|
32229
|
+
);
|
|
32230
|
+
r.setHigh(c);
|
|
32231
|
+
break;
|
|
32232
|
+
default:
|
|
32233
|
+
i.skipField();
|
|
32234
|
+
break;
|
|
32235
|
+
}
|
|
32236
|
+
}
|
|
32237
|
+
return r;
|
|
32238
|
+
}, proto.viam.component.board.v1.StreamTicksResponse.prototype.serializeBinary = function() {
|
|
32239
|
+
var r = new e.BinaryWriter();
|
|
32240
|
+
return proto.viam.component.board.v1.StreamTicksResponse.serializeBinaryToWriter(this, r), r.getResultBuffer();
|
|
32241
|
+
}, proto.viam.component.board.v1.StreamTicksResponse.serializeBinaryToWriter = function(r, i) {
|
|
32242
|
+
var l = void 0;
|
|
32243
|
+
l = r.getPinName(), l.length > 0 && i.writeString(
|
|
32244
|
+
1,
|
|
32245
|
+
l
|
|
32246
|
+
), l = r.getTime(), l !== 0 && i.writeUint64(
|
|
32247
|
+
2,
|
|
32248
|
+
l
|
|
32249
|
+
), l = r.getHigh(), l && i.writeBool(
|
|
32250
|
+
3,
|
|
32251
|
+
l
|
|
32252
|
+
);
|
|
32253
|
+
}, proto.viam.component.board.v1.StreamTicksResponse.prototype.getPinName = function() {
|
|
32254
|
+
return (
|
|
32255
|
+
/** @type {string} */
|
|
32256
|
+
e.Message.getFieldWithDefault(this, 1, "")
|
|
32257
|
+
);
|
|
32258
|
+
}, proto.viam.component.board.v1.StreamTicksResponse.prototype.setPinName = function(r) {
|
|
32259
|
+
return e.Message.setProto3StringField(this, 1, r);
|
|
32260
|
+
}, proto.viam.component.board.v1.StreamTicksResponse.prototype.getTime = function() {
|
|
32261
|
+
return (
|
|
32262
|
+
/** @type {number} */
|
|
32263
|
+
e.Message.getFieldWithDefault(this, 2, 0)
|
|
32264
|
+
);
|
|
32265
|
+
}, proto.viam.component.board.v1.StreamTicksResponse.prototype.setTime = function(r) {
|
|
32266
|
+
return e.Message.setProto3IntField(this, 2, r);
|
|
32267
|
+
}, proto.viam.component.board.v1.StreamTicksResponse.prototype.getHigh = function() {
|
|
32268
|
+
return (
|
|
32269
|
+
/** @type {boolean} */
|
|
32270
|
+
e.Message.getBooleanFieldWithDefault(this, 3, !1)
|
|
32271
|
+
);
|
|
32272
|
+
}, proto.viam.component.board.v1.StreamTicksResponse.prototype.setHigh = function(r) {
|
|
32273
|
+
return e.Message.setProto3BooleanField(this, 3, r);
|
|
32106
32274
|
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.component.board.v1.SetPowerModeRequest.prototype.toObject = function(r) {
|
|
32107
32275
|
return proto.viam.component.board.v1.SetPowerModeRequest.toObject(r, this);
|
|
32108
32276
|
}, proto.viam.component.board.v1.SetPowerModeRequest.toObject = function(r, i) {
|
|
@@ -32326,6 +32494,14 @@ BoardService.GetDigitalInterruptValue = {
|
|
|
32326
32494
|
requestType: component_board_v1_board_pb.GetDigitalInterruptValueRequest,
|
|
32327
32495
|
responseType: component_board_v1_board_pb.GetDigitalInterruptValueResponse
|
|
32328
32496
|
};
|
|
32497
|
+
BoardService.StreamTicks = {
|
|
32498
|
+
methodName: "StreamTicks",
|
|
32499
|
+
service: BoardService,
|
|
32500
|
+
requestStream: !1,
|
|
32501
|
+
responseStream: !0,
|
|
32502
|
+
requestType: component_board_v1_board_pb.StreamTicksRequest,
|
|
32503
|
+
responseType: component_board_v1_board_pb.StreamTicksResponse
|
|
32504
|
+
};
|
|
32329
32505
|
BoardService.SetPowerMode = {
|
|
32330
32506
|
methodName: "SetPowerMode",
|
|
32331
32507
|
service: BoardService,
|
|
@@ -32598,6 +32774,39 @@ BoardServiceClient.prototype.getDigitalInterruptValue = function o(e, n, g) {
|
|
|
32598
32774
|
}
|
|
32599
32775
|
};
|
|
32600
32776
|
};
|
|
32777
|
+
BoardServiceClient.prototype.streamTicks = function o(e, n) {
|
|
32778
|
+
var g = {
|
|
32779
|
+
data: [],
|
|
32780
|
+
end: [],
|
|
32781
|
+
status: []
|
|
32782
|
+
}, s = grpc$m.invoke(BoardService.StreamTicks, {
|
|
32783
|
+
request: e,
|
|
32784
|
+
host: this.serviceHost,
|
|
32785
|
+
metadata: n,
|
|
32786
|
+
transport: this.options.transport,
|
|
32787
|
+
debug: this.options.debug,
|
|
32788
|
+
onMessage: function(p) {
|
|
32789
|
+
g.data.forEach(function(u) {
|
|
32790
|
+
u(p);
|
|
32791
|
+
});
|
|
32792
|
+
},
|
|
32793
|
+
onEnd: function(p, u, t) {
|
|
32794
|
+
g.status.forEach(function(r) {
|
|
32795
|
+
r({ code: p, details: u, metadata: t });
|
|
32796
|
+
}), g.end.forEach(function(r) {
|
|
32797
|
+
r({ code: p, details: u, metadata: t });
|
|
32798
|
+
}), g = null;
|
|
32799
|
+
}
|
|
32800
|
+
});
|
|
32801
|
+
return {
|
|
32802
|
+
on: function(p, u) {
|
|
32803
|
+
return g[p].push(u), this;
|
|
32804
|
+
},
|
|
32805
|
+
cancel: function() {
|
|
32806
|
+
g = null, s.close();
|
|
32807
|
+
}
|
|
32808
|
+
};
|
|
32809
|
+
};
|
|
32601
32810
|
BoardServiceClient.prototype.setPowerMode = function o(e, n, g) {
|
|
32602
32811
|
arguments.length === 2 && (g = arguments[1]);
|
|
32603
32812
|
var s = grpc$m.unary(BoardService.SetPowerMode, {
|
|
@@ -44948,7 +45157,7 @@ var SensorsServiceClient_1 = SensorsServiceClient, slam_pb = {};
|
|
|
44948
45157
|
var p = annotations_pb$1;
|
|
44949
45158
|
n.object.extend(proto, p);
|
|
44950
45159
|
var u = struct_pb;
|
|
44951
|
-
n.object.extend(proto, u), n.exportSymbol("proto.viam.service.slam.v1.GetInternalStateRequest", null, g), n.exportSymbol("proto.viam.service.slam.v1.GetInternalStateResponse", null, g), n.exportSymbol("proto.viam.service.slam.v1.GetPointCloudMapRequest", null, g), n.exportSymbol("proto.viam.service.slam.v1.GetPointCloudMapResponse", null, g), n.exportSymbol("proto.viam.service.slam.v1.GetPositionRequest", null, g), n.exportSymbol("proto.viam.service.slam.v1.GetPositionResponse", null, g), n.exportSymbol("proto.viam.service.slam.v1.GetPropertiesRequest", null, g), n.exportSymbol("proto.viam.service.slam.v1.GetPropertiesResponse", null, g), n.exportSymbol("proto.viam.service.slam.v1.MappingMode", null, g), proto.viam.service.slam.v1.GetPositionRequest = function(t) {
|
|
45160
|
+
n.object.extend(proto, u), n.exportSymbol("proto.viam.service.slam.v1.GetInternalStateRequest", null, g), n.exportSymbol("proto.viam.service.slam.v1.GetInternalStateResponse", null, g), n.exportSymbol("proto.viam.service.slam.v1.GetPointCloudMapRequest", null, g), n.exportSymbol("proto.viam.service.slam.v1.GetPointCloudMapResponse", null, g), n.exportSymbol("proto.viam.service.slam.v1.GetPositionRequest", null, g), n.exportSymbol("proto.viam.service.slam.v1.GetPositionResponse", null, g), n.exportSymbol("proto.viam.service.slam.v1.GetPropertiesRequest", null, g), n.exportSymbol("proto.viam.service.slam.v1.GetPropertiesResponse", null, g), n.exportSymbol("proto.viam.service.slam.v1.MappingMode", null, g), n.exportSymbol("proto.viam.service.slam.v1.SensorInfo", null, g), n.exportSymbol("proto.viam.service.slam.v1.SensorType", null, g), proto.viam.service.slam.v1.GetPositionRequest = function(t) {
|
|
44952
45161
|
e.Message.initialize(this, t, 0, -1, null, null);
|
|
44953
45162
|
}, n.inherits(proto.viam.service.slam.v1.GetPositionRequest, e.Message), n.DEBUG && !COMPILED && (proto.viam.service.slam.v1.GetPositionRequest.displayName = "proto.viam.service.slam.v1.GetPositionRequest"), proto.viam.service.slam.v1.GetPositionResponse = function(t) {
|
|
44954
45163
|
e.Message.initialize(this, t, 0, -1, null, null);
|
|
@@ -44963,8 +45172,10 @@ var SensorsServiceClient_1 = SensorsServiceClient, slam_pb = {};
|
|
|
44963
45172
|
}, n.inherits(proto.viam.service.slam.v1.GetInternalStateResponse, e.Message), n.DEBUG && !COMPILED && (proto.viam.service.slam.v1.GetInternalStateResponse.displayName = "proto.viam.service.slam.v1.GetInternalStateResponse"), proto.viam.service.slam.v1.GetPropertiesRequest = function(t) {
|
|
44964
45173
|
e.Message.initialize(this, t, 0, -1, null, null);
|
|
44965
45174
|
}, n.inherits(proto.viam.service.slam.v1.GetPropertiesRequest, e.Message), n.DEBUG && !COMPILED && (proto.viam.service.slam.v1.GetPropertiesRequest.displayName = "proto.viam.service.slam.v1.GetPropertiesRequest"), proto.viam.service.slam.v1.GetPropertiesResponse = function(t) {
|
|
45175
|
+
e.Message.initialize(this, t, 0, -1, proto.viam.service.slam.v1.GetPropertiesResponse.repeatedFields_, null);
|
|
45176
|
+
}, n.inherits(proto.viam.service.slam.v1.GetPropertiesResponse, e.Message), n.DEBUG && !COMPILED && (proto.viam.service.slam.v1.GetPropertiesResponse.displayName = "proto.viam.service.slam.v1.GetPropertiesResponse"), proto.viam.service.slam.v1.SensorInfo = function(t) {
|
|
44966
45177
|
e.Message.initialize(this, t, 0, -1, null, null);
|
|
44967
|
-
}, n.inherits(proto.viam.service.slam.v1.
|
|
45178
|
+
}, n.inherits(proto.viam.service.slam.v1.SensorInfo, e.Message), n.DEBUG && !COMPILED && (proto.viam.service.slam.v1.SensorInfo.displayName = "proto.viam.service.slam.v1.SensorInfo"), e.Message.GENERATE_TO_OBJECT && (proto.viam.service.slam.v1.GetPositionRequest.prototype.toObject = function(t) {
|
|
44968
45179
|
return proto.viam.service.slam.v1.GetPositionRequest.toObject(t, this);
|
|
44969
45180
|
}, proto.viam.service.slam.v1.GetPositionRequest.toObject = function(t, r) {
|
|
44970
45181
|
var i = {
|
|
@@ -45094,7 +45305,8 @@ var SensorsServiceClient_1 = SensorsServiceClient, slam_pb = {};
|
|
|
45094
45305
|
return proto.viam.service.slam.v1.GetPointCloudMapRequest.toObject(t, this);
|
|
45095
45306
|
}, proto.viam.service.slam.v1.GetPointCloudMapRequest.toObject = function(t, r) {
|
|
45096
45307
|
var i = {
|
|
45097
|
-
name: e.Message.getFieldWithDefault(r, 1, "")
|
|
45308
|
+
name: e.Message.getFieldWithDefault(r, 1, ""),
|
|
45309
|
+
returnEditedMap: e.Message.getBooleanFieldWithDefault(r, 2, !1)
|
|
45098
45310
|
};
|
|
45099
45311
|
return t && (i.$jspbMessageInstance = r), i;
|
|
45100
45312
|
}), proto.viam.service.slam.v1.GetPointCloudMapRequest.deserializeBinary = function(t) {
|
|
@@ -45111,6 +45323,13 @@ var SensorsServiceClient_1 = SensorsServiceClient, slam_pb = {};
|
|
|
45111
45323
|
);
|
|
45112
45324
|
t.setName(l);
|
|
45113
45325
|
break;
|
|
45326
|
+
case 2:
|
|
45327
|
+
var l = (
|
|
45328
|
+
/** @type {boolean} */
|
|
45329
|
+
r.readBool()
|
|
45330
|
+
);
|
|
45331
|
+
t.setReturnEditedMap(l);
|
|
45332
|
+
break;
|
|
45114
45333
|
default:
|
|
45115
45334
|
r.skipField();
|
|
45116
45335
|
break;
|
|
@@ -45125,6 +45344,10 @@ var SensorsServiceClient_1 = SensorsServiceClient, slam_pb = {};
|
|
|
45125
45344
|
i = t.getName(), i.length > 0 && r.writeString(
|
|
45126
45345
|
1,
|
|
45127
45346
|
i
|
|
45347
|
+
), i = /** @type {boolean} */
|
|
45348
|
+
e.Message.getField(t, 2), i != null && r.writeBool(
|
|
45349
|
+
2,
|
|
45350
|
+
i
|
|
45128
45351
|
);
|
|
45129
45352
|
}, proto.viam.service.slam.v1.GetPointCloudMapRequest.prototype.getName = function() {
|
|
45130
45353
|
return (
|
|
@@ -45133,6 +45356,17 @@ var SensorsServiceClient_1 = SensorsServiceClient, slam_pb = {};
|
|
|
45133
45356
|
);
|
|
45134
45357
|
}, proto.viam.service.slam.v1.GetPointCloudMapRequest.prototype.setName = function(t) {
|
|
45135
45358
|
return e.Message.setProto3StringField(this, 1, t);
|
|
45359
|
+
}, proto.viam.service.slam.v1.GetPointCloudMapRequest.prototype.getReturnEditedMap = function() {
|
|
45360
|
+
return (
|
|
45361
|
+
/** @type {boolean} */
|
|
45362
|
+
e.Message.getBooleanFieldWithDefault(this, 2, !1)
|
|
45363
|
+
);
|
|
45364
|
+
}, proto.viam.service.slam.v1.GetPointCloudMapRequest.prototype.setReturnEditedMap = function(t) {
|
|
45365
|
+
return e.Message.setField(this, 2, t);
|
|
45366
|
+
}, proto.viam.service.slam.v1.GetPointCloudMapRequest.prototype.clearReturnEditedMap = function() {
|
|
45367
|
+
return e.Message.setField(this, 2, void 0);
|
|
45368
|
+
}, proto.viam.service.slam.v1.GetPointCloudMapRequest.prototype.hasReturnEditedMap = function() {
|
|
45369
|
+
return e.Message.getField(this, 2) != null;
|
|
45136
45370
|
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.service.slam.v1.GetPointCloudMapResponse.prototype.toObject = function(t) {
|
|
45137
45371
|
return proto.viam.service.slam.v1.GetPointCloudMapResponse.toObject(t, this);
|
|
45138
45372
|
}, proto.viam.service.slam.v1.GetPointCloudMapResponse.toObject = function(t, r) {
|
|
@@ -45333,12 +45567,18 @@ var SensorsServiceClient_1 = SensorsServiceClient, slam_pb = {};
|
|
|
45333
45567
|
);
|
|
45334
45568
|
}, proto.viam.service.slam.v1.GetPropertiesRequest.prototype.setName = function(t) {
|
|
45335
45569
|
return e.Message.setProto3StringField(this, 1, t);
|
|
45336
|
-
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.service.slam.v1.GetPropertiesResponse.prototype.toObject = function(t) {
|
|
45570
|
+
}, proto.viam.service.slam.v1.GetPropertiesResponse.repeatedFields_ = [4], e.Message.GENERATE_TO_OBJECT && (proto.viam.service.slam.v1.GetPropertiesResponse.prototype.toObject = function(t) {
|
|
45337
45571
|
return proto.viam.service.slam.v1.GetPropertiesResponse.toObject(t, this);
|
|
45338
45572
|
}, proto.viam.service.slam.v1.GetPropertiesResponse.toObject = function(t, r) {
|
|
45339
45573
|
var i = {
|
|
45340
45574
|
cloudSlam: e.Message.getBooleanFieldWithDefault(r, 1, !1),
|
|
45341
|
-
mappingMode: e.Message.getFieldWithDefault(r, 2, 0)
|
|
45575
|
+
mappingMode: e.Message.getFieldWithDefault(r, 2, 0),
|
|
45576
|
+
internalStateFileType: e.Message.getFieldWithDefault(r, 3, ""),
|
|
45577
|
+
sensorInfoList: e.Message.toObjectList(
|
|
45578
|
+
r.getSensorInfoList(),
|
|
45579
|
+
proto.viam.service.slam.v1.SensorInfo.toObject,
|
|
45580
|
+
t
|
|
45581
|
+
)
|
|
45342
45582
|
};
|
|
45343
45583
|
return t && (i.$jspbMessageInstance = r), i;
|
|
45344
45584
|
}), proto.viam.service.slam.v1.GetPropertiesResponse.deserializeBinary = function(t) {
|
|
@@ -45362,6 +45602,17 @@ var SensorsServiceClient_1 = SensorsServiceClient, slam_pb = {};
|
|
|
45362
45602
|
);
|
|
45363
45603
|
t.setMappingMode(l);
|
|
45364
45604
|
break;
|
|
45605
|
+
case 3:
|
|
45606
|
+
var l = (
|
|
45607
|
+
/** @type {string} */
|
|
45608
|
+
r.readString()
|
|
45609
|
+
);
|
|
45610
|
+
t.setInternalStateFileType(l);
|
|
45611
|
+
break;
|
|
45612
|
+
case 4:
|
|
45613
|
+
var l = new proto.viam.service.slam.v1.SensorInfo();
|
|
45614
|
+
r.readMessage(l, proto.viam.service.slam.v1.SensorInfo.deserializeBinaryFromReader), t.addSensorInfo(l);
|
|
45615
|
+
break;
|
|
45365
45616
|
default:
|
|
45366
45617
|
r.skipField();
|
|
45367
45618
|
break;
|
|
@@ -45379,6 +45630,14 @@ var SensorsServiceClient_1 = SensorsServiceClient, slam_pb = {};
|
|
|
45379
45630
|
), i = t.getMappingMode(), i !== 0 && r.writeEnum(
|
|
45380
45631
|
2,
|
|
45381
45632
|
i
|
|
45633
|
+
), i = /** @type {string} */
|
|
45634
|
+
e.Message.getField(t, 3), i != null && r.writeString(
|
|
45635
|
+
3,
|
|
45636
|
+
i
|
|
45637
|
+
), i = t.getSensorInfoList(), i.length > 0 && r.writeRepeatedMessage(
|
|
45638
|
+
4,
|
|
45639
|
+
i,
|
|
45640
|
+
proto.viam.service.slam.v1.SensorInfo.serializeBinaryToWriter
|
|
45382
45641
|
);
|
|
45383
45642
|
}, proto.viam.service.slam.v1.GetPropertiesResponse.prototype.getCloudSlam = function() {
|
|
45384
45643
|
return (
|
|
@@ -45394,11 +45653,98 @@ var SensorsServiceClient_1 = SensorsServiceClient, slam_pb = {};
|
|
|
45394
45653
|
);
|
|
45395
45654
|
}, proto.viam.service.slam.v1.GetPropertiesResponse.prototype.setMappingMode = function(t) {
|
|
45396
45655
|
return e.Message.setProto3EnumField(this, 2, t);
|
|
45656
|
+
}, proto.viam.service.slam.v1.GetPropertiesResponse.prototype.getInternalStateFileType = function() {
|
|
45657
|
+
return (
|
|
45658
|
+
/** @type {string} */
|
|
45659
|
+
e.Message.getFieldWithDefault(this, 3, "")
|
|
45660
|
+
);
|
|
45661
|
+
}, proto.viam.service.slam.v1.GetPropertiesResponse.prototype.setInternalStateFileType = function(t) {
|
|
45662
|
+
return e.Message.setField(this, 3, t);
|
|
45663
|
+
}, proto.viam.service.slam.v1.GetPropertiesResponse.prototype.clearInternalStateFileType = function() {
|
|
45664
|
+
return e.Message.setField(this, 3, void 0);
|
|
45665
|
+
}, proto.viam.service.slam.v1.GetPropertiesResponse.prototype.hasInternalStateFileType = function() {
|
|
45666
|
+
return e.Message.getField(this, 3) != null;
|
|
45667
|
+
}, proto.viam.service.slam.v1.GetPropertiesResponse.prototype.getSensorInfoList = function() {
|
|
45668
|
+
return (
|
|
45669
|
+
/** @type{!Array<!proto.viam.service.slam.v1.SensorInfo>} */
|
|
45670
|
+
e.Message.getRepeatedWrapperField(this, proto.viam.service.slam.v1.SensorInfo, 4)
|
|
45671
|
+
);
|
|
45672
|
+
}, proto.viam.service.slam.v1.GetPropertiesResponse.prototype.setSensorInfoList = function(t) {
|
|
45673
|
+
return e.Message.setRepeatedWrapperField(this, 4, t);
|
|
45674
|
+
}, proto.viam.service.slam.v1.GetPropertiesResponse.prototype.addSensorInfo = function(t, r) {
|
|
45675
|
+
return e.Message.addToRepeatedWrapperField(this, 4, t, proto.viam.service.slam.v1.SensorInfo, r);
|
|
45676
|
+
}, proto.viam.service.slam.v1.GetPropertiesResponse.prototype.clearSensorInfoList = function() {
|
|
45677
|
+
return this.setSensorInfoList([]);
|
|
45678
|
+
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.service.slam.v1.SensorInfo.prototype.toObject = function(t) {
|
|
45679
|
+
return proto.viam.service.slam.v1.SensorInfo.toObject(t, this);
|
|
45680
|
+
}, proto.viam.service.slam.v1.SensorInfo.toObject = function(t, r) {
|
|
45681
|
+
var i = {
|
|
45682
|
+
name: e.Message.getFieldWithDefault(r, 1, ""),
|
|
45683
|
+
type: e.Message.getFieldWithDefault(r, 2, 0)
|
|
45684
|
+
};
|
|
45685
|
+
return t && (i.$jspbMessageInstance = r), i;
|
|
45686
|
+
}), proto.viam.service.slam.v1.SensorInfo.deserializeBinary = function(t) {
|
|
45687
|
+
var r = new e.BinaryReader(t), i = new proto.viam.service.slam.v1.SensorInfo();
|
|
45688
|
+
return proto.viam.service.slam.v1.SensorInfo.deserializeBinaryFromReader(i, r);
|
|
45689
|
+
}, proto.viam.service.slam.v1.SensorInfo.deserializeBinaryFromReader = function(t, r) {
|
|
45690
|
+
for (; r.nextField() && !r.isEndGroup(); ) {
|
|
45691
|
+
var i = r.getFieldNumber();
|
|
45692
|
+
switch (i) {
|
|
45693
|
+
case 1:
|
|
45694
|
+
var l = (
|
|
45695
|
+
/** @type {string} */
|
|
45696
|
+
r.readString()
|
|
45697
|
+
);
|
|
45698
|
+
t.setName(l);
|
|
45699
|
+
break;
|
|
45700
|
+
case 2:
|
|
45701
|
+
var l = (
|
|
45702
|
+
/** @type {!proto.viam.service.slam.v1.SensorType} */
|
|
45703
|
+
r.readEnum()
|
|
45704
|
+
);
|
|
45705
|
+
t.setType(l);
|
|
45706
|
+
break;
|
|
45707
|
+
default:
|
|
45708
|
+
r.skipField();
|
|
45709
|
+
break;
|
|
45710
|
+
}
|
|
45711
|
+
}
|
|
45712
|
+
return t;
|
|
45713
|
+
}, proto.viam.service.slam.v1.SensorInfo.prototype.serializeBinary = function() {
|
|
45714
|
+
var t = new e.BinaryWriter();
|
|
45715
|
+
return proto.viam.service.slam.v1.SensorInfo.serializeBinaryToWriter(this, t), t.getResultBuffer();
|
|
45716
|
+
}, proto.viam.service.slam.v1.SensorInfo.serializeBinaryToWriter = function(t, r) {
|
|
45717
|
+
var i = void 0;
|
|
45718
|
+
i = t.getName(), i.length > 0 && r.writeString(
|
|
45719
|
+
1,
|
|
45720
|
+
i
|
|
45721
|
+
), i = t.getType(), i !== 0 && r.writeEnum(
|
|
45722
|
+
2,
|
|
45723
|
+
i
|
|
45724
|
+
);
|
|
45725
|
+
}, proto.viam.service.slam.v1.SensorInfo.prototype.getName = function() {
|
|
45726
|
+
return (
|
|
45727
|
+
/** @type {string} */
|
|
45728
|
+
e.Message.getFieldWithDefault(this, 1, "")
|
|
45729
|
+
);
|
|
45730
|
+
}, proto.viam.service.slam.v1.SensorInfo.prototype.setName = function(t) {
|
|
45731
|
+
return e.Message.setProto3StringField(this, 1, t);
|
|
45732
|
+
}, proto.viam.service.slam.v1.SensorInfo.prototype.getType = function() {
|
|
45733
|
+
return (
|
|
45734
|
+
/** @type {!proto.viam.service.slam.v1.SensorType} */
|
|
45735
|
+
e.Message.getFieldWithDefault(this, 2, 0)
|
|
45736
|
+
);
|
|
45737
|
+
}, proto.viam.service.slam.v1.SensorInfo.prototype.setType = function(t) {
|
|
45738
|
+
return e.Message.setProto3EnumField(this, 2, t);
|
|
45397
45739
|
}, proto.viam.service.slam.v1.MappingMode = {
|
|
45398
45740
|
MAPPING_MODE_UNSPECIFIED: 0,
|
|
45399
45741
|
MAPPING_MODE_CREATE_NEW_MAP: 1,
|
|
45400
45742
|
MAPPING_MODE_LOCALIZE_ONLY: 2,
|
|
45401
45743
|
MAPPING_MODE_UPDATE_EXISTING_MAP: 3
|
|
45744
|
+
}, proto.viam.service.slam.v1.SensorType = {
|
|
45745
|
+
SENSOR_TYPE_UNSPECIFIED: 0,
|
|
45746
|
+
SENSOR_TYPE_CAMERA: 1,
|
|
45747
|
+
SENSOR_TYPE_MOVEMENT_SENSOR: 2
|
|
45402
45748
|
}, n.object.extend(o, proto.viam.service.slam.v1);
|
|
45403
45749
|
})(slam_pb);
|
|
45404
45750
|
const pb$5 = /* @__PURE__ */ getDefaultExportFromCjs(slam_pb);
|
|
@@ -55890,36 +56236,36 @@ class SlamClient {
|
|
|
55890
56236
|
const { service: e } = this, n = new pb$5.GetPositionRequest();
|
|
55891
56237
|
return n.setName(this.name), this.options.requestLogger?.(n), (await promisify(e.getPosition.bind(e), n)).toObject();
|
|
55892
56238
|
}
|
|
55893
|
-
getPointCloudMap = async () => {
|
|
55894
|
-
const
|
|
55895
|
-
|
|
55896
|
-
const
|
|
55897
|
-
return
|
|
55898
|
-
const
|
|
55899
|
-
|
|
55900
|
-
}), new Promise((
|
|
55901
|
-
|
|
55902
|
-
if (
|
|
55903
|
-
const
|
|
55904
|
-
message:
|
|
55905
|
-
code:
|
|
55906
|
-
metadata:
|
|
56239
|
+
getPointCloudMap = async (e) => {
|
|
56240
|
+
const n = new pb$5.GetPointCloudMapRequest();
|
|
56241
|
+
n.setName(this.name), e && n.setReturnEditedMap(e), this.options.requestLogger?.(n);
|
|
56242
|
+
const g = [], s = this.client.getPointCloudMap(n);
|
|
56243
|
+
return s.on("data", (p) => {
|
|
56244
|
+
const u = p.getPointCloudPcdChunk_asU8();
|
|
56245
|
+
g.push(u);
|
|
56246
|
+
}), new Promise((p, u) => {
|
|
56247
|
+
s.on("status", (t) => {
|
|
56248
|
+
if (t.code !== 0) {
|
|
56249
|
+
const r = {
|
|
56250
|
+
message: t.details,
|
|
56251
|
+
code: t.code,
|
|
56252
|
+
metadata: t.metadata
|
|
55907
56253
|
};
|
|
55908
|
-
|
|
56254
|
+
u(r);
|
|
55909
56255
|
}
|
|
55910
|
-
}),
|
|
55911
|
-
if (
|
|
55912
|
-
|
|
55913
|
-
else if (
|
|
55914
|
-
const
|
|
55915
|
-
message:
|
|
55916
|
-
code:
|
|
55917
|
-
metadata:
|
|
56256
|
+
}), s.on("end", (t) => {
|
|
56257
|
+
if (t === void 0)
|
|
56258
|
+
u({ message: "Stream ended without a status code" });
|
|
56259
|
+
else if (t.code !== 0) {
|
|
56260
|
+
const i = {
|
|
56261
|
+
message: t.details,
|
|
56262
|
+
code: t.code,
|
|
56263
|
+
metadata: t.metadata
|
|
55918
56264
|
};
|
|
55919
|
-
|
|
56265
|
+
u(i);
|
|
55920
56266
|
}
|
|
55921
|
-
const
|
|
55922
|
-
|
|
56267
|
+
const r = concatArrayU8(g);
|
|
56268
|
+
p(r);
|
|
55923
56269
|
});
|
|
55924
56270
|
});
|
|
55925
56271
|
};
|
|
@@ -56068,7 +56414,7 @@ class GenericClient {
|
|
|
56068
56414
|
return doCommandFromClient(n, this.name, e, this.options);
|
|
56069
56415
|
}
|
|
56070
56416
|
}
|
|
56071
|
-
const version = "0.12.
|
|
56417
|
+
const version = "0.12.1";
|
|
56072
56418
|
export {
|
|
56073
56419
|
ArmClient,
|
|
56074
56420
|
BaseClient,
|