@viamrobotics/sdk 0.2.5-next.0 → 0.2.5-next.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.
@@ -10,7 +10,7 @@ export interface Navigation extends Resource {
10
10
  /**
11
11
  * Set the mode the robot is operating in.
12
12
  *
13
- * @param mode -
13
+ * @param mode - The mode for the service to operate in.
14
14
  */
15
15
  setMode: (mode: ModeMap[keyof ModeMap], extra?: StructType) => Promise<void>;
16
16
  /** Get the current location of the robot. */
@@ -0,0 +1,21 @@
1
+ import pb from '../../gen/service/slam/v1/slam_pb';
2
+ import { RobotClient } from '../../robot';
3
+ import type { Options, StructType } from '../../types';
4
+ import type { Slam } from './slam';
5
+ /**
6
+ * A gRPC-web client for a SLAM service.
7
+ *
8
+ * @group Clients
9
+ */
10
+ export declare class SlamClient implements Slam {
11
+ private client;
12
+ private readonly name;
13
+ private readonly options;
14
+ constructor(client: RobotClient, name: string, options?: Options);
15
+ private get service();
16
+ getPosition(): Promise<pb.GetPositionResponse.AsObject>;
17
+ getPointCloudMap(): Promise<Uint8Array>;
18
+ getInternalState(): Promise<Uint8Array>;
19
+ getLatestMapInfo(): Promise<Date>;
20
+ doCommand(command: StructType): Promise<StructType>;
21
+ }
@@ -0,0 +1,22 @@
1
+ import type { Resource } from '../../types';
2
+ import type { GetPositionResponse } from './types';
3
+ /**
4
+ * A service that allows your robot to create a map of its surroundings and find
5
+ * its location within that map.
6
+ */
7
+ export interface Slam extends Resource {
8
+ /**
9
+ * Get the current position of the specified source component in the point
10
+ * cloud SLAM map.
11
+ */
12
+ getPosition: () => Promise<GetPositionResponse>;
13
+ /** Get the point cloud SLAM map. */
14
+ getPointCloudMap: () => Promise<Uint8Array>;
15
+ /**
16
+ * Get the internal state of the SLAM algorithm required to continue
17
+ * mapping/localization.
18
+ */
19
+ getInternalState: () => Promise<Uint8Array>;
20
+ /** Get the timestamp of the last update to the point cloud SLAM map. */
21
+ getLatestMapInfo: () => Promise<Date>;
22
+ }
@@ -0,0 +1,2 @@
1
+ import pb from '../../gen/service/slam/v1/slam_pb';
2
+ export type GetPositionResponse = pb.GetPositionResponse.AsObject;
@@ -0,0 +1,3 @@
1
+ export type { Slam } from './slam/slam';
2
+ export type { GetPositionResponse } from './slam/types';
3
+ export { SlamClient } from './slam/client';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viamrobotics/sdk",
3
- "version": "0.2.5-next.0",
3
+ "version": "0.2.5-next.1",
4
4
  "description": "",
5
5
  "main": "./dist/main.umd.js",
6
6
  "module": "./dist/main.es.js",