PlotJuggler: data sources
![](https://s3.amazonaws.com/media-p.slid.es/uploads/430442/images/8625111/meme_21.jpg)
Things you will learn
- Load data from file
- Use streaming plugins
![](https://s3.amazonaws.com/media-p.slid.es/uploads/430442/images/8627181/data_sources.png)
Data sources
![](https://s3.amazonaws.com/media-p.slid.es/uploads/430442/images/8625118/Selection_302.png)
- 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:
![](https://s3.amazonaws.com/media-p.slid.es/uploads/430442/images/8628783/Selection_304.png)
- Save the Layout with "Save data source" unchecked.
- Load the data file first.
- Open the Layout file
![](https://s3.amazonaws.com/media-p.slid.es/uploads/430442/images/8625624/meme_38.jpg)
PlotJuggler 02: data sources
By Davide Faconti
PlotJuggler 02: data sources
- 9,968