Teleoperate with a custom control interface

You can remotely operate any configured machine and visualize and aggregate its data using a custom control interface.

Prerequisites

A configured machine with teleoperable components

Make sure your machine has at least one camera, movement sensor, sensor, base, arm, board, gantry, gripper, motor or servo.

See configure a machine for more information.

Create a workspace

  1. Navigate to the FLEET page’s TELEOP tab. Click + Create workspace.

  2. Enter a unique name for your workspace in the top left of the page, replacing the placeholder untitled-workplace text.

  3. Use the Select location dropdown to select the location that contains the machine that you would like to visualize data from.

  4. Use the Select machine dropdown to select the machine that you would like to visualize data from.

Add a widget

  1. Click Add widget and select a widget type to create a new widget on your workspace.

    See widget types for more information about each type.

  2. To configure the widget, click the pencil icon in the top right of your widget:

    Click the pencil icon to configure your widget.

You can mix and match multiple widgets to visualize many kinds of data collected by your machine:

Workspace containing.

To arrange widgets on your workspace, click and drag the grid icon in the top left of your widget:

Click the grid icon to move a widget.

Widget types

Viam provides the following types of widgets that you can customize to visualize data synced from your machines:

Actuation

The actuation widget allows you to operate actuating components:

An actuation widget displaying servo controls.

To configure the actuation widget:

  1. Choose a type from the Component type dropdown.
  2. Choose a method from the Method dropdown.
  3. Choose a component from the Actuating component name dropdown.
  4. Click Save.

Camera stream

The camera stream widget displays a live feed of the most recent image captured by a camera component:

A camera widget displaying a live camera feed.

To configure the camera widget:

  1. Choose a camera from the Camera name dropdown.
  2. Select the Refresh type.
  3. Click Save.

GPS

The GPS widget displays the current GPS location of any sensor that reports a position:

A GPS widget displaying a live location.

To configure the camera widget:

  1. Choose a movement sensor from the Movement sensor name dropdown.
  2. Specify the Refresh rate in seconds.
  3. Choose to include Historic positions.
  4. Click Save.

Stat

The stat widget displays the most recent reading recorded by any sensor that produces tabular data:

A stat widget displaying a live sensor reading.

To configure the stat widget:

  1. Choose a sensor from the Sensor name dropdown.
  2. Select the reading you would like to display from the Path dropdown.
  3. Assign a title, a unit suffix, and a refresh rate.
  4. Click Save.

Table

The table widget displays a grid of historic tabular data values. You can display multiple fields simultaneously in a single table. Each row in the table represents a separate historic reading; each column represents a field.

A table widget displaying a grid of sensor readings.

To configure the table widget, define the following attributes:

  1. From the Resource name dropdown, choose a sensor you would like to visualize.

  2. From the Capture method dropdown, choose a method of data capture (for example Readings).

  3. Specify the Refetch rate in seconds.

  4. Specify the Time range in seconds.

  5. Use a custom MQL aggregation pipeline stage (or series of stages) to transform your sensor data into a flat object where each field corresponds to a column for the table. Consider the following sensor data, which contains information about air quality in a field named readings:

    "data" {
      "readings": {
        "gas_resistance": 114978.66606781945,
        "temperature": 22.96,
        "pressure": 1016.18,
        "humidity": 48.318
      }
    }
    

    To change the displayed names, use a $project stage:

    {
      "$project": {
        "Air Quality": "$data.readings.gas_resistance",
        "Humidity": "$data.readings.humidity",
        "Temperature": "$data.readings.temperature"
      }
    }
    

    For more information about MQL aggregation operators, see the MongoDB documentation.

  6. Click Save.

Time series

The time series widget creates a graph of tabular data. You can add multiple lines to the time series widget to compare multiple readings over the same time period:

A time series widget displaying a live graph of sensor data over time.

To configure the time series widget, define the following attributes for each line in the time series:

  1. From the Resource name dropdown, choose a sensor you would like to visualize.

  2. From the Capture method dropdown, choose a method of data capture (for example Readings).

  3. In the Title field, enter a name for the line.

  4. From the Path dropdown, choose the field of data that this line should visualize.

  5. Use the other fields to customize the unit, duration, and other aspects of your visualization.

  6. The Window method allows you to aggregate sensor readings over specified time intervals instead of displaying raw data points. Select a window method from the following options:

    • None: shows raw data with the path specified with no aggregation
    • Count: shows the number of readings within the window
    • Average: calculates the average value throughout the window
    • Minimum: shows the minimum value within the window
    • Maximum: shows the maximum value within the window
    • Custom query: shows the result of a custom MQL aggregation pipeline that you define
  7. Click Save.