Skip to main content

Custom Data

Foxglove makes it easy to use custom data, whether you want to visualize live or recorded data. Foxglove supports multiple encodings: Protobuf, JSON, FlatBuffers, OMG IDL.

Local Data

You can load custom data into Foxglove by converting it to MCAP or writing a custom data loader that will tell Foxglove how to interpret your file format of choice (e.g., CSV, PCAP, binary files).

Open your recording(s) directly from your computer by:

  • Dragging and dropping them into Foxglove
  • Using Cmd/Ctrl + o
  • Clicking Open local file(s) in the app

Local file dialog

note

When opening multiple files, Foxglove will display the data as a single merged timeline. The files must be of the same format.

Remote File

Once you have an MCAP file in remote storage, follow the MCAP directions for opening it via URL in Foxglove.

Imported Data

Once you convert custom data to MCAP and import it to Foxglove, you can stream it directly for visualization.

After importing data to Foxglove, select individual resources to visualize on the Recordings or Events pages:

Visualize on Recordings page

Select a custom time range of data (can span multiple recordings or events) to visualize on the Timeline page:

Live Data

Use the Foxglove SDK to create a live connection to Foxglove from your custom code.

import foxglove
import time

foxglove.start_server()

while True:
foxglove.log("/hello", {"time": time.time()})
time.sleep(0.03)
note

For complete examples on how to use the Foxglove SDK, please see the SDK documentation.

warning

While our legacy Foxglove WebSocket protocol libraries still can be used to connect to Foxglove, we are no longer maintaining those libraries and recommend that you use the new Foxglove SDK going forward.

Connect

With a WebSocket server started, select "Foxglove WebSocket" in the "Open data source" dialog, and enter the URL to your WebSocket server:

Foxglove WebSocket dialog

Now, you can insert a Raw Message or a Plot panel and visualize your data in real-time.

Schema Encodings

Both MCAP-based and Foxglove WebSocket sources support several message and schema encodings. For detailed information about each encoding format, see Custom Schema Encodings.