PlotJuggler: data sources
Things you will learn
- Load data from file
- Use streaming plugins
Data sources
- 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.
Streaming
- 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.
Streaming format
- 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
PlotJuggler 02: data sources
- 10,976