PlotJuggler: data sources

Things you will learn

  • Load data from file
  • Use streaming plugins

Data sources

  1. PlotJuggler can read data from file or live-streaming.
  2. All data sources are implemented through plugins.
  3. You can add new plugins (yours or 3rd party) in the "Preferences" menu.

Example: load a CSV file

  1. Each plugin has its own dialog and options.
  2. For instance, try to load this CSV file. You will be asked to select the column with the time. Optionally, you can use the row number.

Streaming

  1. PJ has several built-in streaming plugins (MQTT, UDP, Websockets).
  2. For testing purpose, start PJ with option "-t" and try the Dummy Streamer.
  3. You can start, pause and stop the streamer. Change the buffer size if needed.
  4. Zoom and Time Tracker are active only when streaming is stopped or paused.

Streaming format

  1. The built-in plugins recognize these formats: JSON, BSON, CBOR, MessagePack.
  2. Check the Websocket example, publishing a simple JSON message
  3. Sometimes, it is useful to clean the data buffer (see video).

Save the data source in the Layout

  1. When you save a Layout, check the option "Save data source" to reopen the last file or restart the last streaming plugin.
  2. Sometimes, you want to reuse the Layout on a different file. In this case:
  • Save the Layout with "Save data source" unchecked.
  • Load the data file first.
  • Open the Layout file

PlotJuggler 02: data sources

By Davide Faconti

PlotJuggler 02: data sources

  • 10,976