@viamrobotics/sdk 0.0.40-alpha.1 → 0.0.40
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/main.d.ts
CHANGED
|
@@ -192,13 +192,29 @@ export { default as genericApi } from './gen/component/generic/v1/generic_pb';
|
|
|
192
192
|
*
|
|
193
193
|
* Generated with https://github.com/improbable-eng/grpc-web
|
|
194
194
|
*
|
|
195
|
+
* @example
|
|
196
|
+
*
|
|
197
|
+
* ```ts
|
|
198
|
+
* import { grpc } from '@improbable-eng/grpc-web';
|
|
199
|
+
*
|
|
200
|
+
* const client = {}; // replace with a connected robot client
|
|
201
|
+
*
|
|
202
|
+
* const request = new gripperApi.IsMovingRequest();
|
|
203
|
+
* request.setName('mygripper');
|
|
204
|
+
*
|
|
205
|
+
* client.gripperService.isMoving(
|
|
206
|
+
* request,
|
|
207
|
+
* new grpc.Metadata(),
|
|
208
|
+
* (error, response) => {
|
|
209
|
+
* // do something with error or response
|
|
210
|
+
* }
|
|
211
|
+
* );
|
|
212
|
+
* ```
|
|
195
213
|
*
|
|
196
|
-
* @deprecated Use {@link GripperClient} instead.
|
|
197
214
|
* @alpha
|
|
198
215
|
* @group Raw Protobufs
|
|
199
216
|
*/
|
|
200
217
|
export { default as gripperApi } from './gen/component/gripper/v1/gripper_pb';
|
|
201
|
-
export { type Gripper, GripperClient } from './components/gripper';
|
|
202
218
|
/**
|
|
203
219
|
* Raw Protobuf interfaces for an InputController component.
|
|
204
220
|
*
|
package/dist/main.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const version = "0.0.40
|
|
1
|
+
const version = "0.0.40";
|
|
2
2
|
var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, robot_pb = {}, googleProtobuf = {};
|
|
3
3
|
(function(exports) {
|
|
4
4
|
var $jscomp = $jscomp || {};
|
|
@@ -41402,52 +41402,12 @@ class StreamClient extends EventDispatcher {
|
|
|
41402
41402
|
}
|
|
41403
41403
|
}
|
|
41404
41404
|
}
|
|
41405
|
-
class GripperClient {
|
|
41406
|
-
client;
|
|
41407
|
-
name;
|
|
41408
|
-
options;
|
|
41409
|
-
constructor(e, s, n = {}) {
|
|
41410
|
-
this.client = e.createServiceClient(GripperServiceClient_1), this.name = s, this.options = n;
|
|
41411
|
-
}
|
|
41412
|
-
get GripperService() {
|
|
41413
|
-
return this.client;
|
|
41414
|
-
}
|
|
41415
|
-
async open(e = {}) {
|
|
41416
|
-
const s = this.GripperService, n = new gripper_pb.OpenRequest();
|
|
41417
|
-
n.setName(this.name), n.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(n), await promisify(
|
|
41418
|
-
s.open.bind(s),
|
|
41419
|
-
n
|
|
41420
|
-
);
|
|
41421
|
-
}
|
|
41422
|
-
async grab(e = {}) {
|
|
41423
|
-
const s = this.GripperService, n = new gripper_pb.GrabRequest();
|
|
41424
|
-
n.setName(this.name), n.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(n), await promisify(
|
|
41425
|
-
s.grab.bind(s),
|
|
41426
|
-
n
|
|
41427
|
-
);
|
|
41428
|
-
}
|
|
41429
|
-
async stop(e = {}) {
|
|
41430
|
-
const s = this.GripperService, n = new gripper_pb.StopRequest();
|
|
41431
|
-
n.setName(this.name), n.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(n), await promisify(
|
|
41432
|
-
s.stop.bind(s),
|
|
41433
|
-
n
|
|
41434
|
-
);
|
|
41435
|
-
}
|
|
41436
|
-
async isMoving() {
|
|
41437
|
-
const e = this.GripperService, s = new gripper_pb.IsMovingRequest();
|
|
41438
|
-
return s.setName(this.name), this.options.requestLogger?.(s), (await promisify(
|
|
41439
|
-
e.isMoving.bind(e),
|
|
41440
|
-
s
|
|
41441
|
-
)).getIsMoving();
|
|
41442
|
-
}
|
|
41443
|
-
}
|
|
41444
41405
|
export {
|
|
41445
41406
|
ArmClient,
|
|
41446
41407
|
BaseClient,
|
|
41447
41408
|
BoardClient,
|
|
41448
41409
|
CameraClient,
|
|
41449
41410
|
RobotClient as Client,
|
|
41450
|
-
GripperClient,
|
|
41451
41411
|
MotorClient,
|
|
41452
41412
|
MovementSensorClient,
|
|
41453
41413
|
RobotClient,
|