plotjuggler (#20063)

* we're jugglin

* install.sh works + README

* new readme

* new readme

* better readme

* fixes

* more fixes

* fix

Co-authored-by: iejMac <gig13omb@gmail.com>
old-commit-hash: e5cc110081862d53b29f4ccd2d7577dc9a774580
This commit is contained in:
Adeeb Shihadeh
2021-02-11 22:40:12 -08:00
committed by GitHub
parent d59a13e22a
commit e6e1b719a7
4 changed files with 47 additions and 0 deletions

1
tools/plotjuggler/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
bin/

View File

@@ -0,0 +1,18 @@
# PlotJuggler
We've extended [PlotJuggler](https://github.com/facontidavide/PlotJuggler) to plot all of your openpilot logs
Here's our fork: https://github.com/commaai/PlotJuggler
## Installation
Once you've cloned openpilot, run this command inside this directory:
`./install.sh`
## Usage
`./juggle.py <route> <segment number>`
Example:
`./juggle.py "0982d79ebb0de295|2021-01-17--17-13-08" 0`

5
tools/plotjuggler/install.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
wget https://github.com/commaai/PlotJuggler/releases/download/1.0/bin.tar.gz
tar -xf bin.tar.gz
rm bin.tar.gz

23
tools/plotjuggler/juggle.py Executable file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env python3
import sys
import subprocess
from tools.lib.route import Route
from tools.lib.url_file import URLFile
def juggle_segment(route_name, segment_nr):
r = Route(route_name)
lp = r.log_paths()[segment_nr]
if lp is None:
print("This segment does not exist, please try a different one")
return
uf = URLFile(lp)
subprocess.call(f"bin/plotjuggler -d {uf.name}", shell=True)
if __name__ == "__main__":
juggle_segment(sys.argv[1], int(sys.argv[2]))