Announcing: Topic Message Converters.

Write your own source-controlled scripts for manipulating data.

announcement

We've added a new type of Foxglove extension that allows you to manipulate data and create new topics on the fly for visualization.

Semantically, these new topic message converters are similar to user scripts, but they are available across layouts and can be used to deploy "user-scripts" organization-wide. Like other extensions, they support code reuse, development in your own IDE, and use of third-party modules.

What used to be called a message converter is now called a schema message converter (schema converter for short). This new type of extension is called a topic message converter (topic converter).

How are the new Topic Message Converters different?

Topic converters are more flexible than schema converters. Where schema converters assume a 1:1 relationship between proprietary schemas and well-known schemas, topic converters do not have this restriction. They can produce new topics from one or more input topics. These new topics can output custom types or other well-known schemas.

Topic converters support:

  • One or more input topics
  • Maintaining state (you can aggregate signal data from previous input messages to produce new output—allowing you to make filters or perform arbitrary math on signal data)
  • Extract individual fields from a message to separate top-level topics
  • View output of new topics in plots and State Transition panels (or any panels that use range subscriptions)

When should Schema Message Converters be used?

We recommend using these when there is a 1:1 relationship between some internal schema and a well-known schema. Common examples:

  • Converting proprietary GPS messages to foxglove.LocationFix for display in the Map panel
  • Converting internal Log messages to foxglove.Log for the Log panel
  • Converting business logic to foxglove.SceneUpdate for display in the 3D panel

Check out this guide to learn how to build a topic message converter that computes and plots the absolute value of acceleration data from a topic. It’s a great way to get started quickly.

Read more

Start building with Foxglove.

Get started