nopenpilot/tools/replay
HaraldSchafer 74b6c87254
cleanup old nidec accel override logic (#22181)
* cleanup old nidec accel override logic

* add ref without deprecated fields

* no more override
2021-09-10 10:34:18 -07:00
..
lib ui.py: draw lines on radarState leads 2021-03-03 13:05:41 +01:00
README.md fix tools readme url typo (#21913) 2021-08-11 23:03:00 -07:00
__init__.py merge in tools 2020-01-17 10:07:22 -08:00
camera.py tools: fix replay/camera.py crash (#21881) 2021-08-09 09:43:11 +02:00
can_replay.py can replay: flashing lock 2021-08-18 14:17:02 -07:00
rqplot.py Add type hints, small cleanups (#21080) 2021-06-03 12:21:04 +02:00
ui.py cleanup old nidec accel override logic (#22181) 2021-09-10 10:34:18 -07:00
unlog_segment.py fix unlog_segment.py 2021-05-18 11:14:42 +02:00
unlogger.py unlogger: put YUV vipc send behind flag 2021-06-03 21:53:16 -07:00

README.md

Replay driving data

Hardware needed: none

unlogger.py replays data collected with dashcam or openpilot.

Unlogger with remote data:

# Log in via browser
python lib/auth.py

# Start unlogger
python replay/unlogger.py <route-name>
#Example:
#python replay/unlogger.py '3533c53bb29502d1|2019-12-10--01-13-27'

# 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

Unlogger with local data downloaded from device or https://connect.comma.ai:

python replay/unlogger.py <route-name> <path-to-data-directory>

#Example:

#python replay/unlogger.py '99c94dc769b5d96e|2018-11-14--13-31-42' /home/batman/unlogger_data

#Within /home/batman/unlogger_data:
#  99c94dc769b5d96e|2018-11-14--13-31-42--0--fcamera.hevc
#  99c94dc769b5d96e|2018-11-14--13-31-42--0--rlog.bz2
#  ...

Imgur

LogReader with remote data

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')

Stream replayed CAN messages to EON

Hardware needed: 2 x panda, debug board, EON.

It is possible to replay CAN messages as they were recorded and forward them to a EON.  Connect 2 pandas to the debug board. A panda connects to the PC, the other panda connects to the EON.

Usage:

# With MOCK=1 boardd will read logged can messages from a replay and send them to the panda.
MOCK=1 selfdrive/boardd/tests/boardd_old.py

# In another terminal:
python replay/unlogger.py <route-name> <path-to-data-directory>

Imgur