tools: Update replay examples

pull/1175/head
andyh2 5 years ago
parent 1457001c2d
commit 8c5f843fa3
  1. 17
      tools/README.md

@ -191,7 +191,8 @@ Replay driving data
`unlogger.py` replays data collected with [chffrplus](https://github.com/commaai/chffrplus) or [openpilot](https://github.com/commaai/openpilot). `unlogger.py` replays data collected with [chffrplus](https://github.com/commaai/chffrplus) or [openpilot](https://github.com/commaai/openpilot).
Usage (Remote data): Unlogger with remote data:
``` ```
# Log in via browser # Log in via browser
python lib/auth.py python lib/auth.py
@ -199,13 +200,13 @@ python lib/auth.py
# Start unlogger # Start unlogger
python replay/unlogger.py <route-name> python replay/unlogger.py <route-name>
#Example: #Example:
#python replay/unlogger.py '99c94dc769b5d96e|2018-11-14--13-31-42' #python replay/unlogger.py '3533c53bb29502d1|2019-12-10--01-13-27'
# In another terminal you can run a debug visualizer: # In another terminal you can run a debug visualizer:
python replay/ui.py # Define the environmental variable HORIZONTAL is the ui layout is too tall python replay/ui.py # Define the environmental variable HORIZONTAL is the ui layout is too tall
``` ```
Usage (Local data downloaded from device or https://my.comma.ai): Unlogger with local data downloaded from device or https://my.comma.ai:
``` ```
python replay/unlogger.py <route-name> <path-to-data-directory> python replay/unlogger.py <route-name> <path-to-data-directory>
@ -221,6 +222,16 @@ python replay/unlogger.py <route-name> <path-to-data-directory>
``` ```
![Imgur](https://i.imgur.com/Yppe0h2.png) ![Imgur](https://i.imgur.com/Yppe0h2.png)
LogReader with remote data
```python
from tools.lib.logreader import LogReader
from tools.lib.route import Route
route = Route('3533c53bb29502d1|2019-12-10--01-13-27')
log_paths = route.log_paths()
events_seg0 = list(LogReader(log_paths[0]))
print(len(events_seg0), 'events logged in first segment')
```
Debug car controls Debug car controls
------------- -------------

Loading…
Cancel
Save