Start data capture | Capture and sync

Start data capture

Configure your machine to automatically record sensor readings, camera images, and other component data, then sync it to the cloud. For an overview of how data capture and sync work, see the Manage data overview.

1. Open your machine in the Viam app

Go to app.viam.com and navigate to your machine. Confirm it shows as Live in the upper left.

2. Enable data capture on a component

  1. Find your component (for example, my-camera) in the machine configuration.
  2. Click the Data Capture button.
  3. If you see a “Data management service missing” banner, click Create data management service, click Save, navigate back to your component, and click the Data Capture button again.
  4. Select the method to capture:
    • For a camera, select GetImages. This captures a frame from the camera each time it fires.
    • For a sensor, select Readings. This records the sensor’s current values.
  5. Set the capture frequency. This is specified in hertz (captures per second):
    • 0.5 = one capture every 2 seconds
    • 0.2 = one capture every 5 seconds
    • 1 = one capture per second
    • Start low. For cameras, 0.5 Hz is a reasonable starting point. You can always increase it later.
  6. Click Save in the upper right.

After saving, viam-server begins capturing immediately. You do not need to restart anything.

Tip

You can add multiple capture methods to a single component (for example, capture both GetImages and NextPointCloud from the same camera), each with its own frequency.

3. Capture from additional components (optional)

Repeat step 2 for any other components you want to capture from. Each component’s data capture is independent – you can have a camera capturing images every 2 seconds and a sensor capturing readings every 10 seconds at the same time.

4. Sync data from another directory (optional)

You can also sync files from directories outside of the default capture path. This is useful for uploading a batch of existing data or syncing files that another process writes to a folder on your machine.

In the data management service configuration, add the directory path to Additional paths (or "additional_sync_paths" in JSON mode).

Caution

Data synced from additional paths is deleted from the device after upload, just like captured data. If you want to keep a local copy, copy the data to a new folder and sync that folder instead.

5. Verify data is syncing

Wait 30 seconds to a minute for data to accumulate and sync, then:

  1. In the Viam app, click the DATA tab in the top navigation. The tab opens on the Images view by default.
  2. For camera captures, you should see image thumbnails appearing. For sensor data, click the Sensors tab to see the latest readings from each machine and resource. To see historical rows of tabular data, click the small search icon next to a resource on the Sensors tab to open the query editor.
  3. Use the filters on the left to narrow by:
    • Machine – select your specific machine
    • Component – select the component you configured
    • Time range – pick a recent window

If you see data flowing in, capture and sync are working correctly.

Supported resources

Any built-in or modular component that implements a capturable method can be configured for data capture. The following table lists the most commonly captured component types and their methods:

Component type Capturable methods
Camera ReadImage, GetImages, NextPointCloud, GetWorldPose
Audio in GetAudio, GetWorldPose
Sensor GetReadings, GetWorldPose
Movement sensor GetPosition, GetLinearVelocity, GetAngularVelocity, GetCompassHeading, GetLinearAcceleration, GetOrientation, GetReadings, GetWorldPose
Encoder GetTicksCount, GetWorldPose
Motor GetPosition, IsPowered, GetWorldPose
Power sensor GetVoltage, GetCurrent, GetPower, GetReadings, GetWorldPose
Servo GetPosition, GetWorldPose
Arm GetEndPosition, GetJointPositions, GetWorldPose
Gantry GetPosition, GetLengths, GetWorldPose
Board Analogs, Gpios, GetWorldPose
Vision service CaptureAllFromCamera
SLAM service GetPosition, GetPointCloudMap

Every component also supports GetWorldPose (requires a configured frame system) and DoCommand. Modular components that return readings through any of these methods are automatically capturable.

Troubleshooting

No data appears in the Data tab
Data appears but images are missing or blank
Data capture frequency seems wrong
Local disk filling up

What’s next