@viamrobotics/sdk 0.10.1 → 0.11.0-rc.0

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.
@@ -123,6 +123,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
123
123
  transformPose(source: PoseInFrame, destination: string, supplementalTransforms: Transform[]): Promise<PoseInFrame>;
124
124
  transformPCD(pointCloudPCD: Uint8Array, source: string, destination: string): Promise<Uint8Array>;
125
125
  discoverComponents(queries: proto.DiscoveryQuery[]): Promise<proto.Discovery[]>;
126
+ getCloudMetadata(): Promise<proto.GetCloudMetadataResponse.AsObject>;
126
127
  resourceNames(): Promise<ResourceName.AsObject[]>;
127
128
  resourceRPCSubtypes(): Promise<proto.ResourceRPCSubtype[]>;
128
129
  getStatus(resourceNames?: ResourceName.AsObject[]): Promise<proto.Status[]>;
@@ -4,6 +4,7 @@ import { DISCONNECTED, RECONNECTED } from '../events';
4
4
  import type proto from '../gen/robot/v1/robot_pb';
5
5
  import type { ResponseStream } from '../gen/robot/v1/robot_pb_service';
6
6
  export type RobotStatusStream = ResponseStream<proto.Status[]>;
7
+ export type CloudMetadata = proto.GetCloudMetadataResponse.AsObject;
7
8
  type Callback = (args: unknown) => void;
8
9
  export interface Robot {
9
10
  /**
@@ -129,5 +130,12 @@ export interface Robot {
129
130
  * @alpha
130
131
  */
131
132
  on: (type: typeof RECONNECTED | typeof DISCONNECTED, listener: Callback) => void;
133
+ /**
134
+ * Get app-related information about the robot.
135
+ *
136
+ * @group App/Cloud
137
+ * @alpha
138
+ */
139
+ getCloudMetadata(): Promise<CloudMetadata>;
132
140
  }
133
141
  export {};
package/dist/robot.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export type { Robot, RobotStatusStream } from './robot/robot';
1
+ export type { Robot, RobotStatusStream, CloudMetadata } from './robot/robot';
2
2
  export { RobotClient } from './robot/client';
3
3
  export { type DialConf, type DialDirectConf, type DialWebRTCConf, createRobotClient, } from './robot/dial';
@@ -1,6 +1,6 @@
1
1
  import pb from '../../gen/service/motion/v1/motion_pb';
2
2
  import type { RobotClient } from '../../robot';
3
- import type { GeoObstacle, GeoPoint, Options, Pose, PoseInFrame, ResourceName, StructType, Transform, WorldState } from '../../types';
3
+ import type { GeoObstacle, GeoPoint, Geometry, Options, Pose, PoseInFrame, ResourceName, StructType, Transform, WorldState } from '../../types';
4
4
  import { type Constraints, type MotionConfiguration } from './types';
5
5
  import type { Motion } from './motion';
6
6
  /**
@@ -15,7 +15,7 @@ export declare class MotionClient implements Motion {
15
15
  constructor(client: RobotClient, name: string, options?: Options);
16
16
  private get service();
17
17
  move(destination: PoseInFrame, componentName: ResourceName, worldState?: WorldState, constraints?: Constraints, extra?: {}): Promise<boolean>;
18
- moveOnMap(destination: Pose, componentName: ResourceName, slamServiceName: ResourceName, motionConfig?: MotionConfiguration, extra?: {}): Promise<string>;
18
+ moveOnMap(destination: Pose, componentName: ResourceName, slamServiceName: ResourceName, motionConfig?: MotionConfiguration, obstacles?: Geometry[], extra?: {}): Promise<string>;
19
19
  moveOnGlobe(destination: GeoPoint, componentName: ResourceName, movementSensorName: ResourceName, heading?: number, obstaclesList?: GeoObstacle[], motionConfig?: MotionConfiguration, extra?: {}): Promise<string>;
20
20
  stopPlan(componentName: ResourceName, extra?: {}): Promise<null>;
21
21
  getPlan(componentName: ResourceName, lastPlanOnly?: boolean, executionId?: string, extra?: {}): Promise<pb.GetPlanResponse.AsObject>;
@@ -1,4 +1,4 @@
1
- import type { GeoObstacle, GeoPoint, Pose, PoseInFrame, Resource, ResourceName, StructType, Transform, WorldState } from '../../types';
1
+ import type { GeoObstacle, Geometry, GeoPoint, Pose, PoseInFrame, Resource, ResourceName, StructType, Transform, WorldState } from '../../types';
2
2
  import type { Constraints, MotionConfiguration, GetPlanResponse, ListPlanStatusesResponse } from './types';
3
3
  /**
4
4
  * A service that coordinates motion planning across all of the components in a
@@ -35,8 +35,9 @@ export interface Motion extends Resource {
35
35
  * @param slamServiceName - Name of the `SLAM` service from which the SLAM map
36
36
  * is requested
37
37
  * @param motionConfiguration - Optional motion configuration options.
38
+ * @param obstacles - Optional obstacles to be considered for motion planning.
38
39
  */
39
- moveOnMap: (destination: Pose, componentName: ResourceName, slamServiceName: ResourceName, motionConfiguration?: MotionConfiguration, extra?: StructType) => Promise<string>;
40
+ moveOnMap: (destination: Pose, componentName: ResourceName, slamServiceName: ResourceName, motionConfiguration?: MotionConfiguration, obstacles?: Geometry[], extra?: StructType) => Promise<string>;
40
41
  /**
41
42
  * Move a component to a specific latitude and longitude, using a
42
43
  * `MovementSensor` to check the location. `moveOnGlobe()` is non blocking,
package/dist/utils.d.ts CHANGED
@@ -18,6 +18,7 @@ export declare const encodePose: (obj: common.Pose.AsObject) => common.Pose;
18
18
  export declare const encodePoseInFrame: (obj: common.PoseInFrame.AsObject) => common.PoseInFrame;
19
19
  /** Convert a ResourceName object to a Protobuf Datatype. */
20
20
  export declare const encodeResourceName: (obj: common.ResourceName.AsObject) => common.ResourceName;
21
+ export declare const encodeGeometry: (obj: common.Geometry.AsObject) => common.Geometry;
21
22
  /** Convert a Transform object to a Protobuf Datatype. */
22
23
  export declare const encodeTransform: (obj: common.Transform.AsObject) => common.Transform;
23
24
  /** Convert a WorldState object to a Protobuf Datatype. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viamrobotics/sdk",
3
- "version": "0.10.1",
3
+ "version": "0.11.0-rc.0",
4
4
  "description": "",
5
5
  "main": "./dist/main.umd.js",
6
6
  "module": "./dist/main.es.js",