PlotJuggler: data sources
Things you will learn
- Load data from file
- Use streaming plugins
- PlotJuggler can read data from file or live-streaming.
- All data sources are implemented through plugins.
- You can add new plugins (yours or 3rd party) in the "Preferences" menu.
Example: load a CSV file
- Each plugin has its own dialog and options.
- 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.
- PJ has several built-in streaming plugins (MQTT, UDP, Websockets).
- For testing purpose, start PJ with option "-t" and try the Dummy Streamer.
- You can start, pause and stop the streamer. Change the buffer size if needed.
- Zoom and Time Tracker are active only when streaming is stopped or paused.
- The built-in plugins recognize these formats: JSON, BSON, CBOR, MessagePack.
- Check the Websocket example, publishing a simple JSON message
- Sometimes, it is useful to clean the data buffer (see video).
Save the data source in the Layout
- When you save a Layout, check the option "Save data source" to reopen the last file or restart the last streaming plugin.
- 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