Show lane lines and path while using uiview.py (#2104)

* add modeld and required calibd procs to uiview to display lane lines when debugging

* send radarState with empty message to show model path

* make uiview.py executable
albatross
Shane Smiskol 2020-08-30 13:38:40 -05:00 committed by GitHub
parent 349040d958
commit dfdbf6e416
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

7
selfdrive/debug/uiview.py 100644 → 100755
View File

@ -3,12 +3,12 @@ import time
import cereal.messaging as messaging
from selfdrive.manager import start_managed_process, kill_managed_process
services = ['controlsState', 'thermal'] # the services needed to be spoofed to start ui offroad
procs = ['camerad', 'ui']
services = ['controlsState', 'thermal', 'radarState'] # the services needed to be spoofed to start ui offroad
procs = ['camerad', 'ui', 'modeld', 'calibrationd']
[start_managed_process(p) for p in procs] # start needed processes
pm = messaging.PubMaster(services)
dat_cs, dat_thermal = [messaging.new_message(s) for s in services]
dat_cs, dat_thermal, dat_radar = [messaging.new_message(s) for s in services]
dat_cs.controlsState.rearViewCam = False # ui checks for these two messages
dat_thermal.thermal.started = True
@ -16,6 +16,7 @@ try:
while True:
pm.send('controlsState', dat_cs)
pm.send('thermal', dat_thermal)
pm.send('radarState', dat_radar)
time.sleep(1 / 100) # continually send, rate doesn't matter for thermal
except KeyboardInterrupt:
[kill_managed_process(p) for p in procs]