rerun: fix rp_visualization TypeError (#33749)

* Fixed iteration over liveTracks in radar visualization by ensuring the data structure is iterable and made the background black

* Requested changes, moved conditional to function call

* Simplified conditional, renamed method
This commit is contained in:
Will
2024-10-08 15:50:55 -06:00
committed by GitHub
parent d72b59832c
commit 8a8d8c2272
2 changed files with 6 additions and 4 deletions
+3 -2
View File
@@ -8,7 +8,8 @@ rerunColorPalette = [(96, "red", (255, 0, 0)),
(230, "vibrantpink", (255, 36, 170)),
(240, "orange", (255, 146, 0)),
(255, "white", (255, 255, 255)),
(110, "carColor", (255,0,127))]
(110, "carColor", (255,0,127)),
(0, "background", (0, 0, 0))]
class UIParams:
@@ -68,7 +69,7 @@ def plot_lead(rs, lid_overlay):
lid_overlay[px_left:px_right, py] = rerunColorPalette[0][0]
def maybe_update_radar_points(lt, lid_overlay):
def update_radar_points(lt, lid_overlay):
ar_pts = []
if lt is not None:
ar_pts = {}