Class SlamClient

A gRPC-web client for a SLAM service.

Implements

  • Slam

Constructors

Properties

callOptions: CallOptions = ...
name: string

The name of the resource.

Methods

  • Send/Receive arbitrary commands to the resource.

    Parameters

    • command: Struct

      The command to execute.

    • callOptions: CallOptions = ...

    Returns Promise<JsonValue>

    const result = await resource.doCommand({
    name: 'myCommand',
    args: { key: 'value' },
    });
  • Parameters

    • callOptions: CallOptions = ...

    Returns Promise<Uint8Array>

  • Parameters

    • OptionalreturnEditedMap: boolean
    • callOptions: CallOptions = ...

    Returns Promise<Uint8Array>

  • Get the current position of the specified source component in the point cloud SLAM map.

    Parameters

    • callOptions: CallOptions = ...

    Returns Promise<slamApi.GetPositionResponse>

    const slam = new VIAM.SlamClient(machine, 'my_slam');

    // Get the current position of the robot in the SLAM map
    const position = await slam.getPosition();
    console.log('Current position:', position);
  • Get information on the properties of the current SLAM service.

    Parameters

    • callOptions: CallOptions = ...

    Returns Promise<slamApi.GetPropertiesResponse>

    const slam = new VIAM.SlamClient(machine, 'my_slam');

    // Get the properties of the SLAM service
    const properties = await slam.getProperties();
    console.log('SLAM properties:', properties);
MMNEPVFCICPMFPCPTTAAATR