openpilot icon indicating copy to clipboard operation
openpilot copied to clipboard

tools/rerun: improve rerun to PlotJuggler quality

Open bongbui321 opened this issue 1 year ago • 7 comments

Resolves #32463 Current progress: on my machine, it loads faster than PlotJuggler (including parsing logs time), and uses about 1GB less memory compared to PlotJuggler.

image

Though it is not as useful as PlotJuggler right now since we cannot use the TimeSeries scroll bar (explained in the picture below).
image

This is more of a hack, and the only good solution is upstream fix. It seems the problem of logging a big number of Scalar() archetype of Rerun runs deep in their codebase and they would need a major change in how Rerun uses log() to fully solve the bloated memory issue.

bongbui321 avatar Jun 11 '24 16:06 bongbui321

Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:

  • Convert your PR to a draft unless it's ready to review
  • Read the contributing docs
  • Before marking as "ready for review", ensure:
    • the goal is clearly stated in the description
    • all the tests are passing
    • the change is something we merge
    • include a route or your device' dongle ID if relevant

github-actions[bot] avatar Jun 11 '24 16:06 github-actions[bot]

Sounds like it's not possible to totally replace PlotJuggler quite yet. For the bounty, I propose we just support both methods (switchable with an argparse flag) and default to the faster one. Everything else in the bounty still applies (nice README, install, etc.), and once rerun upstream is ready, we can just remove the other mode.

adeebshihadeh avatar Jun 11 '24 17:06 adeebshihadeh

Also you've got a lock on the bounty now!

adeebshihadeh avatar Jun 11 '24 17:06 adeebshihadeh

Nice speedup! I can't seem to plot anything and the recommended view is 2D when it probably should be time series. Is there any way to double click/drag or quickly view plots? The right click menu is slow for viewing multiple

image

image

sshane avatar Jun 13 '24 07:06 sshane

@sshane this is more of a hack to plot multiple points in a batch, and it is not very usable right now. TimeSeriesView works only with Scalar() type, which is the root of our problem (explained in the picture in the description and comment). It requires an upstream fix for us to use TimeSeriesView. Until then, you should use SpatialView2D as your Space View which has limited functionalities compared to PlotJuggler

Is there any way to double click/drag or quickly view plots?

Currently no, and I have confirmed this with the rerun maintainers (not quite usable as PlotJuggler yet).

bongbui321 avatar Jun 13 '24 14:06 bongbui321

This PR has had no activity for 14 days. It will be automatically closed in 3 days if there is no activity.

github-actions[bot] avatar Jul 02 '24 01:07 github-actions[bot]

This PR has been automatically closed due to inactivity. Feel free to re-open once activity resumes.

github-actions[bot] avatar Jul 06 '24 01:07 github-actions[bot]

This PR has had no activity for 14 days. It will be automatically closed in 3 days if there is no activity.

github-actions[bot] avatar Jul 21 '24 01:07 github-actions[bot]

Will open another PR for this

bongbui321 avatar Jul 22 '24 21:07 bongbui321