@viamrobotics/sdk 0.36.0 → 0.36.1

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.
Files changed (33) hide show
  1. package/dist/components/arm/arm.d.ts +3 -0
  2. package/dist/components/arm/client.d.ts +2 -1
  3. package/dist/components/base/base.d.ts +3 -0
  4. package/dist/components/base/client.d.ts +2 -1
  5. package/dist/components/board/client.d.ts +1 -1
  6. package/dist/components/button/client.d.ts +1 -1
  7. package/dist/components/camera/camera.d.ts +3 -0
  8. package/dist/components/camera/client.d.ts +2 -1
  9. package/dist/components/encoder/client.d.ts +1 -1
  10. package/dist/components/gantry/client.d.ts +2 -1
  11. package/dist/components/gantry/gantry.d.ts +3 -0
  12. package/dist/components/generic/client.d.ts +3 -2
  13. package/dist/components/generic/generic.d.ts +4 -1
  14. package/dist/components/gripper/client.d.ts +2 -1
  15. package/dist/components/gripper/gripper.d.ts +3 -0
  16. package/dist/components/input-controller/client.d.ts +1 -1
  17. package/dist/components/motor/client.d.ts +1 -1
  18. package/dist/components/movement-sensor/client.d.ts +1 -1
  19. package/dist/components/power-sensor/client.d.ts +1 -1
  20. package/dist/components/sensor/client.d.ts +1 -1
  21. package/dist/components/servo/client.d.ts +1 -1
  22. package/dist/components/switch/client.d.ts +1 -1
  23. package/dist/main.es.js +187 -145
  24. package/dist/main.umd.js +7 -7
  25. package/dist/services/data-manager/client.d.ts +1 -1
  26. package/dist/services/discovery/client.d.ts +1 -1
  27. package/dist/services/generic/client.d.ts +1 -1
  28. package/dist/services/motion/client.d.ts +1 -1
  29. package/dist/services/navigation/client.d.ts +1 -1
  30. package/dist/services/slam/client.d.ts +1 -1
  31. package/dist/services/vision/client.d.ts +1 -1
  32. package/dist/types.d.ts +2 -0
  33. package/package.json +1 -1
@@ -1,12 +1,15 @@
1
1
  import type { PlainMessage, Struct } from '@bufbuild/protobuf';
2
2
  import type { Pose, Resource } from '../../types';
3
3
  import * as armApi from '../../gen/component/arm/v1/arm_pb';
4
+ import type { Geometry } from '../../gen/common/v1/common_pb';
4
5
  export type ArmJointPositions = PlainMessage<armApi.JointPositions>;
5
6
  export declare const ArmJointPositions: typeof armApi.JointPositions;
6
7
  /** Represents a physical robot arm that exists in three-dimensional space. */
7
8
  export interface Arm extends Resource {
8
9
  /** Get the position of the end of the arm expressed as a pose */
9
10
  getEndPosition: (extra?: Struct) => Promise<Pose>;
11
+ /** Get the geometries of the component in their current configuration */
12
+ getGeometries: (extra?: Struct) => Promise<Geometry[]>;
10
13
  /**
11
14
  * Move the end of the arm to the pose.
12
15
  *
@@ -11,11 +11,12 @@ import type { Arm } from './arm';
11
11
  */
12
12
  export declare class ArmClient implements Arm {
13
13
  private client;
14
- private readonly name;
14
+ readonly name: string;
15
15
  private readonly options;
16
16
  callOptions: CallOptions;
17
17
  constructor(client: RobotClient, name: string, options?: Options);
18
18
  getEndPosition(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/common/v1/common_pb").Pose>;
19
+ getGeometries(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/common/v1/common_pb").Geometry[]>;
19
20
  moveToPosition(pose: Pose, extra?: {}, callOptions?: CallOptions): Promise<void>;
20
21
  moveToJointPositions(jointPositionsList: number[], extra?: {}, callOptions?: CallOptions): Promise<void>;
21
22
  getJointPositions(extra?: {}, callOptions?: CallOptions): Promise<JointPositions>;
@@ -1,9 +1,12 @@
1
1
  import type { Resource, Struct, Vector3 } from '../../types';
2
2
  import * as baseApi from '../../gen/component/base/v1/base_pb';
3
+ import type { Geometry } from '../../gen/common/v1/common_pb';
3
4
  export type BaseProperties = baseApi.GetPropertiesResponse;
4
5
  export declare const BaseProperties: typeof baseApi.GetPropertiesResponse;
5
6
  /** Represents a physical base of a robot. */
6
7
  export interface Base extends Resource {
8
+ /** Get the geometries of the component in their current configuration */
9
+ getGeometries: (extra?: Struct) => Promise<Geometry[]>;
7
10
  /**
8
11
  * Move a base in a straight line by a given distance at a given speed. This
9
12
  * method blocks until completed or cancelled.
@@ -10,10 +10,11 @@ import type { Base } from './base';
10
10
  */
11
11
  export declare class BaseClient implements Base {
12
12
  private client;
13
- private readonly name;
13
+ readonly name: string;
14
14
  private readonly options;
15
15
  callOptions: CallOptions;
16
16
  constructor(client: RobotClient, name: string, options?: Options);
17
+ getGeometries(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/common/v1/common_pb").Geometry[]>;
17
18
  moveStraight(distanceMm: number, mmPerSec: number, extra?: {}, callOptions?: CallOptions): Promise<void>;
18
19
  spin(angleDeg: number, degsPerSec: number, extra?: {}, callOptions?: CallOptions): Promise<void>;
19
20
  setPower(linear: Vector3, angular: Vector3, extra?: {}, callOptions?: CallOptions): Promise<void>;
@@ -10,7 +10,7 @@ import { type Board, type PowerMode, type Tick } from './board';
10
10
  */
11
11
  export declare class BoardClient implements Board {
12
12
  private client;
13
- private readonly name;
13
+ readonly name: string;
14
14
  private readonly options;
15
15
  callOptions: CallOptions;
16
16
  constructor(client: RobotClient, name: string, options?: Options);
@@ -10,7 +10,7 @@ import type { Button } from './button';
10
10
  */
11
11
  export declare class ButtonClient implements Button {
12
12
  private client;
13
- private readonly name;
13
+ readonly name: string;
14
14
  private readonly options;
15
15
  callOptions: CallOptions;
16
16
  constructor(client: RobotClient, name: string, options?: Options);
@@ -1,6 +1,7 @@
1
1
  import type { Struct } from '@bufbuild/protobuf';
2
2
  import type { DistortionParameters, IntrinsicParameters } from '../../gen/component/camera/v1/camera_pb';
3
3
  import type { Resource } from '../../types';
4
+ import type { Geometry } from '../../gen/common/v1/common_pb';
4
5
  export interface Properties {
5
6
  /** Whether the camera supports the return of point cloud data. */
6
7
  supportsPcd: boolean;
@@ -14,6 +15,8 @@ export interface Properties {
14
15
  export type MimeType = '' | 'image/vnd.viam.rgba' | 'image/jpeg' | 'image/png' | 'pointcloud/pcd' | 'unsupported';
15
16
  /** Represents any physical hardware that can capture frames. */
16
17
  export interface Camera extends Resource {
18
+ /** Get the geometries of the component in their current configuration */
19
+ getGeometries: (extra?: Struct) => Promise<Geometry[]>;
17
20
  /**
18
21
  * Return a frame from a camera.
19
22
  *
@@ -10,10 +10,11 @@ import type { Camera, MimeType } from './camera';
10
10
  */
11
11
  export declare class CameraClient implements Camera {
12
12
  private client;
13
- private readonly name;
13
+ readonly name: string;
14
14
  private readonly options;
15
15
  callOptions: CallOptions;
16
16
  constructor(client: RobotClient, name: string, options?: Options);
17
+ getGeometries(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/common/v1/common_pb").Geometry[]>;
17
18
  getImage(mimeType?: MimeType, extra?: {}, callOptions?: CallOptions): Promise<Uint8Array>;
18
19
  renderFrame(mimeType?: MimeType, extra?: {}, callOptions?: CallOptions): Promise<Blob>;
19
20
  getPointCloud(extra?: {}, callOptions?: CallOptions): Promise<Uint8Array>;
@@ -10,7 +10,7 @@ import { EncoderPositionType, type Encoder } from './encoder';
10
10
  */
11
11
  export declare class EncoderClient implements Encoder {
12
12
  private client;
13
- private readonly name;
13
+ readonly name: string;
14
14
  private readonly options;
15
15
  callOptions: CallOptions;
16
16
  constructor(client: RobotClient, name: string, options?: Options);
@@ -10,10 +10,11 @@ import type { Gantry } from './gantry';
10
10
  */
11
11
  export declare class GantryClient implements Gantry {
12
12
  private client;
13
- private readonly name;
13
+ readonly name: string;
14
14
  private readonly options;
15
15
  callOptions: CallOptions;
16
16
  constructor(client: RobotClient, name: string, options?: Options);
17
+ getGeometries(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/common/v1/common_pb").Geometry[]>;
17
18
  getPosition(extra?: {}, callOptions?: CallOptions): Promise<number[]>;
18
19
  moveToPosition(positionsMm: number[], speedsMmPerSec: number[], extra?: {}, callOptions?: CallOptions): Promise<void>;
19
20
  home(extra?: {}, callOptions?: CallOptions): Promise<boolean>;
@@ -1,7 +1,10 @@
1
1
  import type { Struct } from '@bufbuild/protobuf';
2
2
  import type { Resource } from '../../types';
3
+ import type { Geometry } from '../../gen/common/v1/common_pb';
3
4
  /** Represents a physical gantry that exists in three-dimensional space. */
4
5
  export interface Gantry extends Resource {
6
+ /** Get the geometries of the component in their current configuration */
7
+ getGeometries: (extra?: Struct) => Promise<Geometry[]>;
5
8
  /**
6
9
  * Move each axis of the gantry to the positionsMm at the speeds in
7
10
  * speedsMmPerSec
@@ -1,4 +1,4 @@
1
- import type { JsonValue, Struct } from '@bufbuild/protobuf';
1
+ import { type JsonValue, Struct } from '@bufbuild/protobuf';
2
2
  import type { CallOptions } from '@connectrpc/connect';
3
3
  import type { RobotClient } from '../../robot';
4
4
  import type { Options } from '../../types';
@@ -10,9 +10,10 @@ import type { Generic } from './generic';
10
10
  */
11
11
  export declare class GenericClient implements Generic {
12
12
  private client;
13
- private readonly name;
13
+ readonly name: string;
14
14
  private readonly options;
15
15
  callOptions: CallOptions;
16
16
  constructor(client: RobotClient, name: string, options?: Options);
17
+ getGeometries(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/common/v1/common_pb").Geometry[]>;
17
18
  doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
18
19
  }
@@ -1,4 +1,7 @@
1
- import type { Resource } from '../../types';
1
+ import type { Geometry } from '../../gen/common/v1/common_pb';
2
+ import type { Struct, Resource } from '../../types';
2
3
  /** Represents a generic component. */
3
4
  export interface Generic extends Resource {
5
+ /** Get the geometries of the component in their current configuration */
6
+ getGeometries: (extra?: Struct) => Promise<Geometry[]>;
4
7
  }
@@ -10,10 +10,11 @@ import type { Gripper } from './gripper';
10
10
  */
11
11
  export declare class GripperClient implements Gripper {
12
12
  private client;
13
- private readonly name;
13
+ readonly name: string;
14
14
  private readonly options;
15
15
  callOptions: CallOptions;
16
16
  constructor(client: RobotClient, name: string, options?: Options);
17
+ getGeometries(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/common/v1/common_pb").Geometry[]>;
17
18
  open(extra?: {}, callOptions?: CallOptions): Promise<void>;
18
19
  grab(extra?: {}, callOptions?: CallOptions): Promise<void>;
19
20
  stop(extra?: {}, callOptions?: CallOptions): Promise<void>;
@@ -1,7 +1,10 @@
1
1
  import type { Struct } from '@bufbuild/protobuf';
2
2
  import type { Resource } from '../../types';
3
+ import type { Geometry } from '../../gen/common/v1/common_pb';
3
4
  /** Represents a physical robotic gripper. */
4
5
  export interface Gripper extends Resource {
6
+ /** Get the geometries of the component in their current configuration */
7
+ getGeometries: (extra?: Struct) => Promise<Geometry[]>;
5
8
  /** Open a gripper of the underlying robot. */
6
9
  open: (extra?: Struct) => Promise<void>;
7
10
  /** Request a gripper of the underlying robot to grab. */
@@ -10,7 +10,7 @@ import type { InputController, InputControllerEvent } from './input-controller';
10
10
  */
11
11
  export declare class InputControllerClient implements InputController {
12
12
  private client;
13
- private readonly name;
13
+ readonly name: string;
14
14
  private readonly options;
15
15
  callOptions: CallOptions;
16
16
  constructor(client: RobotClient, name: string, options?: Options);
@@ -10,7 +10,7 @@ import type { Motor } from './motor';
10
10
  */
11
11
  export declare class MotorClient implements Motor {
12
12
  private client;
13
- private readonly name;
13
+ readonly name: string;
14
14
  private readonly options;
15
15
  callOptions: CallOptions;
16
16
  constructor(client: RobotClient, name: string, options?: Options);
@@ -10,7 +10,7 @@ import type { MovementSensor } from './movement-sensor';
10
10
  */
11
11
  export declare class MovementSensorClient implements MovementSensor {
12
12
  private client;
13
- private readonly name;
13
+ readonly name: string;
14
14
  private readonly options;
15
15
  callOptions: CallOptions;
16
16
  constructor(client: RobotClient, name: string, options?: Options);
@@ -10,7 +10,7 @@ import type { PowerSensor } from './power-sensor';
10
10
  */
11
11
  export declare class PowerSensorClient implements PowerSensor {
12
12
  private client;
13
- private readonly name;
13
+ readonly name: string;
14
14
  private readonly options;
15
15
  callOptions: CallOptions;
16
16
  constructor(client: RobotClient, name: string, options?: Options);
@@ -10,7 +10,7 @@ import type { Sensor } from './sensor';
10
10
  */
11
11
  export declare class SensorClient implements Sensor {
12
12
  private client;
13
- private readonly name;
13
+ readonly name: string;
14
14
  private readonly options;
15
15
  callOptions: CallOptions;
16
16
  constructor(client: RobotClient, name: string, options?: Options);
@@ -10,7 +10,7 @@ import type { Servo } from './servo';
10
10
  */
11
11
  export declare class ServoClient implements Servo {
12
12
  private client;
13
- private readonly name;
13
+ readonly name: string;
14
14
  private readonly options;
15
15
  callOptions: CallOptions;
16
16
  constructor(client: RobotClient, name: string, options?: Options);
@@ -10,7 +10,7 @@ import type { Switch } from './switch';
10
10
  */
11
11
  export declare class SwitchClient implements Switch {
12
12
  private client;
13
- private readonly name;
13
+ readonly name: string;
14
14
  private readonly options;
15
15
  callOptions: CallOptions;
16
16
  constructor(client: RobotClient, name: string, options?: Options);