@viamrobotics/sdk 0.0.43 → 0.0.45

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.
@@ -34,4 +34,6 @@ export interface Base {
34
34
  setVelocity(linear: Vector3D, angular: Vector3D, extra?: Extra): Promise<void>;
35
35
  /** Stop a base */
36
36
  stop(extra?: Extra): Promise<void>;
37
+ /** Return true if the base is in motion. */
38
+ isMoving(extra?: Extra): Promise<boolean>;
37
39
  }
@@ -17,4 +17,5 @@ export declare class BaseClient implements Base {
17
17
  setPower(linear: Vector3D, angular: Vector3D, extra?: {}): Promise<void>;
18
18
  setVelocity(linear: Vector3D, angular: Vector3D, extra?: {}): Promise<void>;
19
19
  stop(extra?: {}): Promise<void>;
20
+ isMoving(): Promise<boolean>;
20
21
  }
@@ -0,0 +1,19 @@
1
+ import type { RobotClient } from '../../robot';
2
+ import type { Options } from '../../types';
3
+ import type { Gripper } from './gripper';
4
+ /**
5
+ * A gRPC-web client for the Gripper component.
6
+ *
7
+ * @group Clients
8
+ */
9
+ export declare class GripperClient implements Gripper {
10
+ private client;
11
+ private readonly name;
12
+ private readonly options;
13
+ constructor(client: RobotClient, name: string, options?: Options);
14
+ private get gripperService();
15
+ open(extra?: {}): Promise<void>;
16
+ grab(extra?: {}): Promise<void>;
17
+ stop(extra?: {}): Promise<void>;
18
+ isMoving(): Promise<boolean>;
19
+ }
@@ -0,0 +1,12 @@
1
+ import type { Extra } from '../../types';
2
+ /** Represents a physical robotic gripper. */
3
+ export interface Gripper {
4
+ /** Open a gripper of the underlying robot. */
5
+ open: (extra?: Extra) => Promise<void>;
6
+ /** Request a gripper of the underlying robot to grab. */
7
+ grab: (extra?: Extra) => Promise<void>;
8
+ /** Stop a robot's gripper. */
9
+ stop: (extra?: Extra) => Promise<void>;
10
+ /** Report if the gripper is in motion. */
11
+ isMoving: () => Promise<boolean>;
12
+ }
@@ -0,0 +1,2 @@
1
+ export type { Gripper } from './gripper/gripper';
2
+ export { GripperClient } from './gripper/client';
@@ -22,4 +22,5 @@ export declare class MotorClient implements Motor {
22
22
  }>;
23
23
  getPosition(extra?: {}): Promise<number>;
24
24
  isPowered(extra?: {}): Promise<readonly [boolean, number]>;
25
+ isMoving(): Promise<boolean>;
25
26
  }
@@ -51,4 +51,6 @@ export interface Motor {
51
51
  getPosition(extra?: Extra): Promise<number>;
52
52
  /** Return true if the motor is on. */
53
53
  isPowered(extra?: Extra): Promise<readonly [boolean, number]>;
54
+ /** Return true if the motor is in motion. */
55
+ isMoving(): Promise<boolean>;
54
56
  }
@@ -216,6 +216,12 @@ export class Webcam extends jspb.Message {
216
216
  setPropertiesList(value: Array<Property>): void;
217
217
  addProperties(value?: Property, index?: number): Property;
218
218
 
219
+ getName(): string;
220
+ setName(value: string): void;
221
+
222
+ getId(): string;
223
+ setId(value: string): void;
224
+
219
225
  serializeBinary(): Uint8Array;
220
226
  toObject(includeInstance?: boolean): Webcam.AsObject;
221
227
  static toObject(includeInstance: boolean, msg: Webcam): Webcam.AsObject;
@@ -231,6 +237,8 @@ export namespace Webcam {
231
237
  label: string,
232
238
  status: string,
233
239
  propertiesList: Array<Property.AsObject>,
240
+ name: string,
241
+ id: string,
234
242
  }
235
243
  }
236
244
 
package/dist/main.d.ts CHANGED
@@ -203,29 +203,12 @@ export { default as genericApi } from './gen/component/generic/v1/generic_pb';
203
203
  *
204
204
  * Generated with https://github.com/improbable-eng/grpc-web
205
205
  *
206
- * @example
207
- *
208
- * ```ts
209
- * import { grpc } from '@improbable-eng/grpc-web';
210
- *
211
- * const client = {}; // replace with a connected robot client
212
- *
213
- * const request = new gripperApi.IsMovingRequest();
214
- * request.setName('mygripper');
215
- *
216
- * client.gripperService.isMoving(
217
- * request,
218
- * new grpc.Metadata(),
219
- * (error, response) => {
220
- * // do something with error or response
221
- * }
222
- * );
223
- * ```
224
- *
206
+ * @deprecated Use {@link GripperClient} instead.
225
207
  * @alpha
226
208
  * @group Raw Protobufs
227
209
  */
228
210
  export { default as gripperApi } from './gen/component/gripper/v1/gripper_pb';
211
+ export { type Gripper, GripperClient } from './components/gripper';
229
212
  /**
230
213
  * Raw Protobuf interfaces for an InputController component.
231
214
  *
@@ -265,6 +248,7 @@ export { default as inputControllerApi } from './gen/component/inputcontroller/v
265
248
  */
266
249
  export { default as motionApi } from './gen/service/motion/v1/motion_pb';
267
250
  export { type Motion, type MotionConstraints, MotionClient, } from './services/motion';
251
+ export { type DataManager, DataManagerClient } from './services/data-manager';
268
252
  /**
269
253
  * Raw Protobuf interfaces for a Navigation service.
270
254
  *