@viamrobotics/sdk 0.0.40-alpha.2 → 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.
@@ -1,16 +1,15 @@
1
1
  import type { JointPositions } from '../../gen/component/arm/v1/arm_pb';
2
- import type { Extra } from '../../types';
3
- import { Pose } from '../../gen/common/v1/common_pb';
2
+ import type { Extra, Pose } from '../../types';
4
3
  /** Represents a physical robot arm that exists in three-dimensional space. */
5
4
  export interface Arm {
6
5
  /** Get the position of the end of the arm expressed as a pose */
7
- getEndPosition: (extra?: Extra) => Promise<Pose.AsObject>;
6
+ getEndPosition: (extra?: Extra) => Promise<Pose>;
8
7
  /**
9
8
  * Move the end of the arm to the pose.
10
9
  *
11
10
  * @param pose - The destination pose for the arm.
12
11
  */
13
- moveToPosition: (pose: Pose.AsObject, extra?: Extra) => Promise<void>;
12
+ moveToPosition: (pose: Pose, extra?: Extra) => Promise<void>;
14
13
  /**
15
14
  * Move each joint of the arm based on the angles on the joint poisitons.
16
15
  * parameter
@@ -1,8 +1,7 @@
1
1
  import type { RobotClient } from '../../robot';
2
2
  import pb from '../../gen/component/arm/v1/arm_pb';
3
- import type { Options } from '../../types';
3
+ import type { Options, Pose } from '../../types';
4
4
  import type { Arm } from './Arm';
5
- import { Pose } from '../../gen/common/v1/common_pb';
6
5
  /**
7
6
  * A gRPC-web client for the Arm component.
8
7
  *
@@ -14,8 +13,16 @@ export declare class ArmClient implements Arm {
14
13
  private readonly options;
15
14
  constructor(client: RobotClient, name: string, options?: Options);
16
15
  private get ArmService();
17
- getEndPosition(extra?: {}): Promise<Pose.AsObject>;
18
- moveToPosition(pose: Pose.AsObject, extra?: {}): Promise<void>;
16
+ getEndPosition(extra?: {}): Promise<{
17
+ x: number;
18
+ y: number;
19
+ z: number;
20
+ ox: number;
21
+ oy: number;
22
+ oz: number;
23
+ theta: number;
24
+ }>;
25
+ moveToPosition(pose: Pose, extra?: {}): Promise<void>;
19
26
  moveToJointPositions(jointPositionsList: number[], extra?: {}): Promise<void>;
20
27
  getJointPositions(extra?: {}): Promise<pb.JointPositions>;
21
28
  stop(extra?: {}): Promise<void>;
package/dist/main.d.ts CHANGED
@@ -248,12 +248,29 @@ export { default as inputControllerApi } from './gen/component/inputcontroller/v
248
248
  *
249
249
  * Generated with https://github.com/improbable-eng/grpc-web
250
250
  *
251
- * @deprecated Use {@link MotionClient} instead.
251
+ * @example
252
+ *
253
+ * ```ts
254
+ * import { grpc } from '@improbable-eng/grpc-web';
255
+ *
256
+ * const client = {}; // replace with a connected robot client
257
+ *
258
+ * const request = new motionApi.GetPoseRequest();
259
+ * request.setName('mymotion');
260
+ *
261
+ * client.motionService.getPose(
262
+ * request,
263
+ * new grpc.Metadata(),
264
+ * (error, response) => {
265
+ * // do something with error or response
266
+ * }
267
+ * );
268
+ * ```
269
+ *
252
270
  * @alpha
253
271
  * @group Raw Protobufs
254
272
  */
255
273
  export { default as motionApi } from './gen/service/motion/v1/motion_pb';
256
- export { type Motion, MotionClient } from './services/motion';
257
274
  /**
258
275
  * Raw Protobuf interfaces for a Navigation service.
259
276
  *