2021-02-11 22:40:12 -08:00
# PlotJuggler
2021-05-20 22:19:06 -05:00
We've extended [PlotJuggler ](https://github.com/facontidavide/PlotJuggler ) to plot all of your openpilot logs. Check out our plugins: https://github.com/commaai/PlotJuggler.
2021-02-11 22:40:12 -08:00
## Installation
2021-05-21 15:28:06 -05:00
Once you've cloned and are in openpilot, download PlotJuggler and install our plugins with this command:
2021-02-11 22:40:12 -08:00
2021-02-27 21:11:36 -08:00
`cd tools/plotjuggler && ./install.sh`
2021-02-11 22:40:12 -08:00
## Usage
2021-02-17 20:07:37 -08:00
```
2021-08-16 22:23:42 -07:00
$ ./juggle.py -h
2021-07-06 22:57:03 +02:00
usage: juggle.py [-h] [--qlog] [--can] [--stream] [--layout [LAYOUT]] [route_name] [segment_number] [segment_count]
2021-02-17 20:07:37 -08:00
2021-07-06 22:57:03 +02:00
PlotJuggler plugin for reading openpilot logs
2021-02-17 20:07:37 -08:00
positional arguments:
2021-08-16 22:23:42 -07:00
route_name The route name to plot (cabana share URL accepted) (default: None)
segment_number The index of the segment to plot (default: None)
segment_count The number of segments to plot (default: 1)
2021-02-17 20:07:37 -08:00
optional arguments:
2021-02-26 19:11:59 -08:00
-h, --help show this help message and exit
--qlog Use qlogs (default: False)
2021-05-20 22:19:06 -05:00
--can Parse CAN data (default: False)
--stream Start PlotJuggler without a route to stream data using Cereal (default: False)
2021-02-26 19:11:59 -08:00
--layout [LAYOUT] Run PlotJuggler with a pre-defined layout (default: None)
2021-02-17 20:07:37 -08:00
```
2021-02-11 22:40:12 -08:00
Example:
2021-02-17 20:07:37 -08:00
`./juggle.py "0982d79ebb0de295|2021-01-17--17-13-08"`
2021-02-26 19:11:59 -08:00
2021-05-21 15:28:06 -05:00
## Streaming
2021-05-20 22:19:06 -05:00
2021-08-16 22:23:42 -07:00
Explore live data from your car! Follow these steps to stream from your comma device to your laptop:
- Enable wifi tethering on your comma device
- [SSH into your device ](https://github.com/commaai/openpilot/wiki/SSH ) and run `cd /data/openpilot && ./cereal/messaging/bridge`
- On your laptop, connect to the device's wifi hotspot
- Start PlotJuggler with `ZMQ=1 ./juggle.py --stream` , find the `Cereal Subscriber` plugin in the dropdown under Streaming, and click `Start` .
2021-05-20 22:19:06 -05:00
2021-08-16 22:23:42 -07:00
If streaming to PlotJuggler from a replay on your PC, simply run: `./juggle.py --stream` and start the cereal subscriber.
2021-05-20 22:19:06 -05:00
## Demo
2021-02-26 19:11:59 -08:00
2021-02-27 21:11:36 -08:00
For a quick demo, go through the installation step and run this command:
2021-02-26 19:11:59 -08:00
`./juggle.py "https://commadataci.blob.core.windows.net/openpilotci/d83f36766f8012a5/2020-02-05--18-42-21/0/rlog.bz2" --layout=demo_layout.xml`
2021-02-27 21:11:36 -08:00
