@viamrobotics/sdk 0.0.40-alpha.1 → 0.0.40-alpha.2

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.
@@ -0,0 +1,16 @@
1
+ import type { RobotClient } from '../../robot';
2
+ import type { Options } from '../../types';
3
+ import type { Motion } from './Motion';
4
+ import common from '../../gen/common/v1/common_pb';
5
+ import pb from '../../gen/service/motion/v1/motion_pb';
6
+ export declare class MotionClient implements Motion {
7
+ private client;
8
+ private readonly name;
9
+ private readonly options;
10
+ constructor(client: RobotClient, name: string, options?: Options);
11
+ private get service();
12
+ move(destination: common.PoseInFrame.AsObject, componentName: common.ResourceName.AsObject, worldState?: common.WorldState.AsObject, constraints?: pb.Constraints.AsObject, extra?: {}): Promise<boolean>;
13
+ moveOnMap(destination: common.Pose.AsObject, componentName: common.ResourceName.AsObject, slamServiceName: common.ResourceName.AsObject, extra?: {}): Promise<boolean>;
14
+ moveSingleComponent(destination: common.PoseInFrame.AsObject, componentName: common.ResourceName.AsObject, worldState?: common.WorldState.AsObject, extra?: {}): Promise<boolean>;
15
+ getPose(componentName: common.ResourceName.AsObject, destinationFrame: string, supplementalTransforms: common.Transform.AsObject[], extra?: {}): Promise<common.PoseInFrame.AsObject>;
16
+ }
@@ -0,0 +1,51 @@
1
+ import common from '../../gen/common/v1/common_pb';
2
+ import pb from '../../gen/service/motion/v1/motion_pb';
3
+ import type { Extra } from '../../types';
4
+ /**
5
+ * A service that coordinates motion planning across all of the components in a
6
+ * given robot.
7
+ */
8
+ export interface Motion {
9
+ /**
10
+ * Move any component on the robot to a specified destination which can be
11
+ * from the reference frame of any other component on the robot.
12
+ *
13
+ * @param destination - Destination to move to, which can a pose in the
14
+ * reference frame of any frame in the robot's frame system.
15
+ * @param componentName - Component on the robot to move to the specified
16
+ * destination.
17
+ * @param worldState - Avoid obstacles by specifying their geometries in the
18
+ * world state. Augment the frame system of the robot by specifying
19
+ * additional transforms to add to it for the duration of the Move.
20
+ * @param constraints - Constrain the way the robot will move.
21
+ */
22
+ move: (destination: common.PoseInFrame.AsObject, componentName: common.ResourceName.AsObject, worldState?: common.WorldState.AsObject, constraints?: pb.Constraints.AsObject, extra?: Extra) => Promise<boolean>;
23
+ /**
24
+ * @param destination - Specify a destination to, which can be any pose with
25
+ * respect to the SLAM map's origin.
26
+ * @param componentName - Component on the robot to move to the specified
27
+ * destination.
28
+ * @param slamServiceName - Name of the slam service from which the SLAM map
29
+ * is requested
30
+ */
31
+ moveOnMap: (destination: common.Pose.AsObject, componentName: common.ResourceName.AsObject, slamServiceName: common.ResourceName.AsObject, extra?: Extra) => Promise<boolean>;
32
+ /**
33
+ * @param destination - Destination to move to, which can a pose in the
34
+ * reference frame of any frame in the robot's frame system.
35
+ * @param componentName - Component on the robot to move to the specified
36
+ * destination.
37
+ * @param worldState - Avoid obstacles by specifying their geometries in the
38
+ * world state. Augment the frame system of the robot by specifying
39
+ * additional transforms to add to it for the duration of the Move.
40
+ */
41
+ moveSingleComponent: (destination: common.PoseInFrame.AsObject, componentName: common.ResourceName.AsObject, worldState?: common.WorldState.AsObject, extra?: Extra) => Promise<boolean>;
42
+ /**
43
+ * @param componentName - The component whose pose is being requested.
44
+ * @param destinationFrame - The reference frame in which the component's pose
45
+ * should be provided, if unset this defaults to the "world" reference
46
+ * frame.
47
+ * @param supplementalTransforms - Pose information on any additional
48
+ * reference frames that are needed to compute the component's pose.
49
+ */
50
+ getPose: (componentName: common.ResourceName.AsObject, destinationFrame: string, supplementalTransforms: common.Transform.AsObject[], extra?: Extra) => Promise<common.PoseInFrame.AsObject>;
51
+ }
@@ -0,0 +1,2 @@
1
+ export type { Motion } from './motion/Motion';
2
+ export { MotionClient } from './motion/Client';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viamrobotics/sdk",
3
- "version": "0.0.40-alpha.1",
3
+ "version": "0.0.40-alpha.2",
4
4
  "description": "",
5
5
  "main": "./dist/main.umd.js",
6
6
  "module": "./dist/main.es.js",
@@ -10,6 +10,7 @@
10
10
  "dist/robot/**/*.d.ts",
11
11
  "dist/events.*",
12
12
  "dist/components/**/*.d.ts",
13
+ "dist/services/**/*.d.ts",
13
14
  "dist/extra/**/*.d.ts",
14
15
  "dist/main.*",
15
16
  "dist/gen/**/*.esm.d.ts",
@@ -1,19 +0,0 @@
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
- }
@@ -1,12 +0,0 @@
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 a component is in motion. */
11
- isMoving: () => Promise<boolean>;
12
- }
@@ -1,2 +0,0 @@
1
- export type { Gripper } from './gripper/Gripper';
2
- export { GripperClient } from './gripper/Client';