Class PoseTrackerClient

A gRPC-web client for the Generic component.

Implements

Constructors

Properties

Methods

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>

    import { Struct } from '@viamrobotics/sdk';

    const result = await resource.doCommand(
    Struct.fromJson({
    myCommand: { key: 'value' },
    })
    );
  • Get the geometries of the component in their current configuration.

    Parameters

    • extra: {} = {}
    • callOptions: CallOptions = ...

    Returns Promise<commonApi.Geometry[]>

    const generic = new VIAM.GenericComponentClient(
    machine,
    'my_generic_component'
    );

    // Get the geometries of this component
    const geometries = await generic.getGeometries();
    console.log('Geometries:', geometries);

    For more information, see Generic API.