ternaris / marv

THIS REPOSITORY HAS BEEN MERGE INTO
https://github.com/ternaris/marv-robotics
GNU Affero General Public License v3.0
3 stars 4 forks source link

Interactive plots and diagrams #13

Closed mikepurvis closed 6 years ago

mikepurvis commented 7 years ago

I'd like to be able to render interactive plots, in particular using bokeh and dygraphs, which are friendly to larger amounts of data. Would it make sense to add new widget types specific to these, or more of a generic "blob of HTML" widget into which could be stuffed this kinds of content?

Note that I'm also interested in generating multiple plots which are synchronized together, see: http://dygraphs.com/gallery/#g/synchronize

Finally, I'd like to be able to generate timelines of key events that are occurring during my bags. For example, marking out spans of time that the robot is parked vs. moving, faulted vs OK, charging vs. discharging, etc. For this, I'm interested in using vis.js, eg: http://visjs.org/timeline_examples.html

What's the best path forward on integrating these tools with MARV?

NikolausDemmel commented 7 years ago

There is some support for interactive plots using mpld3, which is a really convenient way to bring your matplotlib plots to the browser, but I have also found that they don't scale increadibly well with large amounts of data and when playing around with a while back I couldn't make all plugins work right away.

I believe it would make sense to support other js plotting libraries explicitly as plugins, but a generic "blob of HTML" would also be great in particular for the adventurous user like yourself that doesn't mind digging in the plumbing to get the desired result. However, @chaoflow will have to way in as I have no idea what the plans are here.

luator commented 7 years ago

@NikolausDemmel I am interested in this as well. Is there some documentation or example on how to use mpld3? I saw in the demo that it is used there but could not yet figure out how to do so (what type of detail widget do I need?).

NikolausDemmel commented 7 years ago

I am interested in this as well. Is there some documentation or example on how to use mpld3? I saw in the demo that it is used there but could not yet figure out how to do so (what type of detail widget do I need?).

To be honest, I'm not even sure that the mpld3 widgets are part of the current public CE. I used them as a EE customer to plot trajectories and IMU data, nightly benchmark results and the like.

See also my other comment in https://github.com/ternaris/marv-robotics/issues/18#issuecomment-316028033 regarding the state of the CE.

chaoflow commented 7 years ago

@mikepurvis @luator We are working on a Community Edition release, which will happen before ROSCon 2017. This release (as well as the Enterprise Edition) will feature support for loading custom widgets. Additionally in EE an integration of the mpld3 library is available, see https://ternaris.com/marv-robotics/docs/tutorial/write-your-own.html#combined-table-plot-and-gallery

Updated URL

chaoflow commented 6 years ago

CE release 17.11 does not contain an interactive plotting library but instead matplotlib plots are rendered to images:

It is possible to add custom frontend widgets.

Documentation now lives here: