Announcing: the Foxglove SDK

Streamline your robotics data integration and visualization.

announcement

We're thrilled to announce the public release of the Foxglove SDK—a unified toolkit designed to make integrating your robotics stack with Foxglove easier than ever before. Whether you're building a small research project or scaling a production fleet, the Foxglove SDK simplifies your journey with a consistent, powerful, and intuitive API for live visualization, structured logging, and remote monitoring.

Why we built the Foxglove SDK.

Integrating robotics systems with visualization and debugging tools has historically been messy often requiring:

  • Manually building MCAP files and WebSocket servers.
  • Implementing custom logging stacks.
  • Grappling with inconsistently documented protocols.

The Foxglove SDK abstracts away these complexities and lets you focus on what matters most by unifying scattered tools and processes under one consistent API, including:

Unified logging interface

  • Record to MCAP files and stream live data with the same code.
  • Log from your devices, simulations, and Jupyter notebooks.

Cross-language consistency

  • Available in C++, Python, and Rust.
  • All bindings share a common Rust core, ensuring consistent behavior and avoiding feature drift across languages.

High-level and low-level APIs

  • Use high-level APIs for common schemas like CompressedImage and SceneEntity.
  • Drop down to low-level APIs to log fully custom message types with minimal boilerplate.

Live visualization support

  • Seamlessly stream live data to the Foxglove app via WebSocket.
  • Support for future UDP-based protocols (e.g., WebRTC, WebTransport) is on the roadmap, aimed at better handling of lossy network conditions.

Getting started: simplicity by design.

Getting up and running is easy. Here's a simple Python example demonstrating both live streaming and recording to an MCAP file:

import foxglove as fg

from foxglove.schemas import Pose, PoseInFrame, Quaternion, Timestamp, Vector3

# start a live websocket server
fg.start_server()

# simultaneously log to an mcap file
with fg.open_mcap("foo.mcap"):
   fg.log("/example", PoseInFrame(
       timestamp=Timestamp(sec=0),
       frame_id="ego",
       pose=Pose(
           position=Vector3(x=1.0, y=2.0, z=3.0),
           orientation=Quaternion(x=0.0, y=0.0, z=0.0, w=1.0),
       ),
   ))

With just a few lines, you can:

  • Open a local server for live visualization.
  • Write structured logs to disk.
  • Stream data to Foxglove.

Designed for robotics, built for developers.

To move provide a consistent experience, we’ve consolidated functionality into a Rust core. The Python and C++ SDKs are written around the Rust core. This allows each language to feel idiomatic, while maintaining consistency between them.

At the core of the SDK is the foxglove Rust crate, responsible for:

  • Context management for writing to MCAP files and streaming live data to the Foxglove app.
  • Buffering and connection management for the WebSocket server.
  • Serialization and deserialization of Foxglove schemas, when users don't care about having control over that.

Where it makes sense, we auto-generate parts of the SDK, including schemas and type-safe channels. This allows us to support the full range of schemas that the app supports, while also being flexible with how the interfaces are presented in each language.

Join us on this journey.

The Foxglove SDK represents a leap forward in simplifying your interaction with robotics systems. Dive in, try it out, and send us feedback!

Get Started with the Foxglove SDK

Read more

Start building with Foxglove.

Get started