cruise-automation / webviz

web-based visualization libraries
https://webviz.io/
Apache License 2.0
2.08k stars 412 forks source link

Plot panel doesn't have a "Buffer size" selection as it has in plotjuggler #463

Open galbra92 opened 4 years ago

galbra92 commented 4 years ago

Hey, cool tool have here.

In Plotjuggler, we could select a window buffer for plotting our data, something like that: Screenshot from 2020-06-10 16-46-34

Yet in webviz we cant, why?

Or am I missing it? - If so, could you point me to the right direction?

Thanks anyway. Gal

janpaul123 commented 4 years ago

Ah yeah, someone asked for this in an earlier ticket too! One question: do you mainly need this when using the websocket, to prevent loading in too much data? cc @MatthewSteel maybe we can sneak this in as a setting in the panel settings menu? 😄

If you're mainly playing bags, then you might want to try this new experimental feature: top-right "Config" menu -> "Experimental Features" -> "Preloading" -> "Always on". This will plot your data for the entire bag instead of being tied to your playback position.

janpaul123 commented 4 years ago

Oh and also be sure to join our Slack channel to make it easier to chat if necessary! https://github.com/cruise-automation/webviz#slack

galbra92 commented 4 years ago

Hey!

Thanks for the reply.

We use webviz via rosbridge, so when playing a bag, or subscribing to real topics, new data is being concatenated to the received data since time 0, thus after few minutes, the graph on webziv become unuseful, because it shows data from the beginning, while we are interested ar the most recent data received.

Hence a buffer feature will be perfect.

janpaul123 commented 4 years ago

Yes, this is still on our radar! cc @MatthewSteel when implementing the "width in seconds" field, perhaps we can use that to also discard old messages in the frame-based plotting? (The long term fix will be a proper websocket blocks buffer, but that's at least several weeks out…)